1# Time-stamp: <04/02/04 14:15:31 ptr> 2# $Id$ 3 4#INCLUDES = -I$(SRCROOT)/include 5#INCLUDES = 6 7!ifndef CXX 8CXX = cl 9!endif 10!ifndef CC 11CC = cl 12!endif 13!ifndef LINK 14LINK = link /fixed:no 15!endif 16!ifndef RC 17RC = rc 18!endif 19 20!if "$(COMPILER_NAME)" == "vc6" 21MSVC_VERSION=1200 22!else if "$(COMPILER_NAME)" == "vc70" 23MSVC_VERSION=1300 24!else if "$(COMPILER_NAME)" == "vc71" 25MSVC_VERSION=1310 26!else if "$(COMPILER_NAME)" == "vc80" 27MSVC_VERSION=1400 28!else 29MSVC_VERSION=1500 30!endif 31 32!ifdef WITH_STATIC_RTL 33!if defined (WITHOUT_THREAD) && ($(MSVC_VERSION) < 1400) 34OPT_DBG = $(OPT_DBG) /MLd 35OPT_STLDBG = $(OPT_STLDBG) /MLd 36OPT_REL = $(OPT_REL) /ML 37!else 38OPT_DBG = $(OPT_DBG) /MTd 39OPT_STLDBG = $(OPT_STLDBG) /MTd 40OPT_REL = $(OPT_REL) /MT 41!endif 42DEFS_REL = $(DEFS_REL) /D_STLP_USE_DYNAMIC_LIB 43DEFS_DBG = $(DEFS_DBG) /D_STLP_USE_DYNAMIC_LIB 44DEFS_STLDBG = $(DEFS_STLDBG) /D_STLP_USE_DYNAMIC_LIB 45!else 46OPT_DBG = $(OPT_DBG) /MDd 47OPT_STLDBG = $(OPT_STLDBG) /MDd 48OPT_REL = $(OPT_REL) /MD 49!endif 50 51!ifdef WITH_DYNAMIC_RTL 52OPT_STATIC_DBG = $(OPT_STATIC_DBG) /MDd 53OPT_STATIC_STLDBG = $(OPT_STATIC_STLDBG) /MDd 54OPT_STATIC_REL = $(OPT_STATIC_REL) /MD 55DEFS_STATIC_REL = $(DEFS_STATIC_REL) /D_STLP_USE_STATIC_LIB 56DEFS_STATIC_DBG = $(DEFS_STATIC_DBG) /D_STLP_USE_STATIC_LIB 57DEFS_STATIC_STLDBG = $(DEFS_STATIC_STLDBG) /D_STLP_USE_STATIC_LIB 58!else 59!if defined (WITHOUT_THREAD) && ($(MSVC_VERSION) < 1400) 60OPT_STATIC_DBG = $(OPT_STATIC_DBG) /MLd 61OPT_STATIC_STLDBG = $(OPT_STATIC_STLDBG) /MLd 62OPT_STATIC_REL = $(OPT_STATIC_REL) /ML 63!else 64OPT_STATIC_DBG = $(OPT_STATIC_DBG) /MTd 65OPT_STATIC_STLDBG = $(OPT_STATIC_STLDBG) /MTd 66OPT_STATIC_REL = $(OPT_STATIC_REL) /MT 67!endif 68!endif 69 70!ifdef WITHOUT_THREAD 71#Normally thread support activation is detected by STLport depending on the 72#compiler runtime version option (/ML /MLd); but as there is no more single 73#threaded runtime after VC.Net2003 we simply always define _STLP_NO_THREADS 74DEFS_REL = $(DEFS_REL) /D_STLP_NO_THREADS 75DEFS_DBG = $(DEFS_DBG) /D_STLP_NO_THREADS 76DEFS_STLDBG = $(DEFS_STLDBG) /D_STLP_NO_THREADS 77DEFS_STATIC_REL = $(DEFS_STATIC_REL) /D_STLP_NO_THREADS 78DEFS_STATIC_DBG = $(DEFS_STATIC_DBG) /D_STLP_NO_THREADS 79DEFS_STATIC_STLDBG = $(DEFS_STATIC_STLDBG) /D_STLP_NO_THREADS 80!endif 81 82DEFS = $(DEFS) /DWINVER=$(WINVER) 83 84!ifdef WITHOUT_RTTI 85!if $(MSVC_VERSION) >= 1400 86CXXFLAGS_COMMON = $(CXXFLAGS_COMMON) /GR- 87CFLAGS_COMMON = $(CFLAGS_COMMON) /GR- 88!endif 89!else 90!if $(MSVC_VERSION) < 1400 91CXXFLAGS_COMMON = $(CXXFLAGS_COMMON) /GR 92CFLAGS_COMMON = $(CFLAGS_COMMON) /GR 93!endif 94!endif 95 96!ifdef STLP_BUILD_BOOST_PATH 97CXXFLAGS_COMMON = $(CXXFLAGS_COMMON) /D_STLP_USE_BOOST_SUPPORT 98CFLAGS_COMMON = $(CFLAGS_COMMON) /D_STLP_USE_BOOST_SUPPORT 99!endif 100 101!ifdef DEFS 102DEFS_REL = $(DEFS) $(DEFS_REL) 103DEFS_DBG = $(DEFS) $(DEFS_DBG) 104DEFS_STLDBG = $(DEFS) $(DEFS_STLDBG) 105DEFS_STATIC_REL = $(DEFS) $(DEFS_STATIC_REL) 106DEFS_STATIC_DBG = $(DEFS) $(DEFS_STATIC_DBG) 107DEFS_STATIC_STLDBG = $(DEFS) $(DEFS_STATIC_STLDBG) 108!endif 109!ifdef OPT 110OPT_REL = $(OPT) $(OPT_REL) 111OPT_DBG = $(OPT) $(OPT_DBG) 112OPT_STLDBG = $(OPT) $(OPT_STLDBG) 113OPT_STATIC_REL = $(OPT) $(OPT_STATIC_REL) 114OPT_STATIC_DBG = $(OPT) $(OPT_STATIC_DBG) 115OPT_STATIC_STLDBG = $(OPT) $(OPT_STATIC_STLDBG) 116!endif 117 118!if "$(COMPILER_NAME)" != "icl" 119OUTPUT_OPTION = /Fo$@ /Fd$(PDB_NAME_OUT) 120OUTPUT_OPTION_DBG = /Fo$@ /Fd$(PDB_NAME_OUT_DBG) 121OUTPUT_OPTION_STLDBG = /Fo$@ /Fd$(PDB_NAME_OUT_STLDBG) 122OUTPUT_OPTION_STATIC = /Fo$@ /Fd$(A_PDB_NAME_OUT) 123OUTPUT_OPTION_STATIC_DBG = /Fo$@ /Fd$(A_PDB_NAME_OUT_DBG) 124OUTPUT_OPTION_STATIC_STLDBG = /Fo$@ /Fd$(A_PDB_NAME_OUT_STLDBG) 125!else 126OUTPUT_OPTION = /Fo$@ 127OUTPUT_OPTION_DBG = /Fo$@ 128OUTPUT_OPTION_STLDBG = /Fo$@ 129OUTPUT_OPTION_STATIC = /Fo$@ 130OUTPUT_OPTION_STATIC_DBG = /Fo$@ 131OUTPUT_OPTION_STATIC_STLDBG = /Fo$@ 132!endif 133 134LINK_OUTPUT_OPTION = /out:$@ 135RC_OUTPUT_OPTION = /fo $@ 136RC_OUTPUT_OPTION_DBG = /fo $@ 137RC_OUTPUT_OPTION_STLDBG = /fo $@ 138DEFS_REL = $(DEFS_REL) /DWIN32 /D_WINDOWS 139DEFS_STATIC_REL = $(DEFS_STATIC_REL) /DWIN32 /D_WINDOWS 140DEFS_DBG = $(DEFS_DBG) /DWIN32 /D_WINDOWS 141DEFS_STATIC_DBG = $(DEFS_STATIC_DBG) /DWIN32 /D_WINDOWS 142DEFS_STLDBG = $(DEFS_STLDBG) /DWIN32 /D_WINDOWS 143DEFS_STATIC_STLDBG = $(DEFS_STATIC_STLDBG) /DWIN32 /D_WINDOWS 144CPPFLAGS_REL = $(DEFS_REL) $(INCLUDES) 145CPPFLAGS_STATIC_REL = $(DEFS_STATIC_REL) $(INCLUDES) 146CPPFLAGS_DBG = $(DEFS_DBG) $(INCLUDES) 147CPPFLAGS_STATIC_DBG = $(DEFS_STATIC_DBG) $(INCLUDES) 148CPPFLAGS_STLDBG = $(DEFS_STLDBG) $(INCLUDES) 149CPPFLAGS_STATIC_STLDBG = $(DEFS_STATIC_STLDBG) $(INCLUDES) 150 151 152CFLAGS_REL = $(CFLAGS_COMMON) $(OPT_REL) 153CFLAGS_STATIC_REL = $(CFLAGS_COMMON) $(OPT_STATIC_REL) 154CFLAGS_DBG = $(CFLAGS_COMMON) $(OPT_DBG) 155CFLAGS_STATIC_DBG = $(CFLAGS_COMMON) $(OPT_STATIC_DBG) 156CFLAGS_STLDBG = $(CFLAGS_COMMON) $(OPT_STLDBG) 157CFLAGS_STATIC_STLDBG = $(CFLAGS_COMMON) $(OPT_STATIC_STLDBG) 158CXXFLAGS_REL = $(CXXFLAGS_COMMON) $(OPT_REL) 159CXXFLAGS_STATIC_REL = $(CXXFLAGS_COMMON) $(OPT_STATIC_REL) 160CXXFLAGS_DBG = $(CXXFLAGS_COMMON) $(OPT_DBG) 161CXXFLAGS_STATIC_DBG = $(CXXFLAGS_COMMON) $(OPT_STATIC_DBG) 162CXXFLAGS_STLDBG = $(CXXFLAGS_COMMON) $(OPT_STLDBG) 163CXXFLAGS_STATIC_STLDBG = $(CXXFLAGS_COMMON) $(OPT_STATIC_STLDBG) 164COMPILE_c_REL = $(CC) $(CFLAGS_REL) $(CPPFLAGS_REL) $(TARGET_ARCH) /c 165COMPILE_c_STATIC_REL = $(CC) $(CFLAGS_STATIC_REL) $(CPPFLAGS_STATIC_REL) $(TARGET_ARCH) /c 166COMPILE_c_DBG = $(CC) $(CFLAGS_DBG) $(CPPFLAGS_DBG) $(TARGET_ARCH) /c 167COMPILE_c_STATIC_DBG = $(CC) $(CFLAGS_STATIC_DBG) $(CPPFLAGS_STATIC_DBG) $(TARGET_ARCH) /c 168COMPILE_c_STLDBG = $(CC) $(CFLAGS_STLDBG) $(CPPFLAGS_STLDBG) $(TARGET_ARCH) /c 169COMPILE_c_STATIC_STLDBG = $(CC) $(CFLAGS_STATIC_STLDBG) $(CPPFLAGS_STATIC_STLDBG) $(TARGET_ARCH) /c 170COMPILE_cc_REL = $(CXX) $(CXXFLAGS_REL) $(CPPFLAGS_REL) $(TARGET_ARCH) /c 171COMPILE_cc_STATIC_REL = $(CXX) $(CXXFLAGS_STATIC_REL) $(CPPFLAGS_STATIC_REL) $(TARGET_ARCH) /c 172COMPILE_cc_DBG = $(CXX) $(CXXFLAGS_DBG) $(CPPFLAGS_DBG) $(TARGET_ARCH) /c 173COMPILE_cc_STATIC_DBG = $(CXX) $(CXXFLAGS_STATIC_DBG) $(CPPFLAGS_STATIC_DBG) $(TARGET_ARCH) /c 174COMPILE_cc_STLDBG = $(CXX) $(CXXFLAGS_STLDBG) $(CPPFLAGS_STLDBG) $(TARGET_ARCH) /c 175COMPILE_cc_STATIC_STLDBG = $(CXX) $(CXXFLAGS_STATIC_STLDBG) $(CPPFLAGS_STATIC_STLDBG) $(TARGET_ARCH) /c 176COMPILE_rc_REL = $(RC) $(RC_FLAGS_REL) /D "BUILD_INFOS=$(CXXFLAGS_REL)" 177COMPILE_rc_STATIC_REL = $(RC) $(RC_FLAGS_REL) /D "BUILD_INFOS=$(CXXFLAGS_STATIC_REL)" 178COMPILE_rc_DBG = $(RC) $(RC_FLAGS_DBG) /DBUILD=d /D "BUILD_INFOS=$(CXXFLAGS_DBG)" 179COMPILE_rc_STATIC_DBG = $(RC) $(RC_FLAGS_DBG) /DBUILD=d /D "BUILD_INFOS=$(CXXFLAGS_STATIC_DBG)" 180COMPILE_rc_STLDBG = $(RC) $(RC_FLAGS_STLDBG) /DBUILD=stld /D "BUILD_INFOS=$(CXXFLAGS_STLDBG) /D_STLP_DEBUG" 181COMPILE_rc_STATIC_STLDBG = $(RC) $(RC_FLAGS_STLDBG) /DBUILD=stld /D "BUILD_INFOS=$(CXXFLAGS_STATIC_STLDBG) /D_STLP_DEBUG" 182LINK_cc_REL = $(LINK) /nologo /incremental:no /debug /pdb:$(PDB_NAME_OUT) $(LDFLAGS_REL) 183LINK_cc_DBG = $(LINK) /nologo /incremental:no /debug /pdb:$(PDB_NAME_OUT_DBG) $(LDFLAGS_DBG) 184LINK_cc_STLDBG = $(LINK) /nologo /incremental:no /debug /pdb:$(PDB_NAME_OUT_STLDBG) $(LDFLAGS_STLDBG) 185LINK_cc_A_REL = $(LINK) /nologo /incremental:no /debug /pdb:$(A_PDB_NAME_OUT) $(LDFLAGS_A_REL) 186LINK_cc_A_DBG = $(LINK) /nologo /incremental:no /debug /pdb:$(A_PDB_NAME_OUT_DBG) $(LDFLAGS_DBG) 187LINK_cc_A_STLDBG = $(LINK) /nologo /incremental:no /debug /pdb:$(A_PDB_NAME_OUT_STLDBG) $(LDFLAGS_STLDBG) 188 189CDEPFLAGS = /FD /E 190CCDEPFLAGS = /FD /E 191 192# STLport DEBUG mode specific defines 193DEFS_STLDBG = $(DEFS_STLDBG) /D_DEBUG /D_STLP_DEBUG 194DEFS_DBG = $(DEFS_DBG) /D_DEBUG 195DEFS_REL = $(DEFS_REL) /DNDEBUG 196DEFS_STATIC_STLDBG = $(DEFS_STATIC_STLDBG) /D_DEBUG /D_STLP_DEBUG 197DEFS_STATIC_DBG = $(DEFS_STATIC_DBG) /D_DEBUG 198DEFS_STATIC_REL = $(DEFS_STATIC_REL) /DNDEBUG 199 200# optimization and debug compiler flags 201OPT_REL = $(OPT_REL) /Zi /O2 202OPT_DBG = $(OPT_DBG) /Zi 203OPT_STLDBG = $(OPT_STLDBG) /Zi 204OPT_STATIC_REL = $(OPT_STATIC_REL) /Zi /O2 205OPT_STATIC_DBG = $(OPT_STATIC_DBG) /Zi 206OPT_STATIC_STLDBG = $(OPT_STATIC_STLDBG) /Zi 207