rules.min

来自「在高通的手机平台下,一个下载手机.bin文件到手机的flash中的工具,包含PC」· MIN 代码 · 共 1,072 行 · 第 1/4 页

MIN
1,072
字号
#============================================================================
#  Name:
#    RULES.MIN
#
#  Description:
#    An includable component of the makefile to build the DMSS software for
#    the SURF (Subscriber Unit Reference Design).
#
#    This file specifies the make file rules that are common across all
#    targets and makefiles
#
# Copyright (c) 2003, 2004       by QUALCOMM, Incorporated. All Rights Reserved.
#----------------------------------------------------------------------------
#============================================================================
#
#                        EDIT HISTORY FOR MODULE
#
# $Header: //depot/asic/msm6025/build/ms/rules.min#19 $ $DateTime: 2004/05/08 14:29:45 $ $Author: sundarn $
#
# when       who       what, where, why
#--------    --------   ----------------------------------------------------------
#07/22/04   fraser.wang Create the Diamond Apps makefile baseline
#07/13/04   steade.shu Modified the compiler flags according to the review feedback and 
#                      update the file name for the present LCM.
#07/13/04    gx.jiang  Modified the code according to the feedback from the code
#                      review meeting, modified LT_DIAMOND_DRV as USES_LT_DIAMOND_DRV
# 07/01/04   gx.jiang  Added LT_DIAMOND_DRV Yamaha MA3 library support.
# 06/28/04  steade.shu Added LT_DIAMOND_DRV epson13716 library support.
# -------    ---------   --------------------------------------------------------

# 03/04/04   sun     Zif Lib 6122 Cust Name Change to reflect CMOS.
# 01/23/04   jkl     Added support for ZRF6122 library and PMIC3.
# 11/11/03   dbc     Added ZRF617X ZIF library target
# 11/11/03   jkl     Removed obsolete diag rules.
# 09/11/03   jkl     Added version number to be used by surf*.cmd.
# 08/27/03   jkl     Added vstarget1.
# 07/29/03   jkl     Removed unnecessary modules.
# 07/10/03   jkl     Initial revision for MSM6025.
#============================================================================


#===============================================================================
#                               TARGET RULES
#===============================================================================

# The following are the target rules supported by this makefile with the
# exception of the 'depend' target which is located at the end of this file.

BUILD_VERSION=-DBUILD_TARGET=\"$(BUILD)\" -DBUILD_VER=\"$(VERSION)\"

#-------------------------------------------------------------------------------
# Default target
#-------------------------------------------------------------------------------

# The default target lists the tool versions, creates an object subdirectory
# if required, and builds the target image file and hex file.  The mobile
# object includes the compile date and time and is deleted after each build
# to ensure that it will always be rebuilt to include accurate build date and
# time information.

# ZIF_PMIC_LIBS is used to build the different rf and pmic libraries that get shipped with the MSM6025.
ZIF_PMIC_LIBS = zrf6000_lib_targ zrf612x_lib_targ zrf617x_lib_targ zrf6122_lib_targ pmic/pmic2/pmic_targ pmic/pmic3/pmic3_targ rfmsm_targ

zrf6000_lib_TARGFILE = TARGS.H#
zrf612x_lib_TARGFILE = TARGSC.H#
zrf617x_lib_TARGFILE = TARGSBC5.H#
zrf6122_lib_TARGFILE = TARGSCMOS.H#
pmic/pmic2/pmic_TARGFILE = TARGS.H#
pmic/pmic3/pmic3_TARGFILE = TARGSCMOS.H#
rfmsm_TARGFILE = TARGSMSMLIB.H#

zrf6000_lib_CUSTNAME = $(CUSTNAME)#
zrf612x_lib_CUSTNAME = CPSXN#
zrf617x_lib_CUSTNAME = BC5PSXN#
zrf6122_lib_CUSTNAME = SCMOS#   
pmic/pmic2/pmic_CUSTNAME = PSXN#
pmic/pmic3/pmic3_CUSTNAME = SCMOS#
rfmsm_CUSTNAME = MSMLIB#

# LIBRARIES and OURLIBS is used to process the libraries that are specific
# to this target.  LIBRARIES specifies the target name and makefile name,
# whereas OURLIBS specifies the name of the library (.lib) file.
ifeq ($(USES_AUDFMT), yes)
	LIBRARIES := audfmt
	OURLIBS := audfmt.lib
endif

ifeq ($(USES_SAF), yes)
	LIBRARIES := $(LIBRARIES) saf
	OURLIBS := $(OURLIBS) saf.lib
endif

ifeq ($(USES_SFAT), yes)
	LIBRARIES := $(LIBRARIES) sfat
	OURLIBS := $(OURLIBS) sfat.lib
endif

ifeq ($(USES_ZIF), yes)
	OURLIBS := $(OURLIBS) $(ZIF_LIB).lib
endif

ifeq ($(USES_RFMSM), yes)
	OURLIBS := $(OURLIBS) $(RFMSM_LIB).lib
endif

ifeq ($(USES_PMIC), yes)
        OURLIBS := $(OURLIBS) pmic.lib
endif

ifeq ($(USES_PMIC3), yes)
        OURLIBS := $(OURLIBS) pmic3.lib
endif

ifeq ($(USES_OEM), yes)
        LIBRARIES := $(LIBRARIES) OEM
        OURLIBS := $(OURLIBS) OEM.lib
endif

# Added by gx.jiang and shu dan
ifeq ($(USES_LT_DIAMOND_DRV), yes)
        LIBRARIES := $(LIBRARIES) epson13716 ymma3
        OURLIBS := $(OURLIBS) epson13716.lib ymma3.lib

endif

ifeq ($(USES_OEMDiagMSM), yes)
        LIBRARIES := $(LIBRARIES) OEMDiagMSM
        OURLIBS := $(OURLIBS) OEMDiagMSM.lib
endif

ifeq ($(USES_BREW), yes)
        LIBRARIES := $(LIBRARIES) $(BREW_LIB_DIR)
        OURLIBS := $(OURLIBS) $(BREW_LIB_DIR)/AEE.lib  $(BREW_LIB_DIR)/AEEAddrBK.lib $(BREW_LIB_DIR)/AEERSA.lib $(BREW_LIB_DIR)/AEESSL.lib $(BREW_LIB_DIR)/AEESSLRootCerts.lib $(BREW_LIB_DIR)/AEEUnzip.lib $(BREW_LIB_DIR)/AEEWEB.lib $(BREW_LIB_DIR)/BREW.lib $(BREW_LIB_DIR)/PNG.lib $(BREW_LIB_DIR)/AEEDialog.lib $(BREW_LIB_DIR)/AEEMM.lib $(BREW_LIB_DIR)/AEEMenu.lib  $(BREW_LIB_DIR)/AEEControls.lib $(BREW_LIB_DIR)/AEESecurity.lib $(BREW_LIB_DIR)/AEEDB.lib $(BREW_LIB_DIR)/AEEPng.lib $(BREW_LIB_DIR)/AEEFont.lib $(BREW_LIB_DIR)/AEEBCI.lib $(BREW_LIB_DIR)/z.lib
endif

ifeq ($(USES_JAVA), yes)
        LIBRARIES := $(LIBRARIES) brew/apps/Java/java
        OURLIBS := $(OURLIBS) java.lib
endif

all : tools  $(TARGETDIR)/exist exe hex 
	@if test -f $(TARGETDIR)/mobile.o; then rm -f $(TARGETDIR)/mobile.o; fi

$(ZIF_PMIC_LIBS):
	@echo ------------------------------------------------------------------
	@echo Making library: $(@:_targ=)
	@if test -f $(@:_targ=).mak; then make --no-print-directory -f $(@:_targ=).mak TARGET=$(TARGET) TARGETDIR=$(@:_targ=)_OBJS TARGETID=$(TARGETID) CUSTNAME=$($(@:_targ=)_CUSTNAME) TOOLFILE=$(TOOLFILE) TARGFILE=$($(@:_targ=)_TARGFILE); fi
	@echo ------------------------------------------------------------------

$(LIBRARIES):
	@echo ------------------------------------------------------------------
	@echo Making library: $@
	@if test -f $@.mak; then make --no-print-directory -f $@.mak TARGET=$(TARGET) TARGETDIR=$(TARGETDIR) TARGETID=$(TARGETID) CUSTFILE=$(CUSTFILE) TOOLFILE=$(TOOLFILE) TARGFILE=$(TARGFILE); fi
	@echo ------------------------------------------------------------------

#-------------------------------------------------------------------------------
# Object directory target
#-------------------------------------------------------------------------------

# The object subdirectoy is created if it does not already exist.

$(TARGETDIR)/exist :
	@if test ! -f $(TARGETDIR)/exist; then mkdir $(TARGETDIR); fi
	@echo Building $(TARGETDIR) > $(TARGETDIR)/exist

#-------------------------------------------------------------------------------
# Image file target
#-------------------------------------------------------------------------------

# The target image file is produced by the linker in the selected image format,
# and then a hex file is created from the target image file.

OBJECT_LISTFILE = ~tmpobj.bak

# Image file
exe : $(TARGET).$(EXETYPE)


$(TARGET).$(EXETYPE) : $(TARGETDIR)\exist sources $(OBJECTS)
	@echo ---------------------------------------------------------------
	@echo TARGET $@
	@if test -f $(OBJECT_LISTFILE); then rm -f $(OBJECT_LISTFILE); fi
	@perl redirect.pl $(OBJECT_LISTFILE) $(OBJECTS)
	$(LD) -$(EXETYPE) $(LFLAGS) $(OBJ_CMD) $@ $(LIBS) $(OURLIBS) -VIA $(OBJECT_LISTFILE)
	@if test -f $(OBJECT_LISTFILE); then rm -f $(OBJECT_LISTFILE); fi

# Hex file

hex : $(TARGET).hex

$(TARGET).hex: $(TARGET).$(EXETYPE)
	@echo
	@echo TARGETDIR $(TARGETDIR).hex
	$(HEXCMD)
	@echo ---------------------------------------------------------------

#===============================================================================
#			     LOADEFS Directory Construction
#===============================================================================

#-------------------------------------------------------------------------------
# Clean target
#-------------------------------------------------------------------------------

# The object subdirectory, target image file, and target hex file are deleted.

clean : $(ZIF_PMIC_LIBS:_targ=_clean)
	@echo ---------------------------------------------------------------
	@echo CLEAN
	-if test -d $(TARGETDIR); then rm -rf $(TARGETDIR); fi
	-if test -f $(TARGET).$(EXETYPE); then rm -f $(TARGET).$(EXETYPE); fi
	-if test -f $(TARGET).hex; then rm -f $(TARGET).hex; fi
	-if test -f *._C; then rm -f *._C; fi
	@echo ---------------------------------------------------------------

$(ZIF_PMIC_LIBS:_targ=_clean):
	@echo ------------------------------------------------------------------
	@echo Cleaning library: $(@:_clean=)
	@if test -f $(@:_clean=).mak; then make --no-print-directory -f $(@:_clean=).mak clean TARGET=$(TARGET) TARGETDIR=$(@:_clean=)_OBJS TARGETID=$(TARGETID) CUSTFILE=$(CUSTFILE) TOOLFILE=$(TOOLFILE) TARGFILE=$($(@:_clean=)_TARGFILE); fi
	@echo ------------------------------------------------------------------


#-------------------------------------------------------------------------------
# Test target
#-------------------------------------------------------------------------------

# The flags and symbol definitions for the compiler, assembler and linker are
# listed for makefile test purposes.

test :
	@echo ------------------------------------------------------------------
	@echo AFLAGS : $(AFLAGS)
	@echo ------------------------------------------------------------------
	@echo DMSS_AFLAGS : $(DMSS_AFLAGS)
	@echo ------------------------------------------------------------------
	@echo CFLAGS : $(CFLAGS)
	@echo ------------------------------------------------------------------
	@echo DMSS_CFLAGS : $(DMSS_CFLAGS)
	@echo ------------------------------------------------------------------
	@echo LFLAGS : $(LFLAGS)
	@echo ------------------------------------------------------------------
	@echo LIBS : $(LIBS)
	@echo ------------------------------------------------------------------

#-------------------------------------------------------------------------------
# Tools target
#-------------------------------------------------------------------------------

# The tool versions are listed.


tools :
	@echo ------------------------------------------------------------------
	@echo $(ARM_VERSION_BANNER)
	@$(ARMCC) $(VER_FLAG)
	@$(CC)    $(VER_FLAG)
	@$(ASM)   $(VER_FLAG)
	@echo ------------------------------------------------------------------

#===============================================================================
#                           DEFAULT SUFFIX RULES
#===============================================================================

# The following are the default suffix rules used to compile all objects that
# are not specifically included in one of the module specific rules defined
# in the next section.

# The following macros are used to specify the output object file, MSG_FILE

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?