]> Gitweb @ Texas Instruments - Open Source Git Repositories - git.TI.com/gitweb - processor-sdk/open-amp.git/blob - apps/tests/master/nucleus/latency_test/nucleus_nucleusbm/make
Correcting application message.
[processor-sdk/open-amp.git] / apps / tests / master / nucleus / latency_test / nucleus_nucleusbm / make
2 include ../Makefile.commons
4 SAMPLE_OUT := tests/master/nucleus/latency_test/nucleus_nucleusbm/latency_test.out
5 SAMPLE_C_SRC := tests/master/nucleus/latency_test/nucleus_nucleusbm/latency_test.c
6 REMOTE_OUT   := latency_test.out
7 DST_DIR := tests/master/nucleus/latency_test/nucleus_nucleusbm
8 NU_SRC_DIR := firmware/$(PLAT)/nucleus/echo_test
9 BM_SRC_DIR := firmware/$(PLAT)/baremetal/echo_test
11 SAMPLEOBJFILES := $(patsubst %.c, %.o, $(SAMPLE_C_SRC))
12 SAMPLE_DEPS := $(patsubst %.c, %.d, $(SAMPLE_C_SRC))
13 SAMPLE_MAP := $(patsubst %.out, %.map, $(SAMPLE_OUT))
14 SAMPLE_BIN := $(patsubst %.out, %.bin, $(SAMPLE_OUT))
16 $(SAMPLE_OUT): $(REMOTE_OUT)$(SAMPLEOBJFILES)
18         @echo 'Building latency test for nucleus : $@'
20         $(LD)  -Wl,-Map=tests/master/nucleus/latency_test/nucleus_nucleusbm/latency_test.map  -nostartfiles -Wl,--gc-sections -Wl,--wrap=malloc -Wl,--wrap=calloc -Wl,--wrap=realloc -Wl,--wrap=free -T"$(OHOME)/libs/system/$(PLAT)/nucleus/linker_master.ld" -L"$(OHOME)/libs/system/$(PLAT)/nucleus/lib/$(CROSS)/master" -L"$(OHOME)/libs/open_amp" -o "$(SAMPLE_OUT)" -Wl,--start-group $(SAMPLEOBJFILES) $(DST_DIR)/firmware1.o $(DST_DIR)/firmware2.o -lnucleus_master -lopen_amp -lc -lm -lstdc++ -Wl,--end-group        
21         
22         $(OBJCPY) -O binary $(SAMPLE_OUT) $(SAMPLE_BIN)
23                 
24         @echo 'Finished building target: $@'
25         
26 %.o:%.c
27         @echo CC $(<:.c=.o)
28         @$(CC) $(CFLAGS) $(ARCH_CFLAGS) $(INCLUDE) -c $< -o $@
29         
30 %.o:%.S
31         @$(AS) -c -mcpu=cortex-a9 $(ARCH_ASFLAGS) $(INCLUDE) $< -o $@
33 $(REMOTE_OUT):
34         cd $(NU_SRC_DIR)/; cp firmware firmware1; \
35         $(OBJCPY) -I binary -O elf32-littlearm -B arm firmware1 firmware1.o
36         mv $(NU_SRC_DIR)/firmware1.o $(DST_DIR)/
37         cd $(BM_SRC_DIR)/; cp firmware firmware2; \
38         $(OBJCPY) -I binary -O elf32-littlearm -B arm firmware2 firmware2.o
39         mv $(BM_SRC_DIR)/firmware2.o $(DST_DIR)/
40         cd $(NU_SRC_DIR)/; rm firmware1
41         cd $(BM_SRC_DIR)/; rm firmware2
42 clean:
43         -$(RM) $(SAMPLEOBJFILES) $(SAMPLE_DEPS) $(SAMPLE_OUT) $(SAMPLE_BIN) $(DST_DIR)/firmware1.o $(DST_DIR)/firmware2.o $(SAMPLE_MAP)
44         
45 post-build:
46         -@echo ' '
48 secondary-outputs:
50 PHONY: all clean dependents
51 .SECONDARY: post-build