lh | 9ed821d | 2023-04-07 01:36:19 -0700 | [diff] [blame^] | 1 | # /*****************************************************************************
|
| 2 | #* °æÈ¨ËùÓÐ (C)2010, ÖÐÐËͨѶ¹É·ÝÓÐÏÞ¹«Ë¾¡£
|
| 3 | #*
|
| 4 | #* ÎļþÃû³Æ: gcc_csky.mk
|
| 5 | #* Îļþ±êʶ: gcc_csky.mk
|
| 6 | #* ÄÚÈÝÕªÒª: ºË¸ß»ùgcc±àÒëÆ÷ÅäÖÃÎļþ
|
| 7 | #* ʹÓ÷½·¨: include gcc_csky.mk
|
| 8 | #*
|
| 9 | #* ÐÞ¸ÄÈÕÆÚ °æ±¾ºÅ Ð޸ıê¼Ç ÐÞ¸ÄÈË ÐÞ¸ÄÄÚÈÝ
|
| 10 | #* -----------------------------------------------------------------------------
|
| 11 | #* 2011/11/01 V1.0 Create ÁõÑÇÄÏ ´´½¨
|
| 12 | #*
|
| 13 | # ******************************************************************************/
|
| 14 |
|
| 15 | #===============================================================================
|
| 16 | # compiler tools path, TOS_GCC_ROOT is set in build_eCos.bat
|
| 17 | #===============================================================================
|
| 18 | GCC_ROOT = $(TOS_GCC_ROOT)
|
| 19 | GCC_BIN = $(GCC_ROOT)/$(TOS_GCC_PATH)/bin
|
| 20 | GCC_LIB = $(TOS_LIB)
|
| 21 |
|
| 22 | #===============================================================================
|
| 23 | # compiler tools setup
|
| 24 | #===============================================================================
|
| 25 | CC = $(GCC_BIN)/$(TOS_COMMAND_PREFIX)gcc
|
| 26 | CXX = $(GCC_BIN)/$(TOS_COMMAND_PREFIX)gcc
|
| 27 | ASM = $(GCC_BIN)/$(TOS_COMMAND_PREFIX)as
|
| 28 | AR = $(GCC_BIN)/$(TOS_COMMAND_PREFIX)ar
|
| 29 | LD = $(GCC_BIN)/$(TOS_COMMAND_PREFIX)ld
|
| 30 | ELF2BIN = $(GCC_BIN)/$(TOS_COMMAND_PREFIX)objcopy
|
| 31 |
|
| 32 | #===============================================================================
|
| 33 | # C include path setup
|
| 34 | #===============================================================================
|
| 35 | INCLUDE = -I$(ZP_ROOT)/ \
|
| 36 | -I$(TOS_INC) \
|
| 37 | -I$(TOS_INC)/$(CPU_ARCH)
|
| 38 |
|
| 39 |
|
| 40 | #===============================================================================
|
| 41 | # C++ STL(standard template library) include path setup
|
| 42 | #===============================================================================
|
| 43 | STDINCLUDE +=
|
| 44 |
|
| 45 | #===============================================================================
|
| 46 | # gcc flags setup
|
| 47 | #===============================================================================
|
| 48 | export CCFLAGS = -I$(GCC_INC) -Wall -Wstrict-prototypes -Winline -Wundef -Wa,-mfpf -Wl,--gc-sections -g -c -Os -fdata-sections -fno-exceptions -fshort-enums -fsigned-char -msoft-float -mcpu=$(CPU_ARCH)
|
| 49 | export CXXFLAGS = $(CCFLAGS)
|
| 50 |
|
| 51 | #===============================================================================
|
| 52 | # assembler flags setup
|
| 53 | #===============================================================================
|
| 54 | ASFLAGS = -mcpu=$(CPU_ARCH)
|
| 55 |
|
| 56 | #===============================================================================
|
| 57 | # archieve flags setup
|
| 58 | #===============================================================================
|
| 59 | ARFLAGS = -rcs
|
| 60 | #ARFLAGS = -r -o
|
| 61 |
|
| 62 | #===============================================================================
|
| 63 | # library include path setup
|
| 64 | #===============================================================================
|
| 65 | LDFLAG = -nostartfiles -L$(GCC_LIB) -Ttarget.ld
|
| 66 |
|
| 67 | #===============================================================================
|
| 68 | # ld setup
|
| 69 | #===============================================================================
|
| 70 | LDOUT =
|
| 71 | LDMAP =
|
| 72 |
|
| 73 | #===============================================================================
|
| 74 | # elf to binary tools setup
|
| 75 | #===============================================================================
|
| 76 | ELF2BINOUT = -O binary
|
| 77 |
|
| 78 | #===============================================================================
|
| 79 | # user defintion
|
| 80 | #===============================================================================
|
| 81 | export PLAT_GCC_OPTIMIZE = -O2
|
| 82 | export COM_GCC_OPTIMIZE = -O2
|
| 83 | export DRV_GCC_OPTIMIZE = -O2
|
| 84 | export PS_GCC_OPTIMIZE = -O2
|
| 85 | export TOOLS_GCC_OPTIMIZE = -O2
|
| 86 |
|