1 INCLUDES=-Iinclude/ -I../../../include
4 # individual list of object files, they should probably become libraries
5 FLASH_OBJS=flash/cfi_flash.o
6 DISPLAY_OBJS=display/font_r8x8.o display/st7558.o
9 BOARD_C123_OBJS=board/common/rffe_compal_dualband.o board/compal_e88/init.o
10 START=board/common/compal_ramload_start.S
11 LDS=board/common/compal_ramload.lds
13 # The objects that we want to link with every application
14 OBJS=start.o $(ABB_OBJS) $(RF_OBJS) $(DISPLAY_OBJS) $(FLASH_OBJS) $(BOARD_C123_OBJS)
16 # The libraries that we want to link with every application
17 LIBS=calypso/libcalypso.a layer1/liblayer1.a lib/libmini.a comm/libcomm.a
19 # The list of applications we ant to build. Please add your apps here!
20 APPS=hello_world l1test compal_dump compal_dsp_dump layer1
22 APP_BINS=$(APPS:=.bin)
23 APP_ELFS=$(APPS:=.elf)
24 APP_OBJS=$(patsubst %,apps/%/main.o, $(APPS))
25 APP_SIZES=$(APP_ELFS:.elf=.size)
27 LST=$(OBJS:.o=.lst) $(APP_OBJS:.o=.lst) $(START:.S=.lst)
29 all: $(APP_BINS) $(APP_ELFS) $(APP_SIZES)
32 $(CROSS_COMPILE)$(CC) $(CFLAGS) -c -o $@ $^
35 $(CROSS_COMPILE)$(CC) $(CFLAGS) -c -o $@ $^
37 %.elf: $(OBJS) apps/%/main.o $(LIBS)
38 $(CROSS_COMPILE)$(LD) $(LDFLAGS) -T $(LDS) -Bstatic -Map $@.map -o $@ --start-group $^ --end-group
39 $(CROSS_COMPILE)$(SIZE) $@
42 $(CROSS_COMPILE)$(SIZE) -A $^ > $@
45 $(CROSS_COMPILE)objcopy --gap-fill=0xff -O binary $^ $@
47 # FIXME: we don't do dependencies into the subdirectories, so we always rebuild
48 .PHONY: calypso/libcalypso.a
52 # FIXME: we don't do dependencies into the subdirectories, so we always rebuild
53 .PHONY: layer1/liblayer1.a
60 # FIXME: we don't do dependencies into the subdirectories, so we always rebuild
61 .PHONY: comm/libcomm.a
69 rm -f *.map $(OBJS) $(APP_BINS) $(APP_ELFS) $(APP_SIZES) $(LST)