1 # Copyright (C) 2013-2015 Czech Technical University in Prague
4 # - Michal Sojka <sojkam1@fel.cvut.cz>
6 # This document contains proprietary information belonging to Czech
7 # Technical University in Prague. Passing on and copying of this
8 # document, and communication of its contents is not permitted
9 # without prior written authorization.
11 # File : Makefile.rules.arm
13 # This file contains variables and rules specific for compilation for
16 makefile_rules_arm_dir := $(patsubst %/,%,$(dir $(lastword $(MAKEFILE_LIST))))
18 ifeq ($(TARGET_CFLAGS),)
19 $(error "Makefile.config must be included before this file")
22 # Code composer studio sets this variable when it invokes make. Let's use it
23 # as a hint for where is the compiler installed.
24 CCS_UTILS_DIR ?= /opt/ti/ccsv5/utils
26 ARM_COMPILER_DIR ?= $(dir $(CCS_UTILS_DIR))/tools/compiler/arm_5.1.1
28 ifeq ($(wildcard $(CCS_UTILS_DIR)),)
30 '$(CCS_UTILS_DIR)' directory does not exist.
31 Please set CCS_UTILS_DIR variable, e.g. by running 'make CCS_UTILS_DIR=$$HOME/ti/ccsv5/utils'
36 CC=$(ARM_COMPILER_DIR)/bin/armcl
37 AR=$(ARM_COMPILER_DIR)/bin/armar
40 # Include definition of $(rpp_lib_INCLUDES)
41 include $(makefile_rules_arm_dir)/../Makefile.var
43 RPP_CFLAGS = $(TARGET_CFLAGS) --gcc -I$(ARM_COMPILER_DIR)/include \
44 $(rpp_lib_INCLUDES:%=-I$(makefile_rules_arm_dir)/../%) \
45 --diag_warning=225 --display_error_number --diag_wrap=off \
46 --gen_func_subsections=on --enum_type=packed
49 --preproc_dependency=$(@:%=%.dep) --obj_directory=$(dir $@) \
50 --preproc_with_compile
52 RPP_COMPILE_CMD = $(CC) $(RPP_CFLAGS) $(RPP_MAKE_CFLAGS) $<
55 RPP_LIB_DIR = $(makefile_rules_arm_dir)/$(TARGET)/$(BUILD_DIR)
58 --run_linker -m"${@:%=%.map}" $(TARGET_LDFLAGS) --diag_wrap=on \
59 --reread_libs --warn_sections --display_error_number \
60 --rom_model --search_path=$(ARM_COMPILER_DIR)/lib \
61 --generate_dead_funcs_list=$(@:%=%.deadfuncs.xml) \
64 RPP_LDLIBS = $(makefile_rules_arm_dir)/$(TARGET)/$(TARGET_LDCMD) -l$(RPP_LIB_DIR)/rpp-lib.lib $(TARGET_LDLIBS)
66 $(RPP_LIB_DIR)/rpp-lib.lib: