blob: e75641e116e0f8cfaf7efd8de51183cf414ac629 [file] [log] [blame]
yuezonghe824eb0c2024-06-27 02:32:26 -07001#***********************************************************************
2# °æÈ¨ËùÓÐ (C)2001,ÖÐÐËͨѶ¹É·ÝÓÐÏÞ¹«Ë¾¡£
3#
4# ÎļþÃû³Æ£º rvct.mk
5# Îļþ±êʶ£º ¶¨ÒåARM RealView Compilation Tools±àÒëÆ÷Ïà¹ØÄÚÈÝ
6# ÄÚÈÝÕªÒª£º
7#
8# ÐÞ¸ÄÈÕÆÚ °æ±¾ºÅ Ð޸ıê¼Ç ÐÞ¸ÄÈË ÐÞ¸ÄÄÚÈÝ
9# ---------------------------------------------------------------------
10# 2007/11/16 V1.0 xiaxinguo create
11#***********************************************************************/
12
13# ======================================================================== #
14# ·¾¶
15# ======================================================================== #
16RCVT_ROOT ?= /cygdrive/c/arm
17RVCT_VER ?= 4.0/400
18# Cortex-R7/Cortex-M0/ARM1176JZF-S/ARM926EJ-S
19RVCT_CPU ?= Cortex-R7
20RVCT_BIN = $(RCVT_ROOT)/RVCT/Programs/$(RVCT_VER)/win_32-pentium
21RVCT_LIB = $(RCVT_ROOT)/RVCT/Data/$(RVCT_VER)/Lib
22RVCT_INC = $(RCVT_ROOT)/RVCT/Data/$(RVCT_VER)/include/windows
23
24# ------------------------------------------------------------------------ #
25# Compiler tools
26# ------------------------------------------------------------------------ #
27CC = $(RVCT_BIN)/armcc
28CXX = $(RVCT_BIN)/armcc
29ASM = $(RVCT_BIN)/armasm
30AR = $(RVCT_BIN)/armar
31LD = $(RVCT_BIN)/armlink
32ELF2BIN = $(RVCT_BIN)/fromelf
33
34# ------------------------------------------------------------------------ #
35# INCLUDE
36# ------------------------------------------------------------------------ #
37INCLUDE +=
38
39# ------------------------------------------------------------------------ #
40# STDINCLUDE
41# ------------------------------------------------------------------------ #
42STDINCLUDE += -I$(RVCT_INC)
43
44# ------------------------------------------------------------------------ #
45# CCFLAGS
46# ------------------------------------------------------------------------ #
47CCFLAGS =
48CCFLAGS += -c --no_debug_macros
49
50ifeq ($(THUMB), YES)
51 CCFLAGS += --thumb
52endif
53
54#CCFLAGS += -W
55CCFLAGS += --cpu $(RVCT_CPU) --apcs /noswstackcheck/interwork --littleend --fpu softvfp --diag_remark 188,870
56CCFLAGS += --library_interface=aeabi_clib90
57CCFLAGS += --split_sections
58
59#generate dependencies
60CCFLAGS += --depend $(patsubst %.o,%.d,$@)
61
62#enable compiler optimizations depending on flavor
63ifeq ($(FLAVOR),debug)
64CCFLAGS += -O2 --debug
65else
66ifeq ($(FLAVOR),release)
67CCFLAGS += --no_debug -O2 -Otime --diag_remark 174
68else
69$(error FLAVOR is invalid:[FLAVOR=$(FLAVOR)] )
70endif
71endif
72
73CXXFLAGS = $(CCFLAGS)
74
75# ------------------------------------------------------------------------ #
76# ASFLAGS
77# ------------------------------------------------------------------------ #
78ASFLAGS =
79ifeq ($(FLAVOR),debug)
80ASFLAGS += --debug
81endif
82ASFLAGS += --cpu $(RVCT_CPU) --apcs /noswstackcheck --littleend --fpu softvfp
83
84# ------------------------------------------------------------------------ #
85# ARFLAGS
86# ------------------------------------------------------------------------ #
87ARFLAGS = --create
88
89# ------------------------------------------------------------------------ #
90# LDFLAGS
91# ------------------------------------------------------------------------ #
92LDFLAGS +=
93ifeq ($(FLAVOR),debug)
94LDFLAGS += --debug --no_inline
95else
96LDFLAGS += --no_debug --inline
97endif
98LDFLAGS += --remove --diag_suppress 6314 --reloc --partial --libpath $(RVCT_LIB)
99LDOUT = --output $@
100LDMAP = --map --locals --symbols --info totals,sizes --xref --list $(OBJDIR)/2930.map
101
102# ------------------------------------------------------------------------ #
103# ELF2BINOUT
104# ------------------------------------------------------------------------ #
105ELF2BINOUT = -output
106
107# ------------------------------------------------------------------------ #
108# DEFINE
109# ------------------------------------------------------------------------ #
110ifeq ($(PS_TYPE), ps_comneon)
111DEFINE += -D_USE_PS_COMNEON #use COMNEON's ps
112DEFINE += -D_USE_L1G #init GSM modle clocl
113DEFINE += -DEXTERNAL_SDL_DEBUG # outup trace information when use COMNEON's ps
114DEFINE += -D_USE_DPRAM_BYPASS #include "dpram_api.h" but not "dpram_td_api.h" in the drv_api.h
115endif
116
117ifeq ($(PS_TD_SWITCH), yes)
118DEFINE += -DPS_TD_SWITCH
119endif
120
121#DEFINE += -D_USE_SDL #-DNV_ON_NAND
122
123DEFINE += -DLITTLE_ENDIAN
124
125# ------------------------------------------------------------------------ #
126# LIBS
127# ------------------------------------------------------------------------ #
128LIBS +=