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.arm.rules
13 # This file is meant to be included by Makefiles in build directories
16 makefile_arm_inc_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 include $(makefile_arm_inc_dir)/../common.mk
38 CC=$(ARM_COMPILER_DIR)/bin/armcl
39 AR=$(ARM_COMPILER_DIR)/bin/armar
42 # Include definition of $(rpp_lib_INCLUDES)
43 include $(makefile_arm_inc_dir)/../Makefile.var
45 RPP_CFLAGS = $(TARGET_CFLAGS) --gcc -I$(ARM_COMPILER_DIR)/include \
46 $(rpp_lib_INCLUDES:%=-I$(makefile_arm_inc_dir)/../%) \
47 --diag_warning=225 --display_error_number --diag_wrap=off \
48 --gen_func_subsections=on --enum_type=packed
51 --preproc_dependency=$(@:%=%.dep) --obj_directory=$(dir $@) \
52 --preproc_with_compile
55 $(call mkdir,$(dir $@))
56 $(CC) $(RPP_CFLAGS) $(RPP_MAKE_CFLAGS) $<
60 RPP_LIB_DIR = $(makefile_arm_inc_dir)/$(TARGET)/$(BUILD_DIR)
63 --run_linker -m"${@:%=%.map}" $(TARGET_LDFLAGS) --diag_wrap=on \
64 --reread_libs --warn_sections --display_error_number \
65 --rom_model --search_path=$(ARM_COMPILER_DIR)/lib \
66 --generate_dead_funcs_list=$(@:%=%.deadfuncs.xml) \
69 RPP_LDLIBS = $(TARGET_LDCMD) -l$(RPP_LIB_DIR)/rpp-lib.lib $(TARGET_LDLIBS)
71 $(RPP_LIB_DIR)/rpp-lib.lib: