| 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 $(SOFT_GFX_LIB_DIR)/b_softgfx_lib.inc |
|---|
| 25 | |
|---|
| 26 | CFLAGS += \ |
|---|
| 27 | $(addprefix -I,$(B_SOFTGFX_LIB_PUBLIC_INCLUDES)) \ |
|---|
| 28 | $(addprefix -D,$(B_SOFTGFX_LIB_DEFINES)) |
|---|
| 29 | |
|---|
| 30 | CFLAGS += -DB_OS_UCOS_II -DB_HAS_SOFT_GFX |
|---|
| 31 | CFLAGS += -DBCM_DEBUG |
|---|
| 32 | |
|---|
| 33 | |
|---|
| 34 | |
|---|
| 35 | # |
|---|
| 36 | # Optionaly build the settop api library and nexus os library |
|---|
| 37 | # |
|---|
| 38 | |
|---|
| 39 | ifeq ($(BUILD_SOFT_GFX),y) |
|---|
| 40 | |
|---|
| 41 | |
|---|
| 42 | CFLAGS += \ |
|---|
| 43 | $(addprefix -I,$(B_OS_LIB_PRIVATE_INCLUDES)) \ |
|---|
| 44 | $(addprefix -I,$(B_SOFTGFX_LIB_PRIVATE_INCLUDES)) |
|---|
| 45 | |
|---|
| 46 | |
|---|
| 47 | B_SOFTGFX_LIB_OBJECTS = $(patsubst %.c,%.o,$(filter %.c,$(B_SOFTGFX_LIB_SOURCES))) $(patsubst %.S,%.o,$(filter %.S,$(B_SOFTGFX_LIB_SOURCES))) |
|---|
| 48 | |
|---|
| 49 | B_SOFTGFX_LIB_DEPENDS = $(B_SOFTGFX_LIB_OBJECTS:.o=.d) |
|---|
| 50 | |
|---|
| 51 | all: $(LIBDIR)/libsoft_gfx.a |
|---|
| 52 | |
|---|
| 53 | $(LIBDIR)/libsoft_gfx.a: $(B_SOFTGFX_LIB_OBJECTS) $(LIBDIR)/libsoft_gfx.a($(B_SOFTGFX_LIB_OBJECTS)) |
|---|
| 54 | |
|---|
| 55 | clean : clean_soft_gfx |
|---|
| 56 | |
|---|
| 57 | clean_soft_gfx: |
|---|
| 58 | $(RM) -f $(LIBDIR)/libsoft_gfx.a $(B_SOFTGFX_LIB_OBJECTS) $(B_SOFTGFX_LIB_DEPENDS) |
|---|
| 59 | |
|---|
| 60 | |
|---|
| 61 | -include $(B_SOFTGFX_LIB_DEPENDS) |
|---|
| 62 | |
|---|
| 63 | endif |
|---|