makefile
上传用户:fy98168
上传日期:2015-06-26
资源大小:13771k
文件大小:4k
- APP_NAME := kbapps
- CA_PROVIDER := novel
- APP_DIR_NAME := apps
- KB_SRC_DIR := $(STiDevROOT)/kbapps
- BUILD_DIR := $(STiDevROOT)/kbapps/exec
- CA_LIB :=$(STiDevROOT)/kbapps/ca/$(CA_PROVIDER)/lib
- NET_LIB :=$(STiDevROOT)/kbapps/lib
- DVD_MAKE_VERSION := 2
- APP_OBJS := main.tco
- KB_APP_MODULES := db sipsi search epg
- timeclock nvod demand
- osp system flash errors i2c timer
- dmd osd dmx av fp
- sysserv irrc5
- machblue dc net xml SysPower swf watch
- KB_DB_MODULE :=
- ifeq (,$(filter exec, $(notdir $(CURDIR))))
- include $(DVD_MAKE)/environment.mak
- .PHONY: NEW_BUILD clean run debug
- NEW_BUILD:
- +@$(MAKE) -C $(BUILD_DIR) -f $(CURDIR)/makefile all
- run:
- +@$(MAKE) -C $(BUILD_DIR) -f $(CURDIR)/makefile all run
-
- debug:
- +@$(MAKE) -C $(BUILD_DIR) -f $(CURDIR)/makefile all debug
-
- clean:
- -$(RM) $(STiDevROOT)kbappsexec*.tco
- -$(RM) $(STiDevROOT)kbappsexec*.lku
- -$(RM) $(STiDevROOT)kbappsexec*.dbg
- -$(RM) $(STiDevROOT)kbappsexec*.map
- -$(RM) $(STiDevROOT)kbappsexec*.lib
- -$(RM) $(STiDevROOT)kbappsexec*.hex
- -$(RM) $(STiDevROOT)kbappsexec*.bin
- else
- include $(DVD_MAKE)/generic.mak
- TARGETS := $(APP_NAME).lku
-
- vpath %.lib $(DVD_EXPORTS) $(DB_LIB) $(CA_LIB) $(NET_LIB)
-
- ST20_LKFLAGS = -M $(BUILD_DIR)/$(basename $@).map
-
- CFLAGS := $(CFLAGS) $(OPTIONAL_CFLAGS) -cpp
- CFLAGS += -DSTTBX_PRINT -DSTTBX_REPORT
- ifeq "$(DVD_IO)" "UART"
- CFLAGS += -DREPORT_TO_UART
- else
- ifeq "$(DVD_IO)" "DEBUG"
- CFLAGS += -DREPORT_TO_UART -DREPORT_TO_CONSOLE
- else
- CFLAGS += -DREPORT_TO_CONSOLE
- endif
- endif
-
- CFLAGS += $(BACK_BUFFERING)
- CFLAGS += $(OPTIONAL_CFLAGS)
- CFLAGS += -DDEFAULT_INSTANCE=0
- include $(DVD_MAKE)/defrules.mak
- flash_INIT := board_init_hex
- flash_LKFLAGS:= -romimage
- image_INIT := board_init_hex
- image_LKFLAGS:= -romimage -filled -off binary
- INCLUDES += -I $(KB_SRC_DIR)/$(APP_DIR_NAME)
- INCLUDES += -I $(KB_SRC_DIR)/$(APP_DIR_NAME)/include
- INCLUDES += -I $(KB_SRC_DIR)/$(APP_DIR_NAME)/include/os20
-
- INCLUDE_PATH += $(STiDevROOT)/kbapps/apps/machblue/include/machblue
- INCLUDE_PATH += $(STiDevROOT)/kbapps/apps/machblue/include/keybridge
-
- INCLUDE_PATH += $(STiDevROOT)/kbapps/apps/dc/inc
- INCLUDE_PATH += $(STiDevROOT)/kbapps/apps/watch/inc
- INCLUDE_PATH += $(STiDevROOT)/kbapps/apps/ota
- INCLUDE_PATH += $(STiDevROOT)/kbapps/apps/swf
-
-
- VPATH += $(KB_SRC_DIR)/$(APP_DIR_NAME)
- ifneq (,$(KB_APP_MODULES))
- KB_APP_DIR := $(KB_SRC_DIR)/$(APP_DIR_NAME)
- KB_APP_SRC := $(foreach src,$(KB_APP_MODULES),$(findstring $(src),$(wildcard $(KB_APP_DIR)/$(src)/*.mk)))
- KB_APP_LIB := $(filter-out $(KB_APP_SRC), $(KB_APP_MODULES))
- VPATH += $(KB_APP_SRC:%=$(KB_APP_DIR)/%)
- INCLUDES += -I $(KB_APP_DIR)/include
- -include $(foreach src,$(KB_APP_SRC),$(KB_APP_DIR)/$(src)/$(src).mk)
- endif
- KB_APP_LIBS := $(addsuffix .lib,$(KB_APP_MODULES))
- ifneq (,$(CA_PROVIDER))
- CA_USER_LIBS := ca_$(CA_PROVIDER).lib
- CA_DRV_LIBS := ca_drv.lib
- # CA_USER_SRC := $(findstring ca_$(CA_PROVIDER),$(wildcard $(KB_APP_DIR)/ca_$(CA_PROVIDER)/*.mk))
- CA_DRV_SRC := $(findstring ca_drv,$(wildcard $(KB_SRC_DIR)/ca/$(CA_PROVIDER)/ca_drv/*.mk))
- ifneq (,$(CA_USER_SRC))
- -include $(KB_APP_DIR)/ca_$(CA_PROVIDER)/ca_$(CA_PROVIDER).mk
- VPATH += $(KB_APP_DIR)/ca_$(CA_PROVIDER)
- endif
- ifneq (,$(CA_DRV_SRC))
- -include $(KB_SRC_DIR)/ca/$(CA_PROVIDER)/ca_drv/ca_drv.mk
- VPATH += $(KB_SRC_DIR)/ca/$(CA_PROVIDER)/ca_drv
- endif
- INCLUDES += -I $(KB_SRC_DIR)/ca/$(CA_PROVIDER)/include
- endif
- KBLIBS = $(APP_NAME).lib $(KB_API_LIBS) $(KB_APP_LIBS) $(CA_DRV_LIBS) $(CA_USER_LIBS) stapi_$(DVD_TRANSPORT).lib
- KBLIBS += stflash.lib machblue_player.lib tcpip.lib
- .PHONY:show_variables
- show_variables:
- .PHONY:all
- all:show_summery $(APP_NAME).lku flash.hex image.bin
- %.lku : $(KBLIBS)
- $(LINK_EXECUTABLE)
- flash.hex: initfuncs.tco $(KBLIBS)
- $(LINK_EXECUTABLE)
- image.bin: initfuncs.tco $(KBLIBS)
- $(LINK_EXECUTABLE)
- $(APP_NAME).lib: $(APP_OBJS)
- $(BUILD_LIBRARY)
- .PHONY: show_summery
- show_summery:
- endif
- # EOF