]> rtime.felk.cvut.cz Git - pes-rpp/rpp-lib.git/blob - apps/rpp-test-suite/Debug/GNUmakefile
Tune test-suite Makefile to support several platforms
[pes-rpp/rpp-lib.git] / apps / rpp-test-suite / Debug / GNUmakefile
1 include ../../../Makefile.var
2 include ../Makefile.var
3
4 # Code composer studio sets this variable when it invokes make. Let's use it
5 # as a hint for where is the compiler installed.
6 CCS_UTILS_DIR ?= /opt/ti/ccsv5/utils
7
8 ARM_COMPILER_DIR ?= $(dir $(CCS_UTILS_DIR))/tools/compiler/arm_5.1.1
9
10
11 CC=$(ARM_COMPILER_DIR)/bin/armcl
12 LD=$(CC)
13
14 rpp-test-suite_CFLAGS = -mv7R4 --code_state=32 --float_support=VFPv3D16 --abi=eabi $(TARGET_CFLAGS) -g -O0 --gcc        \
15                 -I$(ARM_COMPILER_DIR)/include $(rpp_lib_INCLUDES:%=-I../../../%) -I../include   \
16                 --diag_warning=225 --display_error_number --diag_wrap=off               \
17                 --gen_func_subsections=on --enum_type=packed
18
19 rpp-test-suite_MAKE_CFLAGS = \
20                 --preproc_dependency=$(@:%.obj=%.dep) --obj_directory=$(dir $@) \
21                 --preproc_with_compile
22
23 LDFLAGS = $(rpp-test-suite_CFLAGS) -z -m"${@:%.obj=%.map}" $(LDFLAGS$(TARGET)) \
24           --diag_wrap=on                  \
25            --reread_libs --warn_sections    \
26           --display_error_number --rom_model                            \
27                   --search_path=$(ARM_COMPILER_DIR)/lib                                                 \
28           --generate_dead_funcs_list=$(@:%.out=%.deadfuncs.xml)         \
29           --stack_size=0x800
30
31 LDCMD = $(LDCMD_$(TARGET))
32 LDLIB = $(LDLIB_$(TARGET))
33
34 LDCMD_rm48_hdk = ../../../rpp/RM48L952FlashLnk.cmd
35 LDLIB_rm48_hdk = --library="rtsv7R4_T_le_v3D16_eabi.lib"
36
37 rpp-test-suite_OBJS = $(rpp-test-suite_SOURCES:%.c=%.obj)
38 rpp-test-suite_DEPS = $(rpp-test-suite_OBJS:%.obj=%.dep)
39
40 all:: rpp-test-suite.out
41
42 .PHONY: FORCE
43 ../../../Debug/rpp-lib.lib: FORCE
44         $(MAKE) -C ../../../Debug
45
46 rpp-test-suite.out: $(LDCMD) ../../../Debug/rpp-lib.lib $(rpp-test-suite_OBJS)
47         $(LD) $(LDFLAGS) $^ $(LDLIB) -o $@
48
49 -include $(rpp-test-suite_OBJS:%.obj=%.dep)
50
51 $(rpp-test-suite_OBJS): %.obj: ../%.c
52         @mkdir -p $(dir $@)
53         $(CC) $(rpp-test-suite_CFLAGS) $(rpp-test-suite_MAKE_CFLAGS) $<
54
55 .PHONY: all clean
56
57 clean::
58         rm -rf $(rpp-test-suite_OBJS) $(rpp-test-suite_DEPS) rpp-test-suite.out