-
Notifications
You must be signed in to change notification settings - Fork 19
/
defines.mk
52 lines (42 loc) · 1.2 KB
/
defines.mk
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
PREFIX=pic32
TARGET=pic32mx
AR =$(PREFIX)-ar
CC =$(PREFIX)-gcc
STRIP =$(PREFIX)-strip
ifndef SDE_MAJOR
# Guess major SDE version based on compiler version
SDE_MAJOR := $(shell \
if $(CC) -v 2>&1 | fgrep 'gcc version 3.' >/dev/null; then \
echo "6"; \
else \
echo "5"; \
fi)
endif
# Export to sub-makes
export SDE_MAJOR
SKIPARCHS=none
#EXCEPT =-fexceptions
# Default to optimisation for size
OPTIM =-Os -fno-optimize-sibling-calls
# Don't generate gp-relative addresses
ifneq (,$(strip $(filter 6,$(SDE_MAJOR))))
GPOPT =-G0
else
GPOPT =-mno-gpopt
endif
# Minimal backtrace debug info, no assertion checking
DEBUG = -g1
ASSERT =-DNDEBUG=1
CFLAGS =$(OPTIM) $(VAR) $(GPOPT) $(DEBUG) $(ASSERT) $(EXCEPT) -ffreestanding -ffunction-sections -fdata-sections
ASFLAGS =$(OPTIM) $(VAR) $(GPOPT) $(ASSERT) $(EXCEPT) -ffreestanding -ffunction-sections -fdata-sections
STRIPFLAGS =-X -g
ARCH =mips
DESTROOT =$(HOME)/daytona/install-image
TGTDESTDIR =$(DESTROOT)/$(TARGET)
TGTLIBSRC =$(DESTROOT)/pic32-libs
LIBDESTDIR =$(TGTDESTDIR)/lib
INCDESTDIR =$(TGTDESTDIR)/include
# To enable multi-byte character support, uncomment the next line
#CFLAGS += -DMB_SUPPORT
# flags to pass to recursive makes
F =ROOT=$(ROOT)