blob: e75641e116e0f8cfaf7efd8de51183cf414ac629 [file] [log] [blame]
#***********************************************************************
# °æÈ¨ËùÓÐ (C)2001,ÖÐÐËͨѶ¹É·ÝÓÐÏÞ¹«Ë¾¡£
#
# ÎļþÃû³Æ£º rvct.mk
# Îļþ±êʶ£º ¶¨ÒåARM RealView Compilation Tools±àÒëÆ÷Ïà¹ØÄÚÈÝ
# ÄÚÈÝÕªÒª£º
#
# ÐÞ¸ÄÈÕÆÚ °æ±¾ºÅ Ð޸ıê¼Ç ÐÞ¸ÄÈË ÐÞ¸ÄÄÚÈÝ
# ---------------------------------------------------------------------
# 2007/11/16 V1.0 xiaxinguo create
#***********************************************************************/
# ======================================================================== #
# ·¾¶
# ======================================================================== #
RCVT_ROOT ?= /cygdrive/c/arm
RVCT_VER ?= 4.0/400
# Cortex-R7/Cortex-M0/ARM1176JZF-S/ARM926EJ-S
RVCT_CPU ?= Cortex-R7
RVCT_BIN = $(RCVT_ROOT)/RVCT/Programs/$(RVCT_VER)/win_32-pentium
RVCT_LIB = $(RCVT_ROOT)/RVCT/Data/$(RVCT_VER)/Lib
RVCT_INC = $(RCVT_ROOT)/RVCT/Data/$(RVCT_VER)/include/windows
# ------------------------------------------------------------------------ #
# Compiler tools
# ------------------------------------------------------------------------ #
CC = $(RVCT_BIN)/armcc
CXX = $(RVCT_BIN)/armcc
ASM = $(RVCT_BIN)/armasm
AR = $(RVCT_BIN)/armar
LD = $(RVCT_BIN)/armlink
ELF2BIN = $(RVCT_BIN)/fromelf
# ------------------------------------------------------------------------ #
# INCLUDE
# ------------------------------------------------------------------------ #
INCLUDE +=
# ------------------------------------------------------------------------ #
# STDINCLUDE
# ------------------------------------------------------------------------ #
STDINCLUDE += -I$(RVCT_INC)
# ------------------------------------------------------------------------ #
# CCFLAGS
# ------------------------------------------------------------------------ #
CCFLAGS =
CCFLAGS += -c --no_debug_macros
ifeq ($(THUMB), YES)
CCFLAGS += --thumb
endif
#CCFLAGS += -W
CCFLAGS += --cpu $(RVCT_CPU) --apcs /noswstackcheck/interwork --littleend --fpu softvfp --diag_remark 188,870
CCFLAGS += --library_interface=aeabi_clib90
CCFLAGS += --split_sections
#generate dependencies
CCFLAGS += --depend $(patsubst %.o,%.d,$@)
#enable compiler optimizations depending on flavor
ifeq ($(FLAVOR),debug)
CCFLAGS += -O2 --debug
else
ifeq ($(FLAVOR),release)
CCFLAGS += --no_debug -O2 -Otime --diag_remark 174
else
$(error FLAVOR is invalid:[FLAVOR=$(FLAVOR)] )
endif
endif
CXXFLAGS = $(CCFLAGS)
# ------------------------------------------------------------------------ #
# ASFLAGS
# ------------------------------------------------------------------------ #
ASFLAGS =
ifeq ($(FLAVOR),debug)
ASFLAGS += --debug
endif
ASFLAGS += --cpu $(RVCT_CPU) --apcs /noswstackcheck --littleend --fpu softvfp
# ------------------------------------------------------------------------ #
# ARFLAGS
# ------------------------------------------------------------------------ #
ARFLAGS = --create
# ------------------------------------------------------------------------ #
# LDFLAGS
# ------------------------------------------------------------------------ #
LDFLAGS +=
ifeq ($(FLAVOR),debug)
LDFLAGS += --debug --no_inline
else
LDFLAGS += --no_debug --inline
endif
LDFLAGS += --remove --diag_suppress 6314 --reloc --partial --libpath $(RVCT_LIB)
LDOUT = --output $@
LDMAP = --map --locals --symbols --info totals,sizes --xref --list $(OBJDIR)/2930.map
# ------------------------------------------------------------------------ #
# ELF2BINOUT
# ------------------------------------------------------------------------ #
ELF2BINOUT = -output
# ------------------------------------------------------------------------ #
# DEFINE
# ------------------------------------------------------------------------ #
ifeq ($(PS_TYPE), ps_comneon)
DEFINE += -D_USE_PS_COMNEON #use COMNEON's ps
DEFINE += -D_USE_L1G #init GSM modle clocl
DEFINE += -DEXTERNAL_SDL_DEBUG # outup trace information when use COMNEON's ps
DEFINE += -D_USE_DPRAM_BYPASS #include "dpram_api.h" but not "dpram_td_api.h" in the drv_api.h
endif
ifeq ($(PS_TD_SWITCH), yes)
DEFINE += -DPS_TD_SWITCH
endif
#DEFINE += -D_USE_SDL #-DNV_ON_NAND
DEFINE += -DLITTLE_ENDIAN
# ------------------------------------------------------------------------ #
# LIBS
# ------------------------------------------------------------------------ #
LIBS +=