SmartAudio/lichee/brandy/basic_loader/boot0/make.cfg

144 lines
4.8 KiB
INI
Raw Normal View History

2018-07-13 01:31:50 +00:00
#/*
#*********************************************************************************************************
#* MELIS
#* the Easy Portable/Player Develop Kits
#* makefile Module
#*
#* (c) Copyright 2006-2010, kevin.z China
#* All Rights Reserved
#*
#* File : make.cfg
#* By : kevin.z
#* Version : v1.0
#* Date : 2010-9-3 9:39
#* Descript:
#* Update : date auther ver notes
#*********************************************************************************************************
#*/
ROOT = .
SDKROOT = $(ROOT)/..
#<23><><EFBFBD><EFBFBD><EBBDBB><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ͨ<EFBFBD><CDA8><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
include $(SDKROOT)/config/${ARM_CROSS_TOOL}.CFG
include $(SDKROOT)/bsp/$(BSP_PATH)/include/run_addr.cfg
<>ļ<EFBFBD>·<EFBFBD><C2B7><EFBFBD>б<EFBFBD>
INCLUDES = -I$(ROOT) \
-I$(SDKROOT)/config \
-I$(SDKROOT)/bsp \
-I$(SDKROOT)/bsp/$(BSP_PATH) \
-I$(SDKROOT)/bsp/$(BSP_PATH)/include \
-I$(SDKROOT)/bsp/$(BSP_PATH)/include/interinc \
-I$(SDKROOT)/bsp/$(BSP_PATH)/common \
-I$(SDKROOT)/bsp/$(BSP_PATH)/init_dram \
-I$(SDKROOT)/bsp/$(BSP_PATH)/uart \
-I$(SDKROOT)/bsp/$(BSP_PATH)/gpio
ifeq ($(STORAGE_MEDIA_TYPE) , STORAGE_SPINOR)
INCLUDES += -I$(SDKROOT)/bsp/$(BSP_PATH)/spi
endif
LINK_SCT = --scatter=$(ROOT)/config/config.sct
#<23><><EFBFBD>ļ<EFBFBD><C4BC>б<EFBFBD>
ifeq ($(STORAGE_MEDIA_TYPE), STORAGE_NAND)
LIBS =
STORAGE_TYPE = -I$(SDKROOT)/config/storage_media_cfg/nand
SRCDIRS = $(shell find $(ROOT)/load_Boot1_from_nand -maxdepth 5 -type d) \
$(shell find $(SDKROOT)/bsp/$(BSP_PATH)/nand -maxdepth 5 -type d)
TARGET = $(LICHEEPATH)/bin/boot0_nand_$(ARCH).bin
ifneq ($(ARCH1), )
LICHEEOLDPATH = $(SDKROOT)/../../tools/pack/chips/$(ARCH1)
TARGET1 = $(LICHEEOLDPATH)/bin/boot0_nand_$(ARCH1).bin
endif
LOCALTARGET = __boot0_nand_$(ARCH).axf
else
ifeq ($(STORAGE_MEDIA_TYPE), STORAGE_SDMMC)
LIBS =
STORAGE_TYPE = -I$(SDKROOT)/config/storage_media_cfg/sdcard
SRCDIRS = $(shell find $(ROOT)/load_Boot1_from_sdmmc -maxdepth 3 -type d)
TARGET = $(LICHEEPATH)/bin/boot0_sdcard_$(ARCH).bin
ifneq ($(ARCH1), )
LICHEEOLDPATH = $(SDKROOT)/../../tools/pack/chips/$(ARCH1)
TARGET1 = $(LICHEEOLDPATH)/bin/boot0_sdcard_$(ARCH1).bin
endif
LOCALTARGET = __boot0_sdmmc_$(ARCH).axf
else
ifeq ($(STORAGE_MEDIA_TYPE), STORAGE_SPINOR)
LIBS =
STORAGE_TYPE = -I$(SDKROOT)/config/storage_media_cfg/spinor
SRCDIRS = $(shell find $(ROOT)/load_Boot1_from_spinor -maxdepth 3 -type d) \
$(shell find $(SDKROOT)/bsp/$(BSP_PATH)/spi -maxdepth 5 -type d)
TARGET = $(LICHEEPATH)/bin/boot0_spinor_$(ARCH).bin
ifneq ($(ARCH1), )
LICHEEOLDPATH = $(SDKROOT)/../../tools/pack/chips/$(ARCH1)
TARGET1 = $(LICHEEOLDPATH)/bin/boot0_spinor_$(ARCH1).bin
endif
LOCALTARGET = __boot0_spinor_$(ARCH).axf
else
error:
$(error STORAGE_MEDIA_TYPE is invalid now!!!)
endif
endif
endif
#<23><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ɵ<EFBFBD>Ŀ<EFBFBD><C4BF><EFBFBD>ļ<EFBFBD>(<28><><EFBFBD><EFBFBD>/<2F><><EFBFBD><EFBFBD>)
TMPTARGET = $(ROOT)/boot0_origin.bin
#<23>г<EFBFBD><D0B3>ù<EFBFBD><C3B9><EFBFBD><EFBFBD>µ<EFBFBD><C2B5><EFBFBD><EFBFBD>а<EFBFBD><D0B0><EFBFBD>Դ<EFBFBD><D4B4><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ŀ¼
SRCDIRS := $(SRCDIRS) \
$(ROOT) \
$(shell find $(ROOT)/drv -maxdepth 3 -type d) \
$(shell find $(ROOT)/lib -maxdepth 3 -type d) \
$(shell find $(ROOT)/sys_op -maxdepth 3 -type d)\
$(SDKROOT)/bsp/$(BSP_PATH)/common \
$(SDKROOT)/bsp/$(BSP_PATH)/init_dram \
$(SDKROOT)/bsp/$(BSP_PATH)/uart \
$(SDKROOT)/bsp/$(BSP_PATH)/gpio
INCLUDES := $(INCLUDES) \
$(STORAGE_TYPE) \
$(foreach dir,$(SRCDIRS),-I$(dir))
ifeq ($(CROSSTOOL), ARMRVDS)
#===============================================================================
#ʹ<><CAB9>RVDS<44><53><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
#===============================================================================
#<23><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ӽű<D3BD>
LINK_SCT := $(LINK_SCT)
#<23><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>չ<EFBFBD><D5B9><EFBFBD><EFBFBD>
CFLAGS := $(CFLAGS) -O2 --debug
CFLAGS := $(CFLAGS) $(INCLUDES)
ifeq ($(FLAGS) , SUN7I_HOMLET)
CFLAGS :=$(CFLAGS) -D$(FLAGS)
endif
#<23><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>չ<EFBFBD><D5B9><EFBFBD><EFBFBD>
ASFLAGS := $(ASFLAGS) --debug --keep
ASFLAGS := $(ASFLAGS) $(INCLUDES)
#<23><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>չ<EFBFBD><D5B9><EFBFBD><EFBFBD>
LKFLAGS := $(LKFLAGS) --pd="-DRUN_ADDR=$(BOOT0_RUN_ADDR)" $(LINK_SCT)
#<23><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>չ<EFBFBD><D5B9><EFBFBD><EFBFBD>
LDFLAGS := $(LDFLAGS) --bin --output
else
#===============================================================================
#ʹ<><CAB9>GNU-GCC<43><43><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
#===============================================================================
error:
$(error GNU Cross-tool is invalid now!!!)
endif