| 1 | |
|---|
| 2 | ifeq ($(MAKELEVEL),1) |
|---|
| 3 | # Base flags and variables for all modules |
|---|
| 4 | include platform.inc |
|---|
| 5 | endif |
|---|
| 6 | |
|---|
| 7 | LIBDIR := $(shell cd ../lib ; /bin/pwd) |
|---|
| 8 | DTADIR := $(shell cd ../src ; /bin/pwd) |
|---|
| 9 | NEXUS_TOP := $(shell cd ../../nexus ; /bin/pwd) |
|---|
| 10 | BSEAV_TOP := $(shell cd ../../BSEAV ; /bin/pwd) |
|---|
| 11 | BSEAV_LIB_DIR := $(BSEAV_TOP)/lib |
|---|
| 12 | B_LIB_TOP := $(NEXUS_TOP)/lib |
|---|
| 13 | B_OS_LIB_DIR := $(B_LIB_TOP)/os |
|---|
| 14 | SOFT_GFX_LIB_DIR := $(B_LIB_TOP)/softgfx |
|---|
| 15 | BSEAV_BLD_DIR := $(BSEAV_TOP)/api/build/nexus |
|---|
| 16 | BSEAV_SRC_DIR := $(BSEAV_TOP)/api/src/nexus |
|---|
| 17 | BSEAV_INC_DIR := $(BSEAV_TOP)/api/include |
|---|
| 18 | BSEAV_OS_INC_DIR := $(BSEAV_TOP)/api/include/$(OS) |
|---|
| 19 | |
|---|
| 20 | # |
|---|
| 21 | # Include nexus OS library required by settop API |
|---|
| 22 | # |
|---|
| 23 | |
|---|
| 24 | include $(B_OS_LIB_DIR)/b_os_lib.inc |
|---|
| 25 | include $(BSEAV_LIB_DIR)/bfile/bfile.inc |
|---|
| 26 | |
|---|
| 27 | CFLAGS += \ |
|---|
| 28 | $(addprefix -I,$(B_OS_LIB_PUBLIC_INCLUDES)) \ |
|---|
| 29 | $(addprefix -I,$(BFILE_INCLUDES)) \ |
|---|
| 30 | $(addprefix -D,$(B_OS_LIB_DEFINES)) |
|---|
| 31 | |
|---|
| 32 | CFLAGS += -DB_OS_UCOS_II -DB_HAS_SOFT_GFX |
|---|
| 33 | CFLAGS += -DBCM_BOARD_STR=\"\" |
|---|
| 34 | |
|---|
| 35 | |
|---|
| 36 | # |
|---|
| 37 | # Optionaly build the settop api library and nexus os library |
|---|
| 38 | # |
|---|
| 39 | |
|---|
| 40 | ifeq ($(BUILD_SETTOP_API),y) |
|---|
| 41 | |
|---|
| 42 | SETTOP_API_SOURCES = \ |
|---|
| 43 | $(BSEAV_BLD_DIR)/bsettop_autogen_thunks.c \ |
|---|
| 44 | $(BSEAV_SRC_DIR)/bsettop_audio_capture.c \ |
|---|
| 45 | $(BSEAV_SRC_DIR)/bsettop.c \ |
|---|
| 46 | $(BSEAV_SRC_DIR)/bsettop_cipher.c \ |
|---|
| 47 | $(BSEAV_SRC_DIR)/bsettop_compat.c \ |
|---|
| 48 | $(BSEAV_SRC_DIR)/bsettop_config.c \ |
|---|
| 49 | $(BSEAV_SRC_DIR)/bsettop_crypto.c \ |
|---|
| 50 | $(BSEAV_SRC_DIR)/bsettop_decode.c \ |
|---|
| 51 | $(BSEAV_SRC_DIR)/bsettop_display.c \ |
|---|
| 52 | $(BSEAV_SRC_DIR)/bsettop_encode.c \ |
|---|
| 53 | $(BSEAV_SRC_DIR)/bsettop_graphics.c \ |
|---|
| 54 | $(BSEAV_SRC_DIR)/bsettop_ip.c \ |
|---|
| 55 | $(BSEAV_SRC_DIR)/bsettop_keyslot_priv.c \ |
|---|
| 56 | $(BSEAV_SRC_DIR)/bsettop_message.c \ |
|---|
| 57 | $(BSEAV_SRC_DIR)/bsettop_os.c \ |
|---|
| 58 | $(BSEAV_SRC_DIR)/bsettop_pcm_capture.c \ |
|---|
| 59 | $(BSEAV_SRC_DIR)/bsettop_pcm_playback.c \ |
|---|
| 60 | $(BSEAV_SRC_DIR)/bsettop_smartcard.c \ |
|---|
| 61 | $(BSEAV_SRC_DIR)/bsettop_stream.c \ |
|---|
| 62 | $(BSEAV_SRC_DIR)/bsettop_stream_encryption.c \ |
|---|
| 63 | $(BSEAV_SRC_DIR)/bsettop_transcode.c \ |
|---|
| 64 | $(BSEAV_SRC_DIR)/bsettop_tuner.c \ |
|---|
| 65 | $(BSEAV_SRC_DIR)/bsettop_user_io.c \ |
|---|
| 66 | $(BSEAV_SRC_DIR)/bsettop_vbi.c \ |
|---|
| 67 | $(BSEAV_SRC_DIR)/bsettop_pvr.c \ |
|---|
| 68 | $(BSEAV_SRC_DIR)/bsettop_recpump.c |
|---|
| 69 | |
|---|
| 70 | B_OS_LIB_SOURCES += $(SETTOP_API_SOURCES) $(BFILE_SOURCES) |
|---|
| 71 | |
|---|
| 72 | CFLAGS += -I$(BSEAV_SRC_DIR) -I$(BSEAV_INC_DIR) -I$(BSEAV_OS_INC_DIR) -I$(BSEAV_SRC_DIR)/board -I$(BSEAV_BLD_DIR) |
|---|
| 73 | |
|---|
| 74 | CFLAGS += $(addprefix -I,$(B_OS_LIB_PRIVATE_INCLUDES)) |
|---|
| 75 | |
|---|
| 76 | CFLAGS += -DB_HAS_FCC |
|---|
| 77 | |
|---|
| 78 | B_OS_LIB_OBJECTS = $(patsubst %.c,%.o,$(filter %.c,$(B_OS_LIB_SOURCES))) $(patsubst %.S,%.o,$(filter %.S,$(B_OS_LIB_SOURCES))) |
|---|
| 79 | |
|---|
| 80 | B_OS_LIB_DEPENDS = $(B_OS_LIB_OBJECTS:.o=.d) |
|---|
| 81 | |
|---|
| 82 | all: $(LIBDIR)/libb_os.a |
|---|
| 83 | |
|---|
| 84 | $(LIBDIR)/libb_os.a: $(B_OS_LIB_OBJECTS) $(LIBDIR)/libb_os.a($(B_OS_LIB_OBJECTS)) |
|---|
| 85 | |
|---|
| 86 | clean : clean_b_os thunk-clean |
|---|
| 87 | |
|---|
| 88 | clean_b_os: |
|---|
| 89 | $(RM) -f $(LIBDIR)/libb_os.a $(B_OS_LIB_OBJECTS) $(B_OS_LIB_DEPENDS) |
|---|
| 90 | |
|---|
| 91 | |
|---|
| 92 | $(BSEAV_BLD_DIR)/bsettop_autogen_thunks.c: $(BSEAV_INC_DIR)/bsettop_display.h $(BSEAV_INC_DIR)/bsettop_message.h $(BSEAV_INC_DIR)/bsettop_types.h $(BSEAV_INC_DIR)/bsettop_cipher.h $(BSEAV_INC_DIR)/bsettop_encode.h $(BSEAV_INC_DIR)/bsettop_pcm.h $(BSEAV_INC_DIR)/bsettop_smartcard.h $(BSEAV_INC_DIR)/bsettop_user_io.h $(BSEAV_INC_DIR)/bsettop_config.h $(BSEAV_INC_DIR)/bsettop_graphics.h $(BSEAV_INC_DIR)/bsettop_stream.h $(BSEAV_INC_DIR)/bsettop_vbi.h $(BSEAV_INC_DIR)/bsettop_decode.h $(BSEAV_INC_DIR)/bsettop.h $(BSEAV_INC_DIR)/bsettop_tuner.h $(BSEAV_INC_DIR)/bsettop_mem.h |
|---|
| 93 | |
|---|
| 94 | @echo "[Thunk... bsettop]" |
|---|
| 95 | @$(PERL) -x$(BSEAV_BLD_DIR) $(BSEAV_BLD_DIR)/bapi_build.pl $^ |
|---|
| 96 | # @$(PERL) -I$(BSEAV_BLD_DIR) $(BSEAV_BLD_DIR)/bapi_build.pl $^ |
|---|
| 97 | |
|---|
| 98 | $(BSEAV_BLD_DIR)/bsettop_autogen_thunks.h: $(BSEAV_BLD_DIR)/bsettop_autogen_thunks.c |
|---|
| 99 | |
|---|
| 100 | thunk-clean: |
|---|
| 101 | @$(RM) $(BSEAV_BLD_DIR)/bsettop_autogen_thunks.* |
|---|
| 102 | |
|---|
| 103 | |
|---|
| 104 | -include $(B_OS_LIB_DEPENDS) |
|---|
| 105 | |
|---|
| 106 | endif |
|---|