2009-03-27 21:00:10 +01:00
|
|
|
PLATFORM_LDFLAGS =
|
2009-11-04 21:48:09 +01:00
|
|
|
PLATFORM_RELFLAGS = -fno-strict-aliasing -fno-common -ffixed-r8 -ffunction-sections -msoft-float -Wcast-align -Wall
|
2010-02-22 00:47:12 +01:00
|
|
|
PLATFORM_CPPFLAGS = -march=armv4t -mlong-calls -mtune=arm7tdmi-s -DCONFIG_ARM -D__ARM__ -mthumb-interwork
|
2010-03-08 20:49:58 +01:00
|
|
|
THUMB_FLAGS= -mthumb -mcallee-super-interworking
|
2009-03-27 21:00:10 +01:00
|
|
|
|
|
|
|
#########################################################################
|
|
|
|
|
|
|
|
#
|
|
|
|
# Include the make variables (CC, etc...)
|
|
|
|
#
|
|
|
|
AS = $(CROSS_COMPILE)as
|
|
|
|
LD = $(CROSS_COMPILE)ld
|
|
|
|
CC = $(CROSS_COMPILE)gcc
|
|
|
|
CPP = $(CC) -E
|
|
|
|
AR = $(CROSS_COMPILE)ar
|
|
|
|
NM = $(CROSS_COMPILE)nm
|
|
|
|
STRIP = $(CROSS_COMPILE)strip
|
|
|
|
OBJCOPY = $(CROSS_COMPILE)objcopy
|
|
|
|
OBJDUMP = $(CROSS_COMPILE)objdump
|
|
|
|
RANLIB = $(CROSS_COMPILE)RANLIB
|
|
|
|
|
|
|
|
RELFLAGS= $(PLATFORM_RELFLAGS)
|
|
|
|
DBGFLAGS= -g -DDEBUG
|
|
|
|
OPTFLAGS= -Os #-fomit-frame-pointer
|
|
|
|
LDSCRIPT := boot.lds
|
|
|
|
OBJCFLAGS += --gap-fill=0xff
|
|
|
|
|
|
|
|
gccincdir := $(shell $(CC) -print-file-name=include)
|
|
|
|
|
|
|
|
CPPFLAGS := $(DBGFLAGS) $(OPTFLAGS) $(RELFLAGS) \
|
|
|
|
-D__KERNEL__ -DTEXT_BASE=$(TEXT_BASE) \
|
2010-03-01 23:11:56 +01:00
|
|
|
-fno-builtin -ffreestanding -isystem \
|
2009-03-27 21:00:10 +01:00
|
|
|
$(gccincdir) -pipe $(PLATFORM_CPPFLAGS)
|
|
|
|
|
2010-03-04 00:48:29 +01:00
|
|
|
CFLAGS := $(CPPFLAGS) -Wall -Wstrict-prototypes -Wcast-align -Wextra #-Werror
|
2009-03-27 21:00:10 +01:00
|
|
|
|
|
|
|
AFLAGS_DEBUG := -Wa,-gstabs
|
|
|
|
AFLAGS := $(AFLAGS_DEBUG) -D__ASSEMBLY__ $(CPPFLAGS)
|
|
|
|
|
2010-03-01 22:27:58 +01:00
|
|
|
LDFLAGS += -T $(LINKERSCRIPT) -nostartfiles -static -Wl,-Map=$*_$(BOARD).map -export-dynamic
|
2009-03-27 21:00:10 +01:00
|
|
|
|
|
|
|
#########################################################################
|
|
|
|
|
|
|
|
export CROSS_COMPILE AS LD CC CPP AR NM STRIP OBJCOPY OBJDUMP MAKE
|
|
|
|
export TEXT_BASE PLATFORM_CPPFLAGS PLATFORM_RELFLAGS CPPFLAGS CFLAGS AFLAGS
|
|
|
|
|
|
|
|
#########################################################################
|
|
|
|
|