source: svn/trunk/newcon3bcm2_21bu/dst/dhl/build/makefile @ 2

Last change on this file since 2 was 2, checked in by jglee, 11 years ago

first commit

  • Property svn:executable set to *
File size: 6.9 KB
Line 
1################################################################
2# DST HAL Makefile
3#
4################################################################/
5
6
7# set TOP_DIR variable at the head of each makefile.
8# this is "ROOT" of source tree.
9#
10TOP_DIR = ../..
11CUR_DIR = .
12#$(warning TOP_DIR is '$(TOP_DIR)')
13
14
15DST_PLATFORM_DEFINES += \
16        CA_TYPE=NONE    \
17        NDS_LIB=NONE    \
18        XRPC_MODULES_SERVER     \
19        QC_svpldi       \
20        QC_reset        \
21        QC_qc_tests     \
22        QC_nskldi       \
23        QC_nskhal       \
24        QC_harm_tests   \
25        QC_cahdiver     \
26        SOCKET_GLUE_SERVER      \
27        MS_C_STDLIB     \
28        MS_BOARD_TYPE_SEL=BD_MST124A_D01A_S     \
29        MS_DVB_TYPE_SEL=INTERNAL_DVBT   \
30        ENABLE_DEBUG=\
31        STB_ENABLE=1    \
32        FBL_ENABLE=0    \
33        MBOOT_LOGO_ENABLE=0     \
34        MSOS_TYPE_ECOS  \
35        ENABLE_AESDMA   \
36        MS_DEBUG
37
38
39DHL_DIR = $(TOP_DIR)/dhl
40DLIB_DIR = $(TOP_DIR)/dlib
41OBJ_DIR = $(CUR_DIR)/../obj
42#$(warning OBJ_DIR is '$(OBJ_DIR)')
43
44
45TARGET = $(TOP_DIR)/obj/libdstdhl.a
46
47
48# include cross-compiler definitions
49# cafrii 090715, use our own tools.mak for easy customization.
50include $(TOP_DIR)/build/tools.mak
51
52
53CFLAGS += $(foreach i,$(DST_PLATFORM_DEFINES),-D$(i))
54ifeq ($(fe_sal), y)
55CFLAGS += -D_FE_DTQS22DDP101A_LG
56else ifeq ($(fe_sbl), y)
57CFLAGS += -D_FE_DTQS22DDP101B_LG
58else ifeq ($(fe_lgl), y)
59CFLAGS += -D_FE_LGH952F_LG
60else ifeq ($(fe_sas), y)
61CFLAGS += -D_FE_DTQS22DDP101A_SS
62else ifeq ($(fe_sbs), y)
63CFLAGS += -D_FE_DTQS22DDP101B_SS
64else ifeq ($(fe_lgs), y)
65CFLAGS += -D_FE_LGH952F_SS
66else
67
68endif
69
70
71#
72# Source files
73#
74DHL_SRC :=  # just to emphasize in source insight's syntax-highliting
75DHL_SRC += \
76        DHL_OSAL.c      \
77        DHL_OSAL_Print.c        \
78        DHL_DBG.c       \
79        DHL_DBG_Print.c \
80        DHL_DBG_Shell.c \
81        DHL_DBG_Symbols.c       \
82        DHL_UTL.c       \
83        DHL_Timer.c     \
84        DHL_SYS.c       \
85        DHL_DEV_Platform.c      \
86        DHL_FE.c        \
87        DHL_FE_Platform.c       \
88        DHL_Demux.c     \
89        DHL_AVCAP.c     \
90        DHL_PSI.c       \
91        DHL_PSI_Impl.c  \
92        DHL_PSI_Rx.c    \
93        DHL_Graphic.c   \
94        DHL_Graphic_Platform.c  \
95        DHL_UIO.c       \
96        DHL_UIO_Platform.c      \
97        DHL_NVM.c       \
98        DHL_COM.c       \
99        DHL_Main.c
100       
101
102ifeq ($(fe_sal), y)
103DHL_SRC += \
104        DHL_FE_Platform_dtqs22ddp101a.c \
105        SemcoMXL201.c   \
106        MxL201RF_API.c  \
107        MxL201RF.c      \
108        MxL_User_Define.c       \
109        UserDefinedIIC.c        \
110        DHL_FE_Platform_lg3305.c        \
111        LG3305.c       
112       
113       
114else ifeq ($(fe_sbl), y)
115DHL_SRC += \
116        DHL_FE_Platform_dtqs22ddp101b.c \
117        MxL601_OEM_Drv.c        \
118        MxL601_TunerApi.c       \
119        MxL601_TunerCfg.c       \
120        MxL601_TunerSpurTable.c \
121        SemcoMxL601.c   \
122        UserDefinedIIC2.c       \
123        DHL_FE_Platform_lg3305.c        \
124        LG3305.c
125
126else ifeq ($(fe_lgl), y)
127DHL_SRC += \
128        DHL_FE_Platform_lgh952f.c       \
129        DHL_FE_Platform_lg3305.c        \
130        LG3305.c
131
132else ifeq ($(fe_sas), y)
133DHL_SRC += \
134        DHL_FE_Platform_dtqs22ddp101a.c \
135        SemcoMXL201.c   \
136        MxL201RF_API.c  \
137        MxL201RF.c      \
138        MxL_User_Define.c       \
139        UserDefinedIIC.c        \
140        DHL_FE_Platform_s5h1411.c       \
141        S5H1411.c               
142
143else ifeq ($(fe_sbs), y)
144DHL_SRC += \
145        DHL_FE_Platform_dtqs22ddp101b.c \
146        MxL601_OEM_Drv.c        \
147        MxL601_TunerApi.c       \
148        MxL601_TunerCfg.c       \
149        MxL601_TunerSpurTable.c \
150        SemcoMxL601.c   \
151        UserDefinedIIC2.c       \
152        DHL_FE_Platform_s5h1411.c       \
153        S5H1411.c
154
155else ifeq ($(fe_lgs), y)
156DHL_SRC += \
157        DHL_FE_Platform_lgh952f.c       \
158        DHL_FE_Platform_s5h1411.c       \
159        S5H1411.c
160
161else
162
163endif
164
165
166# cafrii bugfix. relative path should be based on source code. so, use absolute path.
167SRC_DIR += \
168        $(DHL_DIR)/src  \
169        $(DHL_DIR)/src/devices/lg3305   \
170        $(DHL_DIR)/src/devices/dtqs22ddp101a    \
171        $(DHL_DIR)/src/devices/dtqs22ddp101b    \
172        $(DHL_DIR)/src/devices/S5H1411
173
174
175INC_DIRS +=     \
176        $(DRIVER_ROOT)/ecos/ecos_k1_34kf_net_fileio_posix_fat_c++_mipsisa32_552/include \
177        $(DRIVER_ROOT)/cus_mstar/project/mstar_demo     \
178        $(DRIVER_ROOT)/cus_mstar/project/mstar_demo/include     \
179        $(DRIVER_ROOT)/cus_mstar/project/mstar_demo/include/chip        \
180        $(DRIVER_ROOT)/cus_mstar/platform/driver/iic    \
181        $(DRIVER_ROOT)/cus_mstar/platform/driver/emac   \
182        $(DRIVER_ROOT)/cus_mstar/platform/driver/pad    \
183        $(DRIVER_ROOT)/cus_mstar/platform/driver/FrontPnl       \
184        $(DRIVER_ROOT)/cus_mstar/platform/driver/IR     \
185        $(DRIVER_ROOT)/cus_mstar/platform/driver/scart  \
186        $(DRIVER_ROOT)/cus_mstar/platform/driver/demod  \
187        $(DRIVER_ROOT)/cus_mstar/platform/driver/frontend       \
188        $(DRIVER_ROOT)/cus_mstar/platform/driver/driver/frontend/inc    \
189        $(DRIVER_ROOT)/cus_mstar/platform/driver/frontend/MxL5007T_API_Files_V4.1.3     \
190        $(DRIVER_ROOT)/cus_mstar/platform/driver/frontend/tmbslTDA18250/src     \
191        $(DRIVER_ROOT)/cus_mstar/platform/driver/frontend/tmbslTDA18250/inc     \
192        $(DRIVER_ROOT)/cus_mstar/platform/driver/frontend/tmddTDA18250/inc      \
193        $(DRIVER_ROOT)/cus_mstar/platform/driver/frontend/tmddTDA18250/src      \
194        $(DRIVER_ROOT)/cus_mstar/platform/driver/frontend/MXL201RF      \
195        $(DRIVER_ROOT)/cus_mstar/platform/driver/frontend/NT220x/inc    \
196        $(DRIVER_ROOT)/cus_mstar/platform/driver/frontend/NT220x/tmbslNT220x/inc        \
197        $(DRIVER_ROOT)/cus_mstar/platform/driver/frontend/DIB8096       \
198        $(DRIVER_ROOT)/cus_mstar/platform/driver/pq/include     \
199        $(DRIVER_ROOT)/cus_mstar/platform/driver/pq/hal/k1_mstar/include        \
200        $(DRIVER_ROOT)/cus_mstar/api/vdec       \
201        $(DRIVER_ROOT)/cus_mstar/api/xc \
202        $(DRIVER_ROOT)/cus_mstar/api/gpio       \
203        $(DRIVER_ROOT)/cus_mstar/api/frontend   \
204        $(DRIVER_ROOT)/cus_mstar/api/lan        \
205        $(DRIVER_ROOT)/cus_mstar/api/XML/expat-2.0.1    \
206        $(DRIVER_ROOT)/cus_mstar/app/demo       \
207        $(DRIVER_ROOT)/bsp/include      \
208        $(DRIVER_ROOT)/bsp/lib/fw       \
209        $(DHL_DIR)/api/include  \
210        $(DLIB_DIR)/src/PNG     \
211        $(DLIB_DIR)/src/uiofilter
212
213
214# SRC_DIR °ú INC_DIRS¸¦ ±¸ºÐÇØ¼­ »ç¿ëÇÑ´Ù.
215# SRC_DIRÀº VPATH ¿¡ Ãß°¡µÇ°í, INC_DIRS´Â CFLAGS ¿¡ -Ixx ¿Í °°Àº ÇüÅ·ΠÃß°¡µÈ´Ù.
216#
217
218VPATH = $(SRC_DIR)
219
220#vpath %.h $(VPATH)
221#vpath %.c $(VPATH)
222#vpath %.S $(VPATH)
223
224
225CFLAGS += $(addprefix -I,$(SRC_DIR)) $(addprefix -I,$(INC_DIRS))
226
227DHL_OBJS = $(foreach DHL_SRC, $(DHL_SRC), $(OBJ_DIR)/$(notdir $(DHL_SRC:.c=.o)))
228
229
230#
231# The targets
232#
233.PHONY : all dhl clean clean-dhl
234
235
236all : dhl
237
238
239
240# skip showing cflags for simple output.
241dhl : checkobjdir $(DHL_OBJS) #show_cflags
242        $(Q_)$(ECHO) "++++++++ Archiving \"$(notdir $(TARGET))\" Library"
243        $(Q_)rm -f $(TARGET)
244        $(Q_)$(AR) crus $(TARGET) $(DHL_OBJS)
245
246show_cflags :
247        $(Q_)$(ECHO) CFLAGS = $(filter-out -I% -D%, $(CFLAGS))
248
249$(OBJ_DIR)/%.o: %.c
250        $(CC) $(CFLAGS) -c $< -o $@
251#       $(Q_)$(CCDV) $(CC) $(CFLAGS) -c $< -o $@
252# dependency¸¦ Çѹø¿¡ ¸¸µé¾îÁÖÁö ¸øÇϹǷÎ, º°µµÀÇ cc ÀÛ¾÷À» ÅëÇØ .d ÆÄÀÏ »ý¼ºÇÑ´Ù.
253# armcc °¡ »ý¼ºÇÑ rule¿¡´Â ¸ðµÎ backslash°¡ »ç¿ëµÇ¾î¼­ À̸¦ slash·Î Ä¡È¯ÇØÁà¾ß ÇÔ.
254# ccdv°¡ °É·¯Áá´ø ¸Þ½ÃÁö°¡ ¿©±â¼­´Â º¸ÀÏ ¼ö ÀÖÀ½. stderr Ãâ·ÂÀº º¸ÀÌÁö ¾Êµµ·Ï ¸·ÀÚ.
255#       $(Q_)$(CC) -M $(CFLAGS) -c $< -o $@ 2> /dev/null | sed 's,\\,/,g' > $(patsubst %.o,%.d,$@)
256
257clean clean-dhl:
258        $(Q_)$(RM) -f $(TARGET) $(OBJ_DIR)/*.o $(OBJ_DIR)/*.d $(OBJ_DIR)/*.map $(OBJ_DIR)/*~ core $(OBJ_DIR)/*.elf $(OBJ_DIR)/*.bin $(OBJ_DIR)/*.dis $(OBJ_DIR)/*.lst
259        $(Q_)$(RM) -f $(CONFIG_TMP)
260
261checkobjdir:
262        $(Q_)test -d $(OBJ_DIR) || (echo "mkdir $(OBJ_DIR)"; mkdir -p $(OBJ_DIR))
263        $(Q_)test -d $(TOP_DIR)/obj || (echo "mkdir $(TOP_DIR)/obj"; mkdir -p $(TOP_DIR)/obj)
264
265
266#
267# Include all the depends
268#
269-include $(OBJ_DIR)/*.d
270
271
Note: See TracBrowser for help on using the repository browser.