#============================================================================ # Name: # $(TARGET)_rvctb30.mak # # Description: # Makefile to build the $(TARGET) downloadable module. # # The following nmake targets are available in this makefile: # # all - make .elf and .mod image files (default) # clean - delete object directory and image files # filename.o - make object file # # The above targets can be made with the following command: # # nmake /f $(TARGET)_rvctb30.mak [target] # # Assumptions: # 1. ARMBIN environment variable points to location of ARM RVCT v3.0 application directory # 2. ARMINC environment variable points to location of ARM RVCT v3.0 include file directory # 3. ARMLIB environment variable points to location of ARM RVCT v3.0 library directory # 4. SFHOME environment variable points to location of SophiaFramework # 5. BREWDIR environment variable points to location of BREW SDK # 6. ELF2MOD_TOOL_PATH environment variable points to location of BREW Elf2Mod # #============================================================================ #============================================================================ SF_HOME = $(SFHOME) BREW_HOME = $(BREWDIR) TARGET = OBJS = APP_INCLUDES = -I "$(BREWDIR)\inc" -I "$(SF_HOME)\Include" #------------------------------------------------------------------------------- # Target file name and type definitions # elf : Target image file format # mod : Downloadable module extension #------------------------------------------------------------------------------- EXETYPE = elf MODULE = mod #------------------------------------------------------------------------------- # Target compile time symbol definitions # # Tells the SDK source stuffs that we're building a dynamic app. #------------------------------------------------------------------------------- DYNAPP = -DDYNAMIC_APP # Use KDDI Wrapper Classes #DYNAPP = -DDYNAMIC_APP -DTARGET_EXTENSION_KDDI #------------------------------------------------------------------------------- # Software tool and environment definitions #------------------------------------------------------------------------------- ARMBIN = $(RVCT30BIN) ARMINC = $(RVCT30INC) ARMLIB = $(RVCT30LIB) ARMCPP = "$(ARMBIN)\armcpp" LD = "$(ARMBIN)\armlink" ELF2MODTOOL = "$(ELF2MOD_TOOL_PATH)\elf2mod.exe" # Use Thumb #ARMCPP ="$(ARMBIN)\tcpp" #------------------------------------------------------------------------------- # Processor architecture options # ARM7TDMI : Currently, all BREW phones use the ARM 7t compatible chip #------------------------------------------------------------------------------- CPU = --cpu ARM7TDMI #------------------------------------------------------------------------------- # ARM Procedure Call Standard (APCS) options # ropi : Read-Only (code) Position independence # interwork : Allow ARM-Thumb interworking #------------------------------------------------------------------------------- ROPI = ropi INTERWRK = interwork APCS = --apcs /$(ROPI)/$(INTERWRK)/norwpi #------------------------------------------------------------------------------- # Additional compile time error checking options #------------------------------------------------------------------------------- CHK = #------------------------------------------------------------------------------- # Compiler output options # -c : sets object file output only #------------------------------------------------------------------------------- OUT = -c #------------------------------------------------------------------------------- # Compiler/assembler debug options # --no_debug : outputs no debug codes #------------------------------------------------------------------------------- DBG = --no_debug #------------------------------------------------------------------------------- # Compiler optimization options # ex. -Otime -O2, -Ospace -O3, ... #------------------------------------------------------------------------------- OPT = -Ospace -O2 #------------------------------------------------------------------------------- # Compiler code generation options #------------------------------------------------------------------------------- END = --littleend ZA = --split_sections CODE = $(END) $(ZA) #------------------------------------------------------------------------------- # Include file search path options #------------------------------------------------------------------------------- INC = $(APP_INCLUDES) #------------------------------------------------------------------------------- # Linker options # -o : specifies output file on linking #------------------------------------------------------------------------------- LINK_CMD = -o LINK_ORDER = --first AEEMod_Load LIBS = "$(SF_HOME)\Library\SophiaFrameworkBrew400JpnRVCTB30.a" # Link Thumb SophiaFramework Library #LIBS = "$(SF_HOME)\Library\SophiaFrameworkBrew400JpnRVCTB30Thumb.a" # Link KDDI Wrapper Class Library #LIBS = "$(SF_HOME)\Library\SophiaFrameworkKDDI400JpnRVCTB30.a" "$(SF_HOME)\Library\SophiaFrameworkBrew400JpnRVCTB30.a" # Link Thumb SophiaFramework Library and Thumb KDDI Wrapper Class Library #LIBS = "$(SF_HOME)\Library\SophiaFrameworkKDDI400JpnRVCTB30Thumb.a" "$(SF_HOME)\Library\SophiaFrameworkBrew400JpnRVCTB30Thumb.a" #------------------------------------------------------------------------------- # Compiler flag definitions #------------------------------------------------------------------------------- CFLAGS0 = $(OUT) $(DYNAPP) $(CPU) $(APCS) $(CODE) $(CHK) $(DBG) CFLAGS = $(CFLAGS0) $(OPT) #------------------------------------------------------------------------------- # Linker flag definitions #------------------------------------------------------------------------------- LFLAGS = --split --reloc --entry AEEMod_Load --ro-base 0 #---------------------------------------------------------------------------- # Default target #---------------------------------------------------------------------------- all : $(TARGET).$(MODULE) #---------------------------------------------------------------------------- # Clean target #---------------------------------------------------------------------------- # The object subdirectory, target image file, and target hex file are deleted. clean : @echo --------------------------------------------------------------- @echo CLEAN -del /f $(OBJS) -del /f $(TARGET).$(EXETYPE) -del /f $(TARGET).$(MODULE) @echo --------------------------------------------------------------- #============================================================================ # DEFAULT SUFFIX RULES # -o : specifies output filename #============================================================================ OBJ_CMD = -o SRC_CPP_FILE = $(@F:.o=.cpp) OBJ_FILE = $(OBJ_CMD) $(@F) .SUFFIXES : .o .dep .c .cpp #-------------------------------------------------------------------------- # C code inference rules #---------------------------------------------------------------------------- .cpp.o: @echo --------------------------------------------------------------- @echo OBJECT $(@F) $(ARMCPP) $(CFLAGS) $(INC) $(OBJ_FILE) $(SRC_CPP_FILE) @echo --------------------------------------------------------------- #=============================================================================== # MODULE SPECIFIC RULES #=============================================================================== APP_OBJS = $(OBJS) $(LIBS) #---------------------------------------------------------------------------- # Lib file targets #---------------------------------------------------------------------------- $(TARGET).$(MODULE) : $(TARGET).$(EXETYPE) @echo --------------------------------------------------------------- @echo TARGET $@ $(ELF2MODTOOL) $(TARGET).$(EXETYPE) $(TARGET).$(MODULE) $(TARGET).$(EXETYPE) : $(APP_OBJS) @echo --------------------------------------------------------------- @echo TARGET $@ $(LD) $(LINK_CMD) $(TARGET).$(EXETYPE) $(LFLAGS) $(APP_OBJS) $(LINK_ORDER) #---------------------------------------------------------------------------- # Applet Specific Rules #---------------------------------------------------------------------------- # -------------------------------------------- # DEPENDENCY LIST, DO NOT EDIT BELOW THIS LINE # --------------------------------------------