1# build/Makefiles/nmake/evc9.mak 2 3# Note: _WIN32_WCE is defined as 420 for CE 4.2 but as 0x500 for CE 5.0! 4DEFS_COMMON = $(DEFS_COMMON) /D _WIN32_WCE=0x$(CEVERSION) /D UNDER_CE=1 /D "UNICODE" 5LDFLAGS_COMMON = $(LDFLAGS_COMMON) coredll.lib corelibc.lib /nodefaultlib:LIBC.lib /nodefaultlib:OLDNAMES.lib 6!if "$(PLATFORM)" == "POCKET PC 2003" 7LDFLAGS_COMMON = $(LDFLAGS_COMMON) /subsystem:windowsce,4.20 8!else 9# TODO: the subsystem settings will have to be adjusted for CE5.01... 10LDFLAGS_COMMON = $(LDFLAGS_COMMON) /subsystem:windowsce,5.00 11!endif 12 13!if "$(TARGET_PROC)" == "" 14!error No target processor configured! Please rerun configure.bat! 15!endif 16 17!if "$(CC)" == "" 18CC=cl.exe 19!endif 20 21CXX = $(CC) 22 23# activate global optimisations (aka Link Time Code Generation) 24OPT_REL = $(OPT_REL) /GL 25LDFLAGS_REL = $(LDFLAGS_REL) /LTCG 26 27 28# make the compiler display absolute paths in diagnostics 29# While this is not necessary for STLport in any way, it is convenient when using 30# the VC8 IDE for building things because then you can click on diagnostics in 31# order to warp to the exact place in the code. 32OPT_COMMON = $(OPT_COMMON) /FC 33 34 35# ARM specific settings 36!if "$(TARGET_PROC)" == "arm" 37DEFS_COMMON = $(DEFS_COMMON) /D "ARM" /D "_ARM_" /D "$(TARGET_PROC_SUBTYPE)" 38OPT_COMMON = $(OPT_COMMON) 39!if "$(PLATFORM)" == "POCKET PC 2003" 40DEFS_COMMON = $(DEFS_COMMON) /DWIN32_PLATFORM_PSPC 41# Pocket PC 2003 doesn't support THUMB. 42LDFLAGS_COMMON = $(LDFLAGS_COMMON) ccrtrtti.lib secchk.lib /machine:ARM 43!endif 44!endif 45 46# x86 specific settings 47!if "$(TARGET_PROC)" == "x86" 48DEFS_COMMON = $(DEFS_COMMON) /D "x86" /D "_X86_" 49OPT_COMMON = $(OPT_COMMON) 50!endif 51 52# MIPS specific settings 53!if "$(TARGET_PROC)" == "mips" 54DEFS_COMMON = $(DEFS_COMMON) /D "MIPS" /D "_MIPS_" /D "$(TARGET_PROC_SUBTYPE)" 55!if "$(TARGET_PROC_SUBTYPE)" == "" 56!error "MIPS subtype not set" 57!elseif "$(TARGET_PROC_SUBTYPE)" == "MIPSII" 58OPT_COMMON = $(OPT_COMMON) /QMmips2 59!else 60!error "unknown MIPS subtype" 61!endif 62!endif 63 64# SH4 specific settings 65!if "$(TARGET_PROC)" == "sh4" 66DEFS_COMMON = $(DEFS_COMMON) /D "SHx" /D "_SHX_" /D "SH4" 67OPT_COMMON = $(OPT_COMMON) 68!endif 69 70 71# Note: /GX for MSC<14 has been replaced with /EHsc 72CFLAGS_COMMON = /nologo /TC /WX /GF /GR /EHsc 73CFLAGS_REL = $(CFLAGS_COMMON) $(OPT_REL) 74CFLAGS_STATIC_REL = $(CFLAGS_COMMON) $(OPT_STATIC_REL) 75CFLAGS_DBG = $(CFLAGS_COMMON) $(OPT_DBG) 76CFLAGS_STATIC_DBG = $(CFLAGS_COMMON) $(OPT_STATIC_DBG) 77CFLAGS_STLDBG = $(CFLAGS_COMMON) $(OPT_STLDBG) 78CFLAGS_STATIC_STLDBG = $(CFLAGS_COMMON) $(OPT_STATIC_STLDBG) 79CXXFLAGS_COMMON = /nologo /TP /WX /GF /GR /EHsc 80CXXFLAGS_REL = $(CXXFLAGS_COMMON) $(OPT_REL) 81CXXFLAGS_STATIC_REL = $(CXXFLAGS_COMMON) $(OPT_STATIC_REL) 82CXXFLAGS_DBG = $(CXXFLAGS_COMMON) $(OPT_DBG) 83CXXFLAGS_STATIC_DBG = $(CXXFLAGS_COMMON) $(OPT_STATIC_DBG) 84CXXFLAGS_STLDBG = $(CXXFLAGS_COMMON) $(OPT_STLDBG) 85CXXFLAGS_STATIC_STLDBG = $(CXXFLAGS_COMMON) $(OPT_STATIC_STLDBG) 86 87# setup proper runtime (static/dynamic, debug/release) 88!ifdef WITH_STATIC_RTL 89OPT_DBG = $(OPT_DBG) /MTd 90OPT_STLDBG = $(OPT_STLDBG) /MTd 91OPT_REL = $(OPT_REL) /MT 92DEFS_REL = $(DEFS_REL) /D_STLP_USE_DYNAMIC_LIB 93DEFS_DBG = $(DEFS_DBG) /D_STLP_USE_DYNAMIC_LIB 94DEFS_STLDBG = $(DEFS_STLDBG) /D_STLP_USE_DYNAMIC_LIB 95!else 96OPT_DBG = $(OPT_DBG) /MDd 97OPT_STLDBG = $(OPT_STLDBG) /MDd 98OPT_REL = $(OPT_REL) /MD 99!endif 100 101 102!include evc-common.mak 103