1 TARGET_PREFIX
=$(TRIPLE
)-
7 CC_normal
:= clang
-target
$(TRIPLE
) -integrated-as
8 CX_normal
:= clang
++ -target
$(TRIPLE
) -integrated-as
10 CC_normal
:= $(TARGET_PREFIX
)gcc
11 CX_normal
:= $(TARGET_PREFIX
)g
++
13 AR_normal
:= $(TARGET_PREFIX
)ar
14 LD_normal
:= $(TARGET_PREFIX
)ld
15 OBJCOPY_normal
:= $(TARGET_PREFIX
)objcopy
17 CC_quiet
= @echo
" CC " $@
&& $(CC_normal
)
18 CX_quiet
= @echo
" CX " $@
&& $(CX_normal
)
19 AR_quiet
= @echo
" AR " $@
&& $(AR_normal
)
20 LD_quiet
= @echo
" LD " $@
&& $(LD_normal
)
21 OBJCOPY_quiet
= @echo
" OBJCOPY " $@
&& $(OBJCOPY_normal
)
28 OBJCOPY
= $(OBJCOPY_normal
)
34 OBJCOPY
= $(OBJCOPY_quiet
)
39 INCLUDES
= -I
$(SOC_DIRECTORY
)/software
/include/base
-I
$(SOC_DIRECTORY
)/software
/include -I
$(SOC_DIRECTORY
)/common
-I
$(BUILDINC_DIRECTORY
)
40 COMMONFLAGS
= -Os
$(CPUFLAGS
) -fomit-frame-pointer
-Wall
-fno-builtin
-nostdinc
$(INCLUDES
)
41 CFLAGS
= $(COMMONFLAGS
) -fexceptions
-Wstrict-prototypes
-Wold-style-definition
-Wmissing-prototypes
42 CXXFLAGS
= $(COMMONFLAGS
) -std
=c
++11 -I
$(SOC_DIRECTORY
)/software
/include/basec
++ -fexceptions
-fno-rtti
-ffreestanding
43 LDFLAGS
= -nostdlib
-nodefaultlibs
-L
$(BUILDINC_DIRECTORY
)
45 # compile and generate dependencies, based on
46 # http://scottmcpeak.com/autodepend/autodepend.html
49 $(CX
) -c
$(CXXFLAGS
) $(1) $< -o
$@
53 $(CC
) -c
$(CFLAGS
) $(1) $< -o
$@
57 $(CC
) -c
$(CFLAGS
) -o
$@
$<