#! make -f #---------------------------------------------------------------------------- # Project: RVLDWC - Library - build - buildtools # File: commondefs.cctype.CW3 # # Copyright 2005 Nintendo. All rights reserved. # # These coded instructions, statements, and computer programs contain # proprietary information of Nintendo of America Inc. and/or Nintendo # Company Ltd., and are protected by Federal copyright law. They may # not be disclosed to third parties or copied or duplicated in any form, # in whole or in part, without the prior written consent of Nintendo. # # $Revision: 1.10 $ #---------------------------------------------------------------------------- EMPTY ?= SPACE ?= $(EMPTY) $(EMPTY) # ----------------------------------------------------------------------------- # # CodeWarrior directory setting. # CWFOLDER ?= C:\CW_RVL CWFOLDER_RVL ?= $(CWFOLDER) CW_ROOT := $(subst $(SPACE),\ ,$(subst \,/,$(CWFOLDER_RVL))) LM_LICENSE_FILE := $(subst /,\,$(CWFOLDER_RVL))\license.dat CW_BINDIR := $(CW_ROOT)/PowerPC_EABI_TOOLS/Command_Line_Tools CW_PPCDIR := $(CW_ROOT)/PowerPC_EABI_Support # ----------------------------------------------------------------------------- # # CodeWarrior command line tool. # CC := $(CW_BINDIR)/mwcceppc.exe AS := $(CW_BINDIR)/mwasmeppc.exe LD := $(CW_BINDIR)/mwldeppc.exe AR := $(CW_BINDIR)/mwldeppc.exe # ----------------------------------------------------------------------------- # # CodeWarrior include file and library settings. # CW_INCDIRS = $(CW_PPCDIR)/MSL/MSL_C/PPC_EABI/Include \ $(CW_PPCDIR)/MSL/MSL_C/MSL_Common/Include \ $(CW_PPCDIR)/MSL/MSL_C/MSL_Common_Embedded/Math/Include \ $(CW_PPCDIR)/MSL/MSL_C++/MSL_Common/Include \ $(CW_PPCDIR)/MSL/MSL_C++/PPC_EABI/Include \ $(CW_PPCDIR)/Runtime/Inc CW_LIBDIRS = $(CW_PPCDIR)/Runtime/Lib \ $(CW_PPCDIR)/MSL/MSL_C/PPC_EABI/Lib \ $(CW_PPCDIR)/MSL/MSL_C++/PPC_EABI/Lib CW_LIBS = Runtime.PPCEABI.H.a \ MSL_C.PPCEABI.bare.H.a \ MSL_C++.PPCEABI.bare.H.a ifdef TRK_INTEGRATION CW_LIBDIRS += $(CW_PPCDIR)/MetroTRK ifdef HOLLYWOOD_REV CW_LIBS += TRK_Hollywood_Revolution.a else CW_LIBS += TRK_MINNOW_DOLPHIN.a endif endif # ----------------------------------------------------------------------------- # # CodeWarrior standard include file and library environment variable settings. # export MWCIncludes := $(subst \;, ,$(subst $(SPACE),;,$(CW_INCDIRS))) export MWLibraries := $(subst \;, ,$(subst $(SPACE),;,$(CW_LIBDIRS))) export MWLibraryFiles := $(subst \;, ,$(subst $(SPACE),;,$(CW_LIBS))) ############################################################################### # # COMMON COMPILER FLAGS # ############################################################################### # ----------------------------------------------------------------------------- # for CodeWarrior # # -nodefaults - required so the compiler does not search all the # Codewarrior paths # -proc 750 - which CPU # -align powerpc - 4 byte alignment by default # -xm l - create a library CCFLAGS = -lang c -proc $(PROCESSOR) -align powerpc -enum int -DRVL -D_REVOLUTION CXXFLAGS = -lang c++ -proc $(PROCESSOR) -align powerpc -enum int -DRVL -D_REVOLUTION ASFLAGS = -proc $(PROCESSOR) ARFLAGS = -xm l LDFLAGS = -listclosure PLF_LDFLAGS = -nodefaults -nostdlib # ----------------------------------------------------------------------------- # Encoding settings. # ifeq ($(RVLDWC_LANG),jp) CCFLAGS += -encoding SJIS CXXFLAGS += -encoding SJIS else CCFLAGS += -encoding ascii CXXFLAGS += -encoding ascii endif # RVLDWC_LANG ############################################################################### # # EPPC-SPECIFIC Build Flags and Variables # ############################################################################### # ----------------------------------------------------------------------------- # for CodeWarrior # # -fp hardware - allow use of hardware FP instructions # -Cpp_exceptions - turns off C++ exceptions. CCFLAGS += -char signed -fp hardware -Cpp_exceptions off CXXFLAGS += -char signed -fp hardware -Cpp_exceptions off # ----------------------------------------------------------------------------- # for CATS # ifndef CATS_ON CCFLAGS += -pragma "cats off" CXXFLAGS += -pragma "cats off" endif # CATS_ON # ----------------------------------------------------------------------------- # -map - create a .MAP file that shows final memory layout of # all sections # -unused - show unused symbols # -fp hardware - linker must use same fp settings as compiler # Note that LDFLAGS automagically includes the required Metrowerks library # LDFLAGS += -fp hardware PLF_LDFLAGS += -fp hardware #---------------------------------------------------------------------------- # Relocatable module # ifdef TARGET_RSO CCFLAGS += -sdata 0 -sdata2 0 CXXFLAGS += -sdata 0 -sdata2 0 ASFLAGS += -sdata 0 -sdata2 0 endif # ----------------------------------------------------------------------------- # flag to generate object data...unfortunately it differs between # MACOS and EPPC COMPILE = -c CCFLAGS += $(SDK_MACROFLAGS) $(RVLDWC_MACROFLAGS) CXXFLAGS += $(SDK_MACROFLAGS) $(RVLDWC_MACROFLAGS) ASFLAGS += $(SDK_MACROFLAGS) $(RVLDWC_MACROFLAGS) ############################################################################### # # Dolphin SDK build configuration settings # This section can be skipped by defining DOLPHIN_MINFLAGS for building # application program. # ############################################################################### #### ifndef DOLPHIN_MINFLAGS # ----------------------------------------------------------------------------- # for CodeWarror # CCFLAGS += -W all -W nofilecaps -W nosysfilecaps CXXFLAGS += -W all -W nofilecaps -W nosysfilecaps LDFLAGS += -unused -map ${@:.elf=.map} PLF_LDFLAGS += -unused -map ${@:.plf=.map} -m _prolog -r1 -strip_partial ifeq ($(RVLDWC_BUILDNAME),DEBUG) # ----------------------------------------------------------------------------- # debug related flags # # -opt off - The debugger is very unhappy with any optimizations at all. # -inline off - disable all inlining # CCFLAGS += -opt off -inline off CXXFLAGS += -opt off -inline off # ----------------------------------------------------------------------------- # make DEBUG=TRUE NDEBUGINFO=TRUE # for DEBUG lib without debug information # # -g - generate full debug symbolics # ifndef RVLDWC_NODEBUGINFO LDFLAGS += -g CCFLAGS += -g CXXFLAGS += -g ASFLAGS += -g PLF_LDFLAGS += -g endif # RVLDWC_NODEBUGINFO else # $(RVLDWC_BUILDNAME is RELEASE or FINAL # ----------------------------------------------------------------------------- # -O4,p - full optimizations, optimize for speed (not code size) # -inline auto - inline small functions where possible, # even without inline directive # -unused - show unused symbols CCFLAGS += -ipa file -O4,p -inline auto -pragma "warn_notinlined off" CXXFLAGS += -ipa file -O4,p -inline auto -pragma "warn_notinlined off" # ----------------------------------------------------------------------------- # make NDEBUG=TRUE DEBUGINFO=TRUE # for NDEBUG lib with debug information # ifdef RVLDWC_DEBUGINFO LDFLAGS += -g CCFLAGS += -g CXXFLAGS += -g ASFLAGS += -g PLF_LDFLAGS += -g endif # RVLDWC_DEBUGINFO endif # ifeq ($(RVLDWC_BUILDNAME),DEBUG) #### endif #DOLPHIN_MINFLAGS #----- End of commondefs.cctype.CW3 -----