-
Notifications
You must be signed in to change notification settings - Fork 1
/
makefile.am62x.r5f.ti-arm-clang
125 lines (99 loc) · 2.95 KB
/
makefile.am62x.r5f.ti-arm-clang
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
#
# Auto generated makefile
#
export MCU_PLUS_SDK_PATH?=$(abspath ../..)
include $(MCU_PLUS_SDK_PATH)/imports.mak
CG_TOOL_ROOT=$(CGT_TI_ARM_CLANG_PATH)
CC=$(CGT_TI_ARM_CLANG_PATH)/bin/tiarmclang
AR=$(CGT_TI_ARM_CLANG_PATH)/bin/tiarmar
PROFILE?=release
ConfigName:=$(PROFILE)
LIBNAME:=safety_checkers.am62x.r5f.ti-arm-clang.$(PROFILE).lib
FILES_common := \
safety_checkers_pm.c \
safety_checkers_rm.c \
safety_checkers_tifs.c \
FILES_PATH_common = \
${MCU_PLUS_SDK_PATH}/source/safety_checkers/src \
INCLUDES_common := \
-I${CG_TOOL_ROOT}/include/c \
-I${MCU_PLUS_SDK_PATH}/source \
-I${MCU_PLUS_SDK_PATH}/source/safety_checkers/src/ \
-I${MCU_PLUS_SDK_PATH}/source/safety_checkers/src/soc/ \
-I${MCU_PLUS_SDK_PATH}/source/safety_checkers/src/soc/am62x/ \
-I${MCU_PLUS_SDK_PATH}/source/drivers/device_manager/ \
-I${MCU_PLUS_SDK_PATH}/source/drivers/hw_include/ \
DEFINES_common := \
-DSOC_AM62X \
-DSW_VERSION=$(SW_VERSION)
CFLAGS_common := \
-mcpu=cortex-r5 \
-mfloat-abi=hard \
-mfpu=vfpv3-d16 \
-mthumb \
-Wall \
-Werror \
-g \
-Wno-gnu-variable-sized-type-not-at-end \
-Wno-unused-function \
CFLAGS_cpp_common := \
-Wno-c99-designator \
-Wno-extern-c-compat \
-Wno-c++11-narrowing \
-Wno-reorder-init-list \
-Wno-deprecated-register \
-Wno-writable-strings \
-Wno-enum-compare \
-Wno-reserved-user-defined-literal \
-Wno-unused-const-variable \
-x c++ \
CFLAGS_debug := \
-D_DEBUG_=1 \
CFLAGS_release := \
-Os \
ARFLAGS_common := \
rc \
FILES := $(FILES_common) $(FILES_$(PROFILE))
ASMFILES := $(ASMFILES_common) $(ASMFILES_$(PROFILE))
FILES_PATH := $(FILES_PATH_common) $(FILES_PATH_$(PROFILE))
CFLAGS := $(CFLAGS_common) $(CFLAGS_$(PROFILE))
ASMFLAGS := $(CFLAGS_common) $(CFLAGS_$(PROFILE))
ifeq ($(CPLUSPLUS_BUILD), yes)
CFLAGS += $(CFLAGS_cpp_common)
endif
DEFINES := $(DEFINES_common) $(DEFINES_$(PROFILE))
INCLUDES := $(INCLUDES_common) $(INCLUDE_$(PROFILE))
ARFLAGS := $(ARFLAGS_common) $(ARFLAGS_$(PROFILE))
LIBDIR := lib
OBJDIR := obj/am62x/ti-arm-clang/$(PROFILE)/r5f/safety_checkers/
OBJS := $(FILES:%.c=%.obj)
OBJS += $(ASMFILES:%.S=%.obj)
DEPS := $(FILES:%.c=%.d)
vpath %.obj $(OBJDIR)
vpath %.c $(FILES_PATH)
vpath %.S $(FILES_PATH)
$(OBJDIR)/%.obj %.obj: %.c
@echo Compiling: $(LIBNAME): $<
$(CC) -c $(CFLAGS) $(INCLUDES) $(DEFINES) -MMD -o $(OBJDIR)/$@ $<
$(OBJDIR)/%.obj %.obj: %.S
@echo Compiling: $(LIBNAME): $<
$(CC) -c $(ASMFLAGS) -o $(OBJDIR)/$@ $<
all: $(LIBDIR)/$(LIBNAME)
$(LIBDIR)/$(LIBNAME): $(OBJS) | $(LIBDIR)
@echo .
@echo Archiving: $(LIBNAME) to $@ ...
$(AR) $(ARFLAGS) $@ $(addprefix $(OBJDIR), $(OBJS))
@echo Archiving: $(LIBNAME) Done !!!
@echo .
clean:
@echo Cleaning: $(LIBNAME) ...
$(RMDIR) $(OBJDIR)
$(RM) $(LIBDIR)/$(LIBNAME)
scrub:
@echo Scrubing: $(LIBNAME) ...
-$(RMDIR) obj/
-$(RMDIR) lib/
$(OBJS): | $(OBJDIR)
$(LIBDIR) $(OBJDIR):
$(MKDIR) $@
-include $(addprefix $(OBJDIR)/, $(DEPS))