summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSylvain Munaut <tnt@246tNt.com>2012-12-10 20:50:53 +0100
committerSylvain Munaut <tnt@246tNt.com>2013-01-02 20:44:11 +0100
commit3ee1beb8bf4c1ca87c88d12a8cd1f24d096aee88 (patch)
tree7e4acf158e7bb4a279e6fe915808685db7050dad
parentd9f6921c020af4c53d6507ed271886e24855a5df (diff)
fw/build: Add ENV_ APP_ BOARD_ prefix to variables to cleanup namespace
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
-rw-r--r--src/target/firmware/Makefile40
-rw-r--r--src/target/firmware/Makefile.inc38
-rw-r--r--src/target/firmware/calypso/Makefile4
-rw-r--r--src/target/firmware/comm/Makefile4
-rw-r--r--src/target/firmware/layer1/Makefile8
-rw-r--r--src/target/firmware/lib/Makefile4
6 files changed, 49 insertions, 49 deletions
diff --git a/src/target/firmware/Makefile b/src/target/firmware/Makefile
index 8faaca7..e8b1114 100644
--- a/src/target/firmware/Makefile
+++ b/src/target/firmware/Makefile
@@ -6,17 +6,17 @@
# Environments
#
-compalram_LDS=board/compal/ram.lds
-compalram_OBJS=board/compal/start.ram.o board/compal/exceptions_redirected.o board/compal/handlers.o
+ENV_compalram_LDS=board/compal/ram.lds
+ENV_compalram_OBJS=board/compal/start.ram.o board/compal/exceptions_redirected.o board/compal/handlers.o
-highram_LDS=board/compal/highram.lds
-highram_OBJS=board/compal/start.ram.o board/compal/exceptions_redirected.o board/compal/handlers.o
+ENV_highram_LDS=board/compal/highram.lds
+ENV_highram_OBJS=board/compal/start.ram.o board/compal/exceptions_redirected.o board/compal/handlers.o
-e88loader_LDS=board/compal_e88/loader.lds
-e88loader_OBJS=board/compal/start.rom.o board/compal/header.o board/compal/exceptions_redirect.o
+ENV_e88loader_LDS=board/compal_e88/loader.lds
+ENV_e88loader_OBJS=board/compal/start.rom.o board/compal/header.o board/compal/exceptions_redirect.o
-e88flash_LDS=board/compal_e88/flash.lds
-e88flash_OBJS=board/compal/start.rom.o board/compal/header.o board/compal/exceptions_redirected.o board/compal/handlers.o
+ENV_e88flash_LDS=board/compal_e88/flash.lds
+ENV_e88flash_OBJS=board/compal/start.rom.o board/compal/header.o board/compal/exceptions_redirected.o board/compal/handlers.o
#
@@ -41,16 +41,16 @@ FB_dummy_OBJS=$(FB_OBJS) fb/fb_dummy.o
calypso_COMMON_OBJS=board/common/calypso_uart.o board/common/calypso_pwl.o
# OpenMoko GTA0x
-gta0x_OBJS=$(calypso_COMMON_OBJS) board/gta0x/init.o \
+BOARD_gta0x_OBJS=$(calypso_COMMON_OBJS) board/gta0x/init.o \
board/gta0x/rffe_gta0x_triband.o board/gta0x/rf_power.o \
battery/dummy.o $(FB_dummy_OBJS)
-gta0x_ENVIRONMENTS=highram
+BOARD_gta0x_ENVIRONMENTS=highram
# Pirelli DP-L10
-pirelli_dpl10_OBJS=$(calypso_COMMON_OBJS) board/pirelli_dpl10/init.o \
+BOARD_pirelli_dpl10_OBJS=$(calypso_COMMON_OBJS) board/pirelli_dpl10/init.o \
board/pirelli_dpl10/rffe_dpl10_triband.o board/pirelli_dpl10/rf_power.o \
battery/dummy.o $(FB_dpl10_OBJS)
-pirelli_dpl10_ENVIRONMENTS=highram
+BOARD_pirelli_dpl10_ENVIRONMENTS=highram
# Compal Generic
compal_COMMON_OBJS=$(calypso_COMMON_OBJS) \
@@ -58,25 +58,25 @@ compal_COMMON_OBJS=$(calypso_COMMON_OBJS) \
compal_COMMON_ENVIRONMENTS=compalram highram
# Compal E88
-compal_e88_OBJS=$(compal_COMMON_OBJS) board/compal_e88/init.o \
+BOARD_compal_e88_OBJS=$(compal_COMMON_OBJS) board/compal_e88/init.o \
battery/compal_e88.o $(FB_e88_OBJS)
-compal_e88_ENVIRONMENTS=$(compal_COMMON_ENVIRONMENTS) e88loader e88flash
+BOARD_compal_e88_ENVIRONMENTS=$(compal_COMMON_ENVIRONMENTS) e88loader e88flash
# Compal E86 (has a different RFFE configuration)
-compal_e86_OBJS=$(calypso_COMMON_OBJS) board/compal_e86/init.o \
+BOARD_compal_e86_OBJS=$(calypso_COMMON_OBJS) board/compal_e86/init.o \
board/compal_e86/rffe_dualband_e86.o board/compal/rf_power.o \
battery/dummy.o $(FB_e86_OBJS)
-compal_e86_ENVIRONMENTS=$(compal_COMMON_ENVIRONMENTS)
+BOARD_compal_e86_ENVIRONMENTS=$(compal_COMMON_ENVIRONMENTS)
# Compal E99
-compal_e99_OBJS=$(compal_COMMON_OBJS) board/compal_e99/init.o \
+BOARD_compal_e99_OBJS=$(compal_COMMON_OBJS) board/compal_e99/init.o \
battery/dummy.o $(FB_e99_OBJS)
-compal_e99_ENVIRONMENTS=$(compal_COMMON_ENVIRONMENTS)
+BOARD_compal_e99_ENVIRONMENTS=$(compal_COMMON_ENVIRONMENTS)
# Sony Ericsson J100 (made by Compal)
-se_j100_OBJS=$(compal_COMMON_OBJS) board/se_j100/init.o \
+BOARD_se_j100_OBJS=$(compal_COMMON_OBJS) board/se_j100/init.o \
battery/dummy.o $(FB_j100_OBJS)
-se_j100_ENVIRONMENTS=$(compal_COMMON_ENVIRONMENTS)
+BOARD_se_j100_ENVIRONMENTS=$(compal_COMMON_ENVIRONMENTS)
#
diff --git a/src/target/firmware/Makefile.inc b/src/target/firmware/Makefile.inc
index 844da69..cb2374e 100644
--- a/src/target/firmware/Makefile.inc
+++ b/src/target/firmware/Makefile.inc
@@ -78,7 +78,7 @@ default: all
define APPLICATION_BOARD_ENVIRONMENT_template
# define set of objects for this binary
-$(1)_$(2)_$(3)_OBJS := apps/$(1)/main.o $(ANY_APP_OBJS) $$($(1)_OBJS) $$($(2)_OBJS) $$($(3)_OBJS)
+$(1)_$(2)_$(3)_OBJS := apps/$(1)/main.o $(ANY_APP_OBJS) $$(APP_$(1)_OBJS) $$(BOARD_$(2)_OBJS) $$(ENV_$(3)_OBJS)
$(1)_$(2)_$(3)_LIBS := $(ANY_APP_LIBS)
# define manifest compilation
@@ -93,8 +93,8 @@ board/$(2)/$(1).$(3).manifest.p: board/manifest.c
$(1)_$(2)_$(3)_OBJS+=board/$(2)/$(1).$(3).manifest.o
# define compilation rule, also generates map file
-board/$(2)/$(1).$(3).elf board/$(2)/$(1).$(3).map: $$($(1)_$(2)_$(3)_OBJS) $$($(1)_$(2)_$(3)_LIBS) $$($(3)_LDS)
- $$(Q_LD)$(CROSS_COMPILE)$(LD) $(LDFLAGS) -T $$($(3)_LDS) -Bstatic \
+board/$(2)/$(1).$(3).elf board/$(2)/$(1).$(3).map: $$($(1)_$(2)_$(3)_OBJS) $$($(1)_$(2)_$(3)_LIBS) $$(ENV_$(3)_LDS)
+ $$(Q_LD)$(CROSS_COMPILE)$(LD) $(LDFLAGS) -T $$(ENV_$(3)_LDS) -Bstatic \
-Map board/$(2)/$(1).$(3).map -o board/$(2)/$(1).$(3).elf \
--start-group $$($(1)_$(2)_$(3)_OBJS) $$($(1)_$(2)_$(3)_LIBS) --end-group
@@ -108,33 +108,33 @@ ALL_OBJS+=board/$(2)/$(1).$(3).manifest.o
endef
define BOARD_template
-ALL_OBJS+=$$($(1)_OBJS)
+ALL_OBJS+=$$(BOARD_$(1)_OBJS)
endef
define BOARD_ENVIRONMENT_template
-ALL_OBJS+=$$($(1)_OBJS)
+ALL_OBJS+=$$(ENV_$(1)_OBJS)
endef
define APPLICATION_template
-$(1)_SRCS_REL=$$(patsubst %,$$($(1)_DIR)/%,$$($(1)_SRCS))
-$(1)_OBJS:=$$($(1)_SRCS_REL:.c=.o)
-$(1)_OBJS:=$$($(1)_OBJS:.S=.o)
+APP_$(1)_SRCS_REL=$$(patsubst %,$$(APP_$(1)_DIR)/%,$$(APP_$(1)_SRCS))
+APP_$(1)_OBJS:=$$(APP_$(1)_SRCS_REL:.c=.o)
+APP_$(1)_OBJS:=$$(APP_$(1)_OBJS:.S=.o)
-ALL_OBJS+=$$($(1)_OBJS) apps/$(1)/main.o
+ALL_OBJS+=$$(APP_$(1)_OBJS) apps/$(1)/main.o
endef
# define rules for all defined applications
$(foreach brd,$(BOARDS), \
$(eval $(call BOARD_template,$(brd)) \
- $(foreach env,$($(brd)_ENVIRONMENTS), \
- $(eval $(call BOARD_ENVIRONMENT_template,$(env))))))
+ $(foreach env,$(BOARD_$(brd)_ENVIRONMENTS), \
+ $(eval $(call BOARD_ENVIRONMENT_template,$(env))))))
$(foreach app,$(APPLICATIONS), \
$(eval $(call APPLICATION_template,$(app))))
$(foreach app,$(APPLICATIONS), \
$(foreach brd,$(BOARDS), \
- $(foreach env,$($(brd)_ENVIRONMENTS), \
+ $(foreach env,$(BOARD_$(brd)_ENVIRONMENTS), \
$(eval $(call APPLICATION_BOARD_ENVIRONMENT_template,$(app),$(brd),$(env))))))
@@ -146,16 +146,16 @@ ALL_OBJS+=$(ANY_APP_OBJS)
# template for library rules
define LIBRARY_template
-$(1)_SRCS_REL=$$(patsubst %,$$($(1)_DIR)/%,$$($(1)_SRCS))
-$(1)_OBJS:=$$($(1)_SRCS_REL:.c=.o)
-$(1)_OBJS:=$$($(1)_OBJS:.S=.o)
+LIB_$(1)_SRCS_REL=$$(patsubst %,$$(LIB_$(1)_DIR)/%,$$(LIB_$(1)_SRCS))
+LIB_$(1)_OBJS:=$$(LIB_$(1)_SRCS_REL:.c=.o)
+LIB_$(1)_OBJS:=$$(LIB_$(1)_OBJS:.S=.o)
-$$($(1)_DIR)/lib$(1).a: $$($(1)_OBJS)
- $$(Q_AR)$(CROSS_COMPILE)$(AR) cru $$($(1)_DIR)/lib$(1).a $$($(1)_OBJS)
+$$(LIB_$(1)_DIR)/lib$(1).a: $$(LIB_$(1)_OBJS)
+ $$(Q_AR)$(CROSS_COMPILE)$(AR) cru $$(LIB_$(1)_DIR)/lib$(1).a $$(LIB_$(1)_OBJS)
-ALL_LIBS+=$$($(1)_DIR)/lib$(1).a
+ALL_LIBS+=$$(LIB_$(1)_DIR)/lib$(1).a
-ALL_OBJS+=$$($(1)_OBJS)
+ALL_OBJS+=$$(LIB_$(1)_OBJS)
endef
diff --git a/src/target/firmware/calypso/Makefile b/src/target/firmware/calypso/Makefile
index 610a82c..9add62b 100644
--- a/src/target/firmware/calypso/Makefile
+++ b/src/target/firmware/calypso/Makefile
@@ -1,4 +1,4 @@
LIBRARIES+=calypso
-calypso_DIR=calypso
-calypso_SRCS=arm.c buzzer.c clock.c dma.c dsp.c du.c i2c.c irq.c rtc.c sim.c spi.c tpu.c tsp.c keypad.c misc.c timer.c backlight.c uart.c uwire.c
+LIB_calypso_DIR=calypso
+LIB_calypso_SRCS=arm.c buzzer.c clock.c dma.c dsp.c du.c i2c.c irq.c rtc.c sim.c spi.c tpu.c tsp.c keypad.c misc.c timer.c backlight.c uart.c uwire.c
diff --git a/src/target/firmware/comm/Makefile b/src/target/firmware/comm/Makefile
index 25fbb98..ad69e24 100644
--- a/src/target/firmware/comm/Makefile
+++ b/src/target/firmware/comm/Makefile
@@ -1,5 +1,5 @@
LIBRARIES+=comm
-comm_DIR=comm
-comm_SRCS=msgb.c sercomm.c sercomm_cons.c timer.c
+LIB_comm_DIR=comm
+LIB_comm_SRCS=msgb.c sercomm.c sercomm_cons.c timer.c
diff --git a/src/target/firmware/layer1/Makefile b/src/target/firmware/layer1/Makefile
index 455a444..0c710a5 100644
--- a/src/target/firmware/layer1/Makefile
+++ b/src/target/firmware/layer1/Makefile
@@ -1,9 +1,9 @@
LIBRARIES+=layer1
-layer1_DIR=layer1
-layer1_SRCS=avg.c agc.c afc.c toa.c sync.c tdma_sched.c tpu_window.c init.c \
+LIB_layer1_DIR=layer1
+LIB_layer1_SRCS=avg.c agc.c afc.c toa.c sync.c tdma_sched.c tpu_window.c init.c \
l23_api.c mframe_sched.c sched_gsmtime.c async.c rfch.c apc.c
-layer1_SRCS += prim_pm.c prim_rach.c prim_tx_nb.c prim_rx_nb.c prim_fbsb.c \
- prim_freq.c prim_utils.c prim_tch.c
+LIB_layer1_SRCS += prim_pm.c prim_rach.c prim_tx_nb.c prim_rx_nb.c prim_fbsb.c \
+ prim_freq.c prim_utils.c prim_tch.c
diff --git a/src/target/firmware/lib/Makefile b/src/target/firmware/lib/Makefile
index 83f9966..a2a6d45 100644
--- a/src/target/firmware/lib/Makefile
+++ b/src/target/firmware/lib/Makefile
@@ -1,7 +1,7 @@
LIBRARIES+=mini
-mini_DIR=lib
-mini_SRCS=vsprintf.c string.c ctype.c printf.c console.c ctors.c \
+LIB_mini_DIR=lib
+LIB_mini_SRCS=vsprintf.c string.c ctype.c printf.c console.c ctors.c \
changebit.S clearbit.S delay.c div64.S lib1funcs.S memcpy.S memset.S setbit.S testchangebit.S testclearbit.S testsetbit.S