2 # nmake.opt - main configuration file for NMAKE makefiles
\r
4 !MESSAGE **********************************************************************
\r
5 !MESSAGE *** GEOS Build Configuration ***
\r
7 # TODO: Confirm as redundant and remove, nmake /P displays _NMAKE_VER anyway.
\r
8 #!INCLUDE <ntwin32.mak>
\r
10 ###############################################################################
\r
11 # For convenience, user may put custom settings to private mynmake.opt
\r
12 # and use EXT_NMAKE_OPT option while calling nmake.exe, as follows:
\r
14 # nmake -f makefile.vc EXT_NMAKE_OPT=mynmake.opt
\r
16 !IFDEF EXT_NMAKE_OPT
\r
17 !MESSAGE *** Setting EXT_NMAKE_OPT $(EXT_NMAKE_OPT)
\r
18 !INCLUDE $(EXT_NMAKE_OPT)
\r
21 ###############################################################################
\r
22 # Set BUILD_DEBUG to YES if you want to make debug build
\r
23 # and to prepare not optimized binaries.
\r
25 !IFNDEF BUILD_DEBUG
\r
29 !MESSAGE *** Setting BUILD_DEBUG $(BUILD_DEBUG)
\r
31 ###############################################################################
\r
32 # Set ENABLE_INLINE to YES if you want to make debug build
\r
33 # and to prepare not optimized binaries.
\r
35 !IFNDEF ENABLE_INLINE
\r
39 !MESSAGE *** Setting ENABLE_INLINE $(ENABLE_INLINE)
\r
41 ###############################################################################
\r
42 # Set BUILD_BATCH to YES if you want feed compiler with all
\r
43 # source .c and .cpp files in single batch.
\r
49 !MESSAGE *** Setting BUILD_BATCH $(BUILD_BATCH)
\r
51 ###############################################################################
\r
52 # Derive version of Visual C++ being used from NMAKE if not specified
\r
55 # If we should expect variety of NMAKE build versions, tests below may fail
\r
56 # and we will need to fall back to setting GEOS_MSVC as command line parameter.
\r
58 !IF "$(_NMAKE_VER)" == ""
\r
60 !ERROR *** Failed to determine version of Visual C++
\r
61 !ELSEIF "$(_NMAKE_VER)" == "162"
\r
63 !ERROR *** Detected Visual C++ 5.0 - NOT SUPPORTED
\r
64 !ELSEIF "$(_NMAKE_VER)" == "6.00.8168.0"
\r
67 !ERROR *** Detected Visual C++ 6.0 - NOT SUPPORTED
\r
68 !ELSEIF "$(_NMAKE_VER)" == "7.00.9466"
\r
71 !ELSEIF "$(_NMAKE_VER)" == "7.10.3077"
\r
74 !ELSEIF "$(_NMAKE_VER)" == "8.00.50727.42"
\r
77 !ELSEIF "$(_NMAKE_VER)" == "8.00.50727.762"
\r
80 !ELSEIF "$(_NMAKE_VER)" == "9.00.21022.08"
\r
83 !ELSEIF "$(_NMAKE_VER)" == "9.00.30729.01"
\r
86 !ELSEIF "$(_NMAKE_VER)" == "10.00.30128.01"
\r
89 !ELSEIF "$(_NMAKE_VER)" == "10.00.30319.01"
\r
92 !ELSEIF "$(_NMAKE_VER)" == "11.00.40825.2"
\r
100 !IF "$(GEOS_MSVC)" == "0.0" && "$(GEOS_MSC)" == "0"
\r
101 !MESSAGE *** Cannot determined Visual C++ version
\r
102 !ERROR *** Aborting make job
\r
104 !MESSAGE *** Using Microsoft NMAKE version $(_NMAKE_VER)
\r
105 !MESSAGE *** Using Microsoft Visual C++ version $(GEOS_MSVC)
\r
106 !MESSAGE *** Using Microsoft C/C++ version $(GEOS_MSC)
\r
109 ###############################################################################
\r
110 # Include directories
\r
112 GEOS_INCLUDE = -I..\include -I..\capi
\r
114 !MESSAGE *** Setting GEOS_INCLUDE $(GEOS_INCLUDE)
\r
115 !MESSAGE *** Setting INCLUDE $(INCLUDE)
\r
117 ###############################################################################
\r
118 # Compilation flags for Release and Debug modes
\r
120 GEOS_CPPFLAGS = /D "NOMINMAX" /D "WIN32_LEAN_AND_MEAN" /D "NOGDI"
\r
121 GEOS_CPPFLAGS = $(GEOS_CPPFLAGS) /D "GEOS_DLL_EXPORT"
\r
123 !IF "$(BUILD_DEBUG)" == "YES"
\r
125 GEOS_CFLAGS = /nologo /MDd /GR /Od /W4 /Zi
\r
126 GEOS_CPPFLAGS = /D "DEBUG" /D "_DEBUG" $(GEOS_CPPFLAGS)
\r
128 GEOS_CFLAGS = /nologo /MD /GR /O2 /W3
\r
129 GEOS_CPPFLAGS = /D "NDEBUG" $(GEOS_CPPFLAGS)
\r
132 # Compiler version specific flags
\r
133 !IF $(GEOS_MSC) >= 1400
\r
134 GEOS_CFLAGS = $(GEOS_CFLAGS) /EHs
\r
135 GEOS_CPPFLAGS = $(GEOS_CPPFLAGS) /D "_CRT_SECURE_NO_DEPRECATE" /D "_CRT_NONSTDC_NO_DEPRECATE" /D "_SCL_SECURE_NO_DEPRECATE"
\r
137 GEOS_CFLAGS = $(GEOS_CFLAGS) /GX
\r
140 # For Visual C++ 9.0+ use multiple process build
\r
141 !IF "$(BUILD_BATCH)" == "YES"
\r
142 !IF $(GEOS_MSC) > 1400
\r
144 !MESSAGE *** Setting /MP flag to number of effective processors
\r
148 !IF "$(ENABLE_INLINE)" == "YES"
\r
149 GEOS_CFLAGS = /D "GEOS_INLINE"
\r
152 !MESSAGE *** Using GEOS_CFLAGS $(GEOS_CFLAGS)
\r
153 !MESSAGE *** Using GEOS_CPPFLAGS $(GEOS_CPPFLAGS)
\r
155 CFLAGS=$(MPFLAGS) $(GEOS_CFLAGS) $(GEOS_CPPFLAGS) $(GEOS_INCLUDE)
\r
157 !MESSAGE *** Complete CFLAGS $(CFLAGS)
\r
159 ###############################################################################
\r
162 LIBNAME = geos$(BUILD_PREFIX).lib
\r
163 DLLNAME = geos$(BUILD_PREFIX).dll
\r
164 SLIBNAME = geos_i$(BUILD_PREFIX).lib
\r
165 CDLLNAME = geos_c$(BUILD_PREFIX).dll
\r
166 CLIBNAME = geos_c_i$(BUILD_PREFIX).lib
\r
168 ###############################################################################
\r
169 # Building toolset programs
\r
176 # Linker executable
\r
177 # - Dynamic-Linked Libraries
\r
179 # - Static Libraries (use of lib.exe wrapper is not portable, see VC++ Toolkit 2003)
\r
183 !MESSAGE **********************************************************************
\r