| 1 | |
|---|
| 2 | ######################################################################## |
|---|
| 3 | # nmake.opt - Tinyows configuration for MSVC++ |
|---|
| 4 | ######################################################################## |
|---|
| 5 | |
|---|
| 6 | ######################################################################## |
|---|
| 7 | # Section I: Tinyows Compilation Options |
|---|
| 8 | ######################################################################## |
|---|
| 9 | |
|---|
| 10 | #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
|---|
| 11 | # Uncomment the following if you are building for 64-bit windows |
|---|
| 12 | # (x64). You'll need to have PATH, INCLUDE and LIB set up for 64-bit |
|---|
| 13 | # compiles. |
|---|
| 14 | #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
|---|
| 15 | #WIN64=YES |
|---|
| 16 | |
|---|
| 17 | #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
|---|
| 18 | # Check compiler version given in command line |
|---|
| 19 | # nmake -f makefile.vc MSVC_VER=xxxx |
|---|
| 20 | # 1310 = 7.1 (2003) 1400 = 8.0 (2005) |
|---|
| 21 | #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
|---|
| 22 | !IFNDEF MSVC_VER |
|---|
| 23 | #assume msvc 7.1 |
|---|
| 24 | MSVC_VER=1310 |
|---|
| 25 | !ENDIF |
|---|
| 26 | |
|---|
| 27 | #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
|---|
| 28 | # File locations and where to install things |
|---|
| 29 | # ---------------------------------------------------------------------- |
|---|
| 30 | # If you are using the MapServer Build Kit, almost everything should be |
|---|
| 31 | # relative to this directory throughout this option file. |
|---|
| 32 | #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
|---|
| 33 | |
|---|
| 34 | # Set the following to point to the directory adjacent to the dependent libs. |
|---|
| 35 | !IFNDEF TINY_BASE |
|---|
| 36 | TINY_BASE = C:\build\release-1400-dev\tinyows-svn |
|---|
| 37 | #TINY_BASE = . |
|---|
| 38 | !ENDIF |
|---|
| 39 | |
|---|
| 40 | # Set the following to point to the current (tinyows) directory. |
|---|
| 41 | !IFNDEF TINY_CURRENT |
|---|
| 42 | TINY_CURRENT = $(TINY_BASE) |
|---|
| 43 | !ENDIF |
|---|
| 44 | |
|---|
| 45 | !IFNDEF BINDIR |
|---|
| 46 | BINDIR = $(TINY_BASE)\..\bin |
|---|
| 47 | !ENDIF |
|---|
| 48 | |
|---|
| 49 | #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
|---|
| 50 | # Optmization, debug, and related compile flags. |
|---|
| 51 | #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
|---|
| 52 | |
|---|
| 53 | !IF $(MSVC_VER) == 1400 |
|---|
| 54 | # Optimized, with using MSVCRT. |
|---|
| 55 | OPTFLAGS = /nologo /Ox /MD $(WARNING_LEVEL) $(DEBUG) /EHsc /D_CRT_SECURE_NO_DEPRECATE /D_CRT_NONSTDC_NO_DEPRECATE |
|---|
| 56 | # Debug with MSVCRT |
|---|
| 57 | #OPTFLAGS = /nologo /Zi /MD $(WARNING_LEVEL) $(DEBUG) /EHsc /D_CRT_SECURE_NO_DEPRECATE /D_CRT_NONSTDC_NO_DEPRECATE |
|---|
| 58 | #LDFLAGS = /NODEFAULTLIB:msvcrt /NODEFAULTLIB:libcd /DEBUG |
|---|
| 59 | !ELSE |
|---|
| 60 | # Optimized, with using MSVCRT. |
|---|
| 61 | OPTFLAGS = /nologo /Ox /MD $(WARNING_LEVEL) $(DEBUG) /EHsc |
|---|
| 62 | # Debug with MSVCRT |
|---|
| 63 | #OPTFLAGS = /nologo /Zi /MDd $(WARNING_LEVEL) $(DEBUG) /EHsc |
|---|
| 64 | #LDFLAGS = /NODEFAULTLIB:msvcrt /NODEFAULTLIB:libcd /DEBUG |
|---|
| 65 | !ENDIF |
|---|
| 66 | |
|---|
| 67 | # Set the Warning level for the compiler (defaults to W1) |
|---|
| 68 | WARNING_LEVEL=/W3 |
|---|
| 69 | |
|---|
| 70 | #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
|---|
| 71 | # Debugging Options |
|---|
| 72 | # ---------------------------------------------------------------------- |
|---|
| 73 | #NEED_NONBLOCKING_STDERR=-DNEED_NONBLOCKING_STDERR |
|---|
| 74 | ENABLE_STDERR_DEBUG=-DENABLE_STDERR_DEBUG |
|---|
| 75 | |
|---|
| 76 | # Set the linker debug option |
|---|
| 77 | LDEBUG=/debug |
|---|
| 78 | |
|---|
| 79 | # DEBUG Build flags |
|---|
| 80 | # Set the DEBUG flag if you wish to make a debug build |
|---|
| 81 | DEBUG=/DDEBUG |
|---|
| 82 | |
|---|
| 83 | |
|---|
| 84 | #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
|---|
| 85 | # String methods |
|---|
| 86 | # ---------------------------------------------------------------------- |
|---|
| 87 | # Apparently these aren't as commonplace. Edit the |
|---|
| 88 | # following line to reflect the missing functions on your platform. |
|---|
| 89 | #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
|---|
| 90 | #STRINGS=-DNEED_STRCASECMP -DNEED_STRNCASECMP -DNEED_STRDUP |
|---|
| 91 | STRINGS=-DNEED_STRCASECMP -DNEED_STRNCASECMP -DNEED_STRLCAT -DNEED_STRRSTR |
|---|
| 92 | |
|---|
| 93 | #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
|---|
| 94 | # Direct connectivity to Postgresql PostGIS. |
|---|
| 95 | # ---------------------------------------------------------------------- |
|---|
| 96 | # To turn on direct connectivity to Postgresql PostGIS uncomment the following |
|---|
| 97 | # flag and set the full path name to the project directory for the |
|---|
| 98 | # Postgresql native Win32 client library. |
|---|
| 99 | # See http://www.postgresql.org for support library. |
|---|
| 100 | #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
|---|
| 101 | POSTGIS =-DUSE_POSTGIS |
|---|
| 102 | POSTGIS_DIR =$(TINY_BASE)\..\release-1400\postgresql-8.3.3 |
|---|
| 103 | |
|---|
| 104 | |
|---|
| 105 | #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
|---|
| 106 | # LIBXML: utility library to write xml. |
|---|
| 107 | # http://xmlsoft.org/index.html |
|---|
| 108 | # WFS, WCS and SOS all need this flag to be activated |
|---|
| 109 | # NOTE: ICONV is required when libxml2 is activated |
|---|
| 110 | # ---------------------------------------------------------------------- |
|---|
| 111 | XML2_ENABLED=-DUSE_LIBXML2 |
|---|
| 112 | LIBXML_DIR=$(TINY_BASE)\..\release-1400 |
|---|
| 113 | |
|---|
| 114 | |
|---|
| 115 | ######################################################################## |
|---|
| 116 | # Section II: Mapserver Rendering Configuration |
|---|
| 117 | ######################################################################## |
|---|
| 118 | #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
|---|
| 119 | # ICONV |
|---|
| 120 | # ---------------------------------------------------------------------- |
|---|
| 121 | #libiconv support is used for to support double bytes (see bug 911). |
|---|
| 122 | #uncomment the following to build with libiconv support. |
|---|
| 123 | #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
|---|
| 124 | ICONV=-DUSE_ICONV |
|---|
| 125 | ICONV_DIR=$(TINY_BASE)\..\release-1400 |
|---|
| 126 | |
|---|
| 127 | ######################################################################## |
|---|
| 128 | # Section VI: Support Libraries. |
|---|
| 129 | ######################################################################## |
|---|
| 130 | #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
|---|
| 131 | # REGEX Libary |
|---|
| 132 | # ---------------------------------------------------------------------- |
|---|
| 133 | # VC++ does not include the REGEX library... so we must provide our one. |
|---|
| 134 | # The following definitions will try to build GNU regex-0.12 located in the |
|---|
| 135 | # regex-0.12 sub-directory. |
|---|
| 136 | # If it was not included in the source distribution, then you can get it from: |
|---|
| 137 | # ftp://ftp.gnu.org/pub/gnu/regex/regex-0.12.tar.gz |
|---|
| 138 | # Provide the full path to the REGEX project directory |
|---|
| 139 | # You do not need this library if you are compiling for PHP mapscript. |
|---|
| 140 | # In that case the PHP regex library will be used instead |
|---|
| 141 | #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
|---|
| 142 | !IFNDEF PHP_REGEX |
|---|
| 143 | REGEX_DIR=$(TINY_BASE)\..\regex-0.12 |
|---|
| 144 | !ENDIF |
|---|
| 145 | |
|---|
| 146 | |
|---|
| 147 | ######################################################################## |
|---|
| 148 | # Section VII: Variable Setup |
|---|
| 149 | ######################################################################## |
|---|
| 150 | # Should not need to be updated. |
|---|
| 151 | ######################################################################## |
|---|
| 152 | TINY_LIB = tiny.lib |
|---|
| 153 | |
|---|
| 154 | #libiconv support |
|---|
| 155 | !IFDEF ICONV |
|---|
| 156 | ICONV_LIB=$(ICONV_DIR)\lib\iconv.lib |
|---|
| 157 | ICONV_INC= -I$(ICONV_DIR)\include |
|---|
| 158 | !ENDIF |
|---|
| 159 | |
|---|
| 160 | # LIBXML include and library |
|---|
| 161 | !IFDEF XML2_ENABLED |
|---|
| 162 | LIBXML_INC = -I$(LIBXML_DIR)/include/libxml |
|---|
| 163 | LIBXML_LIB = $(LIBXML_DIR)/lib/libxml2.lib |
|---|
| 164 | !ENDIF |
|---|
| 165 | |
|---|
| 166 | # Setup REGEX object and includes |
|---|
| 167 | !IFNDEF PHP_REGEX |
|---|
| 168 | REGEX_OBJ=$(REGEX_DIR)\regex.obj |
|---|
| 169 | REGEX_INC=-I$(REGEX_DIR) |
|---|
| 170 | !ELSE |
|---|
| 171 | REGEX_OBJ=$(PHP_HOME)\regex\regcomp.obj $(PHP_HOME)\regex\regerror.obj \ |
|---|
| 172 | $(PHP_HOME)\regex\regexec.obj $(PHP_HOME)\regex\regfree.obj |
|---|
| 173 | REGEX_INC=-I$(PHP_HOME)/regex -DPHP_NO_ALIASES |
|---|
| 174 | !ENDIF |
|---|
| 175 | |
|---|
| 176 | # REGEX needs some special flags... here they are for VC++ 6.0 |
|---|
| 177 | REGEX_OPT=-DHAVE_STRING_H -DREGEX_MALLOC |
|---|
| 178 | |
|---|
| 179 | # Setup Postgesql PostGIS includes and libs |
|---|
| 180 | !IFDEF POSTGIS |
|---|
| 181 | !IFNDEF PHP_BUILD_CALL |
|---|
| 182 | # If we're building PHP MapScript, there is a macro conflict |
|---|
| 183 | POSTGIS_INC=-I$(POSTGIS_DIR)/src/interfaces/libpq -I$(POSTGIS_DIR)/src/include |
|---|
| 184 | !ENDIF |
|---|
| 185 | POSTGIS_LIB=$(POSTGIS_DIR)/src/interfaces/libpq/release/libpqdll.lib |
|---|
| 186 | !ENDIF |
|---|
| 187 | |
|---|
| 188 | ####################################################################### |
|---|
| 189 | # Section IX: Collect compiler flags |
|---|
| 190 | ######################################################################## |
|---|
| 191 | # Should not need to be updated. |
|---|
| 192 | ######################################################################## |
|---|
| 193 | |
|---|
| 194 | !IFNDEF EXTERNAL_LIBS |
|---|
| 195 | EXTERNAL_LIBS=$(POSTGIS_LIB) $(ERR_LIB) $(ICONV_LIB) $(LIBXML_LIB) |
|---|
| 196 | !ENDIF |
|---|
| 197 | |
|---|
| 198 | LIBS=$(TINY_LIB) $(EXTERNAL_LIBS) |
|---|
| 199 | |
|---|
| 200 | !IFNDEF INCLUDES |
|---|
| 201 | INCLUDES=$(REGEX_INC) $(POSTGIS_INC) $(ICONV_INC) $(LIBXML_INC) |
|---|
| 202 | !ENDIF |
|---|
| 203 | |
|---|
| 204 | |
|---|
| 205 | TINY_DEFS =$(REGEX_OPT) $(STRINGS) $(POSTGIS) $(NEED_NONBLOCKING_STDERR) \ |
|---|
| 206 | $(ENABLE_STDERR_DEBUG) $(ICONV) $(XML2_ENABLED) |
|---|
| 207 | |
|---|
| 208 | |
|---|
| 209 | |
|---|
| 210 | !IFDEF WIN64 |
|---|
| 211 | TINY_CFLAGS=$(INCLUDES) $(TINY_DEFS) -DWIN32 -D_WIN32 -DUSE_GENERIC_MS_NINT |
|---|
| 212 | !ELSE |
|---|
| 213 | TINY_CFLAGS=$(INCLUDES) $(TINY_DEFS) -DWIN32 -D_WIN32 |
|---|
| 214 | !ENDIF |
|---|