⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 ringertest.mak

📁 复件 使用IRINGERMGR接口设置手机铃声的例子
💻 MAK
字号:

#-----------------------------------------------------------------------
# Target File Name and Type Definitions
#   (you'll need to specify a target name; i.e. what you want the
#    program to be called)
#-----------------------------------------------------------------------
TARGET	=   ringertest
EXETYPE	=	elf
BINARY  =	bin
MODULE	=	mod

#-----------------------------------------------------------
# Additional objects apart from $(TARGET).o 
#-----------------------------------------------------------
ADD_OBJS =  

#-----------------------------------------------------------------------
# Set the object files that we care about
# (if your program has more than one source file, you'll need to add
# the rest of them to this list (changing the extension to .o))
#-----------------------------------------------------------------------
APP_OBJS =	AEEModGen.o AEEAppGen.o GCCResolver.o $(ADD_OBJS) $(TARGET).o

#-----------------------------------------------------------------------
# Target compile time symbol definitions
#
# Tells the SDK source stuffs that we're building a dynamic app.
#-----------------------------------------------------------------------
DEFINES = 	-DDYNAMIC_APP

#-----------------------------------------------------------------------
# Software tool and environment definitions
#   (GCCHOMEPATH needs to be set to the location of your gcc cross-compiler
#    and binutils.  ELF2MODTOOLPATH needs to set to the location of of
#	BREWelf2mod.exe)
#-----------------------------------------------------------------------
GCCHOMEPATH  =  c:/gnude
GCCBINPATH = $(GCCHOMEPATH)/bin
ELF2MODTOOLPATH = $(GCCHOMEPATH)/bin

#-----------------------------------------------------------
# Fix the path here to location of AEEAppGen.c and AEEModGen.c
#-----------------------------------------------------------
AEESRCPATH = ../../src

#-----------------------------------------------------------
# Fix the path here to location of BREW header files
#-----------------------------------------------------------
AEEINCPATH = ../../inc

GCC	=	$(GCCBINPATH)/arm-elf-gcc.exe
LD	=	$(GCCBINPATH)/arm-elf-ld.exe
ELF2MODTOOL	=	$(ELF2MODTOOLPATH)/BREWelf2mod.exe

#-----------------------------------------------------------------------
# Compiler optimization options
#   -O0 disables compiler optimizations.  Other options probably work as
#     well.  Set to taste.
#-----------------------------------------------------------------------
OPT	=	-O2

#-----------------------------------------------------------------------
# Compiler code generation options
#   Add $(TARG) to the CODE line if you're building a Thumb binary (at
#   the moment, this doesn't work).
#-----------------------------------------------------------------------
END	=	-mlittle-endian
TARG =	-mthumb
CODE =	$(END) -fshort-enums -fno-builtin

#-----------------------------------------------------------------------
# Include file search path options
#   (change this to point to where the BREW SDK headers are located)
#-----------------------------------------------------------------------
INC	=	-I$(AEEINCPATH) -I$(GCCHOMEPATH)\lib\gcc-lib\arm-elf\include -I$(GCCHOMEPATH)\arm-elf\include 

#-----------------------------------------------------------------------
# Library search path options. It points the location of libgcc.a
#-----------------------------------------------------------------------
LIBDIRS = -L$(GCCHOMEPATH)/lib/gcc-lib/arm-elf/3.3 -L$(GCCHOMEPATH)/arm-elf/lib

#-----------------------------------------------------------------------
# Nothing below here (except for the dependencies at the bottom of the
#  file) should need to be changed for a reasonably normal compilation.
#-----------------------------------------------------------------------

#-----------------------------------------------------------------------
# Processor architecture options
# Sets the designated target processor for this applet.
# Currently, all BREW phones use the ARM 7t chip
#-----------------------------------------------------------------------
CPU	=	-mcpu=arm7tdmi

#-----------------------------------------------------------------------
# ARM Procedure Call Standard (APCS) options
# -fPIC             sets posititon independent code.  Other option: -fpic
# -mthumb-interwork enables switching between ARM and Thumb code
# -mapcs-frame      runs on systems with the frame ptr. specified in the
# 			APCS
#-----------------------------------------------------------------------
ROPI	=	
INTRWK	=	-mthumb-interwork
APCS	=	-mapcs-frame $(ROPI) $(INTRWK)

#-----------------------------------------------------------------------
# Compiler output options
# -c sets object file output only
#-----------------------------------------------------------------------
OUT	=	-c

#-----------------------------------------------------------------------
# Compiler/assembler debug Options
#   -g is the standard flag to leave debugging information in the
#   object files.
#-----------------------------------------------------------------------
#DBG	=	-g
DBG	=	

#-----------------------------------------------------------------------
# Compiler flag definitions
#-----------------------------------------------------------------------
CFLAGS0 =	$(OUT) $(DEFINES) $(CPU) $(APCS) $(CODE) $(DBG)
CFLAGS =	$(CFLAGS0) $(INC) $(OPT) 

#-----------------------------------------------------------------------
# Linker Options
# -o sets the output filename
#-----------------------------------------------------------------------
LINK_CMD  = -Ttext 0 --emit-relocs -entry AEEMod_Load -o
LIBS      = -lgcc -lsupc++ -lc

#-----------------------------------------------------------------------
# Linker flag definitions
#-----------------------------------------------------------------------
LDFLAGS =	$(LIBDIRS)

#-----------------------------------------------------------------------
# Default target
#-----------------------------------------------------------------------
default: $(TARGET).$(MODULE)

#-----------------------------------------------------------------------
# All target
#-----------------------------------------------------------------------
all: $(TARGET).$(MODULE)

#-----------------------------------------------------------------------
# Targets for making the actual binary
#-----------------------------------------------------------------------
$(TARGET).$(MODULE) :   $(TARGET).$(EXETYPE)
	$(ELF2MODTOOL) $(TARGET).$(EXETYPE) $(TARGET).$(MODULE)

$(TARGET).$(EXETYPE) :  $(APP_OBJS)
	$(LD) $(LINK_CMD) $(TARGET).$(EXETYPE) $(LDFLAGS) \
	$(APP_OBJS) $(LIBS) $(LINK_ORDER)

#-----------------------------------------------------------------------
# Cleanup 
#-----------------------------------------------------------------------
clean:
	rm -f $(APP_OBJS) $(TARGET).$(EXETYPE) $(TARGET).$(MODULE)		

#-----------------------------------------------------------------------
# Object File Dependencies
#   You may well want to add more dependencies here.
#-----------------------------------------------------------------------
$(TARGET).o:	$(TARGET).c

AEEAppGen.o:
	$(GCC) $(CFLAGS) -o AEEAppGen.o $(AEESRCPATH)/AEEAppGen.c
AEEModGen.o:
	$(GCC) $(CFLAGS) -o AEEModGen.o $(AEESRCPATH)/AEEModGen.c
GCCResolver.o: 
	$(GCC) $(CFLAGS) -o GCCResolver.o $(AEESRCPATH)/GCCResolver.c
ringertest.o: ./ringertest.c 
	$(GCC) $(CFLAGS) -o ringertest.o ./ringertest.c



⌨️ 快捷键说明

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