yuezonghe | 824eb0c | 2024-06-27 02:32:26 -0700 | [diff] [blame] | 1 | #***********************************************************************
|
| 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 | # ======================================================================== #
|
| 16 | RCVT_ROOT ?= /cygdrive/c/arm
|
| 17 | RVCT_VER ?= 4.0/400
|
| 18 | # Cortex-R7/Cortex-M0/ARM1176JZF-S/ARM926EJ-S
|
| 19 | RVCT_CPU ?= Cortex-R7
|
| 20 | RVCT_BIN = $(RCVT_ROOT)/RVCT/Programs/$(RVCT_VER)/win_32-pentium
|
| 21 | RVCT_LIB = $(RCVT_ROOT)/RVCT/Data/$(RVCT_VER)/Lib
|
| 22 | RVCT_INC = $(RCVT_ROOT)/RVCT/Data/$(RVCT_VER)/include/windows
|
| 23 |
|
| 24 | # ------------------------------------------------------------------------ #
|
| 25 | # Compiler tools
|
| 26 | # ------------------------------------------------------------------------ #
|
| 27 | CC = $(RVCT_BIN)/armcc
|
| 28 | CXX = $(RVCT_BIN)/armcc
|
| 29 | ASM = $(RVCT_BIN)/armasm
|
| 30 | AR = $(RVCT_BIN)/armar
|
| 31 | LD = $(RVCT_BIN)/armlink
|
| 32 | ELF2BIN = $(RVCT_BIN)/fromelf
|
| 33 |
|
| 34 | # ------------------------------------------------------------------------ #
|
| 35 | # INCLUDE
|
| 36 | # ------------------------------------------------------------------------ #
|
| 37 | INCLUDE +=
|
| 38 |
|
| 39 | # ------------------------------------------------------------------------ #
|
| 40 | # STDINCLUDE
|
| 41 | # ------------------------------------------------------------------------ #
|
| 42 | STDINCLUDE += -I$(RVCT_INC)
|
| 43 |
|
| 44 | # ------------------------------------------------------------------------ #
|
| 45 | # CCFLAGS
|
| 46 | # ------------------------------------------------------------------------ #
|
| 47 | CCFLAGS =
|
| 48 | CCFLAGS += -c --no_debug_macros
|
| 49 |
|
| 50 | ifeq ($(THUMB), YES)
|
| 51 | CCFLAGS += --thumb
|
| 52 | endif
|
| 53 |
|
| 54 | #CCFLAGS += -W
|
| 55 | CCFLAGS += --cpu $(RVCT_CPU) --apcs /noswstackcheck/interwork --littleend --fpu softvfp --diag_remark 188,870
|
| 56 | CCFLAGS += --library_interface=aeabi_clib90
|
| 57 | CCFLAGS += --split_sections
|
| 58 |
|
| 59 | #generate dependencies
|
| 60 | CCFLAGS += --depend $(patsubst %.o,%.d,$@)
|
| 61 |
|
| 62 | #enable compiler optimizations depending on flavor
|
| 63 | ifeq ($(FLAVOR),debug)
|
| 64 | CCFLAGS += -O2 --debug
|
| 65 | else
|
| 66 | ifeq ($(FLAVOR),release)
|
| 67 | CCFLAGS += --no_debug -O2 -Otime --diag_remark 174
|
| 68 | else
|
| 69 | $(error FLAVOR is invalid:[FLAVOR=$(FLAVOR)] )
|
| 70 | endif
|
| 71 | endif
|
| 72 |
|
| 73 | CXXFLAGS = $(CCFLAGS)
|
| 74 |
|
| 75 | # ------------------------------------------------------------------------ #
|
| 76 | # ASFLAGS
|
| 77 | # ------------------------------------------------------------------------ #
|
| 78 | ASFLAGS =
|
| 79 | ifeq ($(FLAVOR),debug)
|
| 80 | ASFLAGS += --debug
|
| 81 | endif
|
| 82 | ASFLAGS += --cpu $(RVCT_CPU) --apcs /noswstackcheck --littleend --fpu softvfp
|
| 83 |
|
| 84 | # ------------------------------------------------------------------------ #
|
| 85 | # ARFLAGS
|
| 86 | # ------------------------------------------------------------------------ #
|
| 87 | ARFLAGS = --create
|
| 88 |
|
| 89 | # ------------------------------------------------------------------------ #
|
| 90 | # LDFLAGS
|
| 91 | # ------------------------------------------------------------------------ #
|
| 92 | LDFLAGS +=
|
| 93 | ifeq ($(FLAVOR),debug)
|
| 94 | LDFLAGS += --debug --no_inline
|
| 95 | else
|
| 96 | LDFLAGS += --no_debug --inline
|
| 97 | endif
|
| 98 | LDFLAGS += --remove --diag_suppress 6314 --reloc --partial --libpath $(RVCT_LIB)
|
| 99 | LDOUT = --output $@
|
| 100 | LDMAP = --map --locals --symbols --info totals,sizes --xref --list $(OBJDIR)/2930.map
|
| 101 |
|
| 102 | # ------------------------------------------------------------------------ #
|
| 103 | # ELF2BINOUT
|
| 104 | # ------------------------------------------------------------------------ #
|
| 105 | ELF2BINOUT = -output
|
| 106 |
|
| 107 | # ------------------------------------------------------------------------ #
|
| 108 | # DEFINE
|
| 109 | # ------------------------------------------------------------------------ #
|
| 110 | ifeq ($(PS_TYPE), ps_comneon)
|
| 111 | DEFINE += -D_USE_PS_COMNEON #use COMNEON's ps
|
| 112 | DEFINE += -D_USE_L1G #init GSM modle clocl
|
| 113 | DEFINE += -DEXTERNAL_SDL_DEBUG # outup trace information when use COMNEON's ps
|
| 114 | DEFINE += -D_USE_DPRAM_BYPASS #include "dpram_api.h" but not "dpram_td_api.h" in the drv_api.h
|
| 115 | endif
|
| 116 |
|
| 117 | ifeq ($(PS_TD_SWITCH), yes)
|
| 118 | DEFINE += -DPS_TD_SWITCH
|
| 119 | endif
|
| 120 |
|
| 121 | #DEFINE += -D_USE_SDL #-DNV_ON_NAND
|
| 122 |
|
| 123 | DEFINE += -DLITTLE_ENDIAN
|
| 124 |
|
| 125 | # ------------------------------------------------------------------------ #
|
| 126 | # LIBS
|
| 127 | # ------------------------------------------------------------------------ #
|
| 128 | LIBS += |