# make.defs # # Copyright (c) 1997-1999 Symbian Ltd. All rights reserved. # # # Common makefile definitions # $Revision: 1.12 $ # !if exist($(BUILD_DIR)\make.ini) !include $(BUILD_DIR)\make.ini !endif EPOC32_SRC = $(TOPDIR)\src\epoc EPOC_SRC = $(TOPDIR)\src\epoc SHARE_SRC = $(TOPDIR)\src\share OPTIONAL_SRC = $(TOPDIR)\src\share\optional BUILD_SRC = $(TOPDIR)\build\epoc # BUILDLOCALE: Set to the locale to build for. # Current supported: # en_US - English US # ja - Japan # ALL - all locales !ifndef BUILDLOCALE BUILDLOCALE = ALL !endif !ifdef ALT_JAVADIR JAVADIR = $(ALT_JAVADIR) !else JAVADIR = c:\apps\jdk1.1.8 !endif # Location of the "epoc32" directory, # e.g. the location of "\Quartz\epoc32". !ifdef ALT_EPOCDIR EPOCDIR = $(ALT_EPOCDIR) !else EPOCDIR = $(TOPDIR)\..\Epoc32 !endif # This default is redefined during a release build. RELEASE = internal_build FULL_VERSION = internal_build # Undefine if JNI is the preferred native interface LIBSTUBS = $(OBJ)\libstubs.$O !ifndef platform platform = $(default_platform) !endif !ifndef build build = $(default_build) !endif !if "$(target)" == "" default_platform = emulation-unicode !else if "$(target)" == "unicode" default_platform = emulation-unicode !else default_platform = $(target) !endif !if "$(platform)" == "emulation-unicode" EMULATION = UNICODE = U = U TRG = WINS TRG_DEFINES = -D__WINS__ other_platforms = arm-unicode arm4-unicode thumb-unicode !else if "$(platform)" == "arm-unicode" GNU = UNICODE = U = U TRG = ARMI TRG_DEFINES = -D__MARM__ -D__MARM_ARMI__ GCC_OPTS= -march=armv4t -mthumb-interwork DLLTOOL_OPTS= -m arm_interwork other_platforms = emulation-unicode arm4-unicode thumb-unicode !else if "$(platform)" == "arm4-unicode" GNU = UNICODE = U = U TRG = ARM4 TRG_DEFINES = -D__MARM__ -D__MARM_ARM4__ GCC_OPTS= -march=armv4 DLLTOOL_OPTS= -m arm other_platforms = emulation-unicode arm-unicode thumb-unicode !else if "$(platform)" == "thumb-unicode" GNU = UNICODE = U = U TRG = THUMB TRG_DEFINES = -D__MARM__ -D__MARM_THUMB__ GCC_OPTS= -mthumb-interwork DLLTOOL_OPTS= -m thumb other_platforms = emulation-unicode arm-unicode arm4-unicode !else !error don't know how to build platform "$(platform)" !endif P = -$(platform) all_platforms = $(platform) $(other_platforms) unicode !ifdef EMULATION REL = $UDEB default_build = debug !else REL = $UREL default_build = optimized !endif !if "$(build)" == "debug" DEBUG = G = _g BLD = $UDEB other_build = optimized !else G = BLD = $UREL other_build = debug !endif !ifdef EMULATION CLASSES = $(TOPDIR)\classes JAVAC_FLAGS = -g !else !ifdef DEBUG CLASSES = $(TOPDIR)\classes JAVAC_FLAGS = -g !else CLASSES = $(TOPDIR)\classes-rel !endif !endif MAKEDEFS = RELEASE=$(RELEASE) FULL_VERSION=$(FULL_VERSION) TRGDEBBLD = $(EPOCDIR)\Release\$(TRG)\UDEB TRGRELBLD = $(EPOCDIR)\Release\$(TRG)\UREL TRGDIR = $(EPOCDIR)\Release\$(TRG)\$(REL) TRGBLD = $(EPOCDIR)\Release\$(TRG)\$(BLD) BINDIR = $(TOPDIR)\bin LIBDIR = $(TOPDIR)\lib !ifdef EMULATION BIN_TRG = $(TRGBLD) BINTREE = $(BINDIR) !else BIN_TRG = $(BINDIR)\$(platform) BINTREE = $(BIN_TRG) $(BINDIR) !endif LIB_TRG = $(LIBDIR)\$(platform) LIBTREE = $(LIB_TRG) $(LIBDIR) CLASSHEADERS = CClassHeaders INC_CLASSHEADERS = $(TOPDIR)\include\CClassHeaders JNI_CLASSHEADERS = $(INC_CLASSHEADERS)\jni NMI_CLASSHEADERS = $(INC_CLASSHEADERS)\nmi !if "$(binary)" != "" OBJ = $(OBJ_TRG) !endif OBJ_TRG = obj$G$P SUBDIRS = $(CLASSES) $(BINTREE) $(LIBTREE) $(CLASSHEADERS) $(INC_CLASSHEADERS) $(OBJ) !if "$(OS)" == "Windows_NT" DEL = del/f/q 2>nul DELTREE = rmdir/s/q 2>nul RMDIR = rmdir 2>nul !else DEL = deltree/y DELTREE = deltree/y RMDIR = rmdir !endif ZIP = zip ZIPFLAGS = -@ $(EXTRA_ZIPFLAGS) !ifdef GNU !if "$(platform)" == "thumb-unicode" CC = thumb-epoc-pe-gcc CPP = thumb-epoc-pe-gcc !else CC = gcc CPP = gcc !endif LD = ld DLLTOOL = dlltool $(DLLTOOL_OPTS) AR = ar RANLIB = ranlib CTRG = -c -o $@ CPPTRG = -c -o $@ O = o SYM = sym !else CC = cl CPP = cl LINK = link LIBMGR = lib -nologo -machine:i386 -nodefaultlib CTRG = -c -Fo$@ CPPTRG = -c -Fo$@ O = obj SYM = pdb !endif STD_C_INCLUDES= -I$(EPOCDIR)\Include\libc INCLUDES = -I. \ -I$(TOPDIR)\include \ -I$(TOPDIR)\include\epoc32 \ -I$(CLASSHEADERS) \ -I$(INC_CLASSHEADERS) \ -I$(JNI_CLASSHEADERS) \ -I$(NMI_CLASSHEADERS) \ -I$(EPOCDIR)\Include \ $(STD_C_INCLUDES) \ $(EXTRA_INCLUDES) !if "$(binary)" == "program" BASEDEFINES = -D__PSISOFT32__ -D__EXE__ !else BASEDEFINES = -D__PSISOFT32__ -D__DLL__ !endif !ifdef GNU GNU_DEFINES = -D__GCC32__ -DRELEASE="$(RELEASE)" !else GNU_DEFINES = -D__VC32__ -DRELEASE="\"$(RELEASE)\"" !endif !ifdef EMULATION EMULATION_DEFINES = $(TRG_DEFINES) !else EMULATION_DEFINES = -D__EPOC32__ $(TRG_DEFINES) !endif !ifdef UNICODE UNICODE_DEFINES = -D_UNICODE -DUNICODE !else UNICODE_DEFINES = !endif !ifdef DEBUG DEBUG_DEFINES = -D_DEBUG -DDEBUG -DTRACING -DBREAKPTS -DHPROF !else DEBUG_DEFINES = -DNDEBUG !endif DEFINES = $(BASEDEFINES) $(GNU_DEFINES) $(EMULATION_DEFINES) $(UNICODE_DEFINES) $(DEBUG_DEFINES) $(EXTRA_DEFINES) !ifdef GNU BASECFLAGS = -nostdinc $(GCC_OPTS) -pipe BASECPPFLAGS = -nostdinc $(GCC_OPTS) -pipe \ -Wall -Wno-ctor-dtor-privacy !if "$(binary)" == "program" !if "$(platform)" == "thumb-unicode" BASELFLAGS = --thumb-entry _E32Startup -u _E32Startup !else BASELFLAGS = -e _E32Startup -u _E32Startup !endif !else !if "$(platform)" == "thumb-unicode" BASELFLAGS = --dll --thumb-entry _E32Dll -u _E32Dll !else BASELFLAGS = --dll -e _E32Dll -u _E32Dll !endif !endif !ifdef DEBUG CDEBUG = -O -g CPPDEBUG = -O -g LDEBUG = STRIP = strip -X !else CDEBUG = -O -s -fomit-frame-pointer CPPDEBUG = -O -s -fomit-frame-pointer LDEBUG = -s STRIP = $(DEL) !endif !else BASECFLAGS = -nologo -Zl -Zp4 -QIfdiv- BASECPPFLAGS = -nologo -Zl -Zp4 -QIfdiv- -W4 !if "$(binary)" == "program" BASELFLAGS = -nologo -machine:i386 -nodefaultlib -subsystem:console -entry:_E32Startup -include:"?_E32Startup@@YGXXZ" !else BASELFLAGS = -nologo -machine:i386 -nodefaultlib -subsystem:windows -dll -entry:_E32Dll -include:"?_E32Dll@@YGHPAXI0@Z" !endif !ifdef DEBUG CDEBUG = -Z7 -Od -Ob1 CPPDEBUG = -Z7 -Od -Ob1 LDEBUG = -debug !else #CDEBUG = -O1 -G5 #CPPDEBUG = -O1 -G5 LDEBUG = !endif !endif CFLAGS = $(BASECFLAGS) $(CDEBUG) $(DEFINES) $(INCLUDES) $(EXTRA_CFLAGS) CPPFLAGS = $(BASECPPFLAGS) $(CPPDEBUG) $(DEFINES) $(INCLUDES) $(EXTRA_CPPFLAGS) LFLAGS = $(BASELFLAGS) $(LDEBUG) $(EXTRA_LFLAGS) !ifdef EMULATION LIBS = $(EXTRA_LIBS) $(TRGDIR)\euser.lib $(TRGDIR)\wserv.lib $(TRGDIR)\estlib.lib $(TRGDIR)\mediaclient.lib $(TRGDIR)\mediaclientaudio.lib $(TRGDIR)\powermgrcli.lib !else LIBS = $(EXTRA_LIBS) $(TRGDIR)\euser.lib $(TRGDIR)\estlib.lib $(TRGDIR)\mediaclient.lib $(TRGDIR)\mediaclientaudio.lib $(TRGDIR)\powermgrcli.lib !endif PEUIDS = $(UID1_FLAG) $(UID2_FLAG) $(UID3_FLAG) !if "$(binary)" == "program" UID1_FLAG = -uid1 0x1000007a BASEPEFLAGS = -stack 0x5000 -heap 0x00001000 0x02000000 !else UID1_FLAG = -uid1 0x10000079 BASEPEFLAGS = !endif PEFLAGS = $(BASEPEFLAGS) $(PEUIDS) $(EXTRA_PEFLAGS) BASEJROMFLAGS = -classpath $(CLASSES) !ifdef DEBUG JROMDEBUG = -jcov !else JROMDEBUG = !endif JROMFLAGS = $(BASEJROMFLAGS) $(JROMDEBUG) $(EXTRA_JROMFLAGS) !ifdef EMULATION JROMTRG = -o $@ x86 !else JROMTRG = -o $@ arm !endif EPOC32_JAVA = $(EPOC_SRC)\java SHARE_JAVA = $(SHARE_SRC)\java BUILD_JAVA = $(BUILD_SRC)\java EPOC32_SUN = $(EPOC_SRC)\sun SHARE_SUN = $(SHARE_SRC)\sun BUILD_SUN = $(BUILD_SRC)\sun COM_CLASSES = $(CLASSES)\com COM_SOURCES = $(SHARE_COM)\com JAVA_CLASSES = $(CLASSES)\java JAVA_SOURCES = $(SHARE_JAVA)\java SHARE_COM = $(SHARE_SRC)\com SHARE_OPTIONAL = $(SHARE_SRC)\optional SUN_CLASSES = $(CLASSES)\sun SUN_SOURCES = $(SHARE_SUN)\sun CLASSLIST = $(TOPDIR)\classes.list RUNTIME_LIBNAME = pjavai JAVALIB = $(LIB_TRG)\$(RUNTIME_LIBNAME)$G.lib JAVADEF = $(LIBDIR)\$(RUNTIME_LIBNAME)$G.def JAVAUID = 0x10000348 JAVANAME = $(RUNTIME_LIBNAME)$G[10000348].dll JAVAH = javah JAVAC = javac JAR = jar RMIC = rmic PETRAN = petran JDLL = Jdll JNIEXPORTS = JNIExports !ifdef GNU EXP2DEF = JDFGen GCC !else EXP2DEF = JDFGen MS !endif !ifndef DEBUGAGENT DEBUGAGENT=true !endif !ifdef PACKAGE_DEFS_MK !include $(PACKAGE_DEFS_MK) !else !include default-package-defs.mk !endif