]> rtime.felk.cvut.cz Git - pes-rpp/rpp-lib.git/blob - apps/rpp-test-suite/Debug/GNUmakefile
18ab0f7d14bae104776ef4fb3dcfce149619d246
[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}"  \
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 rpp-test-suite_OBJS = $(rpp-test-suite_SOURCES:%.c=%.obj)
32 rpp-test-suite_DEPS = $(rpp-test-suite_OBJS:%.obj=%.dep)
33
34 all:: rpp-test-suite.out
35
36 .PHONY: FORCE
37 ../../../Debug/rpp-lib.lib: FORCE
38         $(MAKE) -C ../../../Debug
39
40 rpp-test-suite.out: ../../../rpp/RM48L952FlashLnk.cmd ../../../Debug/rpp-lib.lib $(rpp-test-suite_OBJS)
41         $(LD) $(LDFLAGS) $^ --library=rtsv7R4_T_le_v3D16_eabi.lib -o $@
42
43 -include $(rpp-test-suite_OBJS:%.obj=%.dep)
44
45 $(rpp-test-suite_OBJS): %.obj: ../%.c
46         @mkdir -p $(dir $@)
47         $(CC) $(rpp-test-suite_CFLAGS) $(rpp-test-suite_MAKE_CFLAGS) $<
48
49 .PHONY: all clean
50
51 clean::
52         rm -rf $(rpp-test-suite_OBJS) $(rpp-test-suite_DEPS) rpp-test-suite.out