Igor Zlatkovic | 9e0acaa | 2003-08-28 12:34:00 +0000 | [diff] [blame] | 1 | # Makefile for libxml2, specific for Windows, BCB6 and Borland make. |
| 2 | # |
| 3 | # Take a look at the beginning and modify the variables to suit your |
| 4 | # environment. Having done that, you can do a |
| 5 | # |
| 6 | # make [all] to build the libxml and the accompanying utilities. |
| 7 | # make clean to remove all compiler output files and return to a |
| 8 | # clean state. |
| 9 | # make rebuild to rebuild everything from scratch. This basically does |
| 10 | # a 'nmake clean' and then a 'nmake all'. |
| 11 | # make install to install the library and its header files. |
| 12 | # |
Igor Zlatkovic | 47a428d | 2003-08-29 10:25:39 +0000 | [diff] [blame] | 13 | # August 2003, Eric Zurcher <Eric.Zurcher@csiro.au> |
Igor Zlatkovic | 9e0acaa | 2003-08-28 12:34:00 +0000 | [diff] [blame] | 14 | # based on the MSVC version of |
| 15 | # March 2002, Igor Zlatkovic <igor@zlatkovic.com> |
Igor Zlatkovic | 47a428d | 2003-08-29 10:25:39 +0000 | [diff] [blame] | 16 | # |
Igor Zlatkovic | 9e0acaa | 2003-08-28 12:34:00 +0000 | [diff] [blame] | 17 | |
| 18 | AUTOCONF = .\config.bcb |
| 19 | |
Igor Zlatkovic | 47a428d | 2003-08-29 10:25:39 +0000 | [diff] [blame] | 20 | # Extra setting to control whether to use dynamic or static Borland runtime. |
| 21 | # Set to "1" to use static RTL, anything else to use dynamic RTL |
| 22 | STATIC_RTL = 0 |
| 23 | |
Igor Zlatkovic | 9e0acaa | 2003-08-28 12:34:00 +0000 | [diff] [blame] | 24 | # If you cannot run the configuration script, which would take the burden of |
| 25 | # editing this file from your back, then remove the following line... |
| 26 | !include $(AUTOCONF) |
| 27 | # ...and enable the following lines and adapt them to your environment. |
| 28 | #XML_SRCDIR = .. |
| 29 | #UTILS_SRCDIR = .. |
| 30 | #BINDIR = binaries |
| 31 | #LIBXML_MAJOR_VERSION = 0 # set this to the right value. |
| 32 | #LIBXML_MINOR_VERSION = 0 # set this to the right value. |
| 33 | #LIBXML_MICRO_VERSION = 0 # set this to the right value. |
| 34 | #WITH_TRIO = 0 |
| 35 | #WITH_THREADS = 0 |
| 36 | #WITH_FTP = 1 |
| 37 | #WITH_HTTP = 1 |
| 38 | #WITH_HTML = 1 |
| 39 | #WITH_C14N = 1 |
| 40 | #WITH_CATALOG = 1 |
| 41 | #WITH_DOCB = 1 |
| 42 | #WITH_XPATH = 1 |
| 43 | #WITH_XPTR = 1 |
| 44 | #WITH_XINCLUDE = 1 |
| 45 | #WITH_ICONV = 1 |
| 46 | #WITH_ZLIB = 0 |
| 47 | #WITH_DEBUG = 1 |
| 48 | #WITH_MEM_DEBUG = 0 |
| 49 | #WITH_SCHEMAS = 1 |
| 50 | #DEBUG = 0 |
| 51 | #STATIC = 0 |
| 52 | #PREFIX = . # set this to the right value. |
| 53 | #BINPREFIX = $(PREFIX)\bin |
| 54 | #INCPREFIX = $(PREFIX)\include |
| 55 | #LIBPREFIX = $(PREFIX)\lib |
| 56 | #SOPREFIX = $(PREFIX)\lib |
| 57 | #INCLUDE = $(INCLUDE);$(INCPREFIX) |
| 58 | #LIB = $(LIB);$(LIBPREFIX) |
| 59 | |
| 60 | |
| 61 | # There should never be a need to modify anything below this line. |
| 62 | # ---------------------------------------------------------------- |
| 63 | |
| 64 | !if !$d(BCB) |
| 65 | BCB = $(MAKEDIR)\.. |
| 66 | !endif |
Igor Zlatkovic | 47a428d | 2003-08-29 10:25:39 +0000 | [diff] [blame] | 67 | .autodepend |
Igor Zlatkovic | 9e0acaa | 2003-08-28 12:34:00 +0000 | [diff] [blame] | 68 | |
| 69 | # Names of various input and output components. |
| 70 | XML_NAME = xml2 |
Igor Zlatkovic | 47a428d | 2003-08-29 10:25:39 +0000 | [diff] [blame] | 71 | XML_BASENAME = lib$(XML_NAME) |
Igor Zlatkovic | 9e0acaa | 2003-08-28 12:34:00 +0000 | [diff] [blame] | 72 | XML_SO = $(XML_BASENAME).dll |
| 73 | XML_IMP = $(XML_BASENAME).lib |
| 74 | XML_DEF = $(XML_BASENAME).def |
| 75 | XML_A = $(XML_BASENAME)_a.lib |
Igor Zlatkovic | 47a428d | 2003-08-29 10:25:39 +0000 | [diff] [blame] | 76 | DUMMY = dir.exists |
Igor Zlatkovic | 9e0acaa | 2003-08-28 12:34:00 +0000 | [diff] [blame] | 77 | |
| 78 | # Place where we let the compiler put its intermediate trash. |
| 79 | XML_INTDIR = $(XML_BASENAME).int |
| 80 | XML_INTDIR_A = $(XML_BASENAME)_a.int |
| 81 | UTILS_INTDIR = utils.int |
| 82 | |
| 83 | # The preprocessor and its options. |
| 84 | CPP = cpp32.exe -P- -DWIN32 |
| 85 | CPPFLAGS = -I$(XML_SRCDIR)\include |
| 86 | !if "$(WITH_THREADS)" != "no" |
| 87 | CPPFLAGS = $(CPPFLAGS) -D_REENTRANT -D__MT__ |
| 88 | !endif |
| 89 | |
| 90 | # The compiler and its options. |
| 91 | CC = bcc32.exe |
| 92 | CFLAGS = -q -DWIN32 -D_NO_VCL -D_WINDOWS -D_MBCS -DEILSEQ=2 -w- |
| 93 | CFLAGS = $(CFLAGS) -I$(XML_SRCDIR) -I$(XML_SRCDIR)\include -I$(INCPREFIX) -I$(INCLUDE) |
| 94 | !if "$(WITH_THREADS)" != "no" |
| 95 | CFLAGS = $(CFLAGS) -D_REENTRANT -tWM |
| 96 | !endif |
| 97 | !if "$(WITH_THREADS)" == "yes" || "$(WITH_THREADS)" == "ctls" |
| 98 | CFLAGS = $(CFLAGS) -DHAVE_WIN32_THREADS -DHAVE_COMPILER_TLS |
| 99 | !else if "$(WITH_THREADS)" == "native" |
| 100 | CFLAGS = $(CFLAGS) -DHAVE_WIN32_THREADS |
| 101 | !else if "$(WITH_THREADS)" == "posix" |
| 102 | CFLAGS = $(CFLAGS) -DHAVE_PTHREAD_H |
| 103 | !endif |
| 104 | !if "$(WITH_ZLIB)" == "1" |
| 105 | CFLAGS = $(CFLAGS) -DHAVE_ZLIB_H |
| 106 | !endif |
| 107 | |
| 108 | # The linker and its options. |
| 109 | LD = ilink32.exe |
| 110 | LDFLAGS = -q -U$(LIBXML_MAJOR_VERSION).$(LIBXML_MINOR_VERSION) |
| 111 | LDFLAGS = $(LDFLAGS) -L$(BINDIR);$(LIBPREFIX);$(LIB);$(BCB)\lib\PSdk |
| 112 | LIBS = import32.lib |
Igor Zlatkovic | 47a428d | 2003-08-29 10:25:39 +0000 | [diff] [blame] | 113 | !if "$(WITH_THREADS)" != "no" && "$(STATIC_RTL)" == "1" |
| 114 | LIBS = $(LIBS) cw32mt.lib |
| 115 | !elif "$(WITH_THREADS)" != "no" |
Igor Zlatkovic | 9e0acaa | 2003-08-28 12:34:00 +0000 | [diff] [blame] | 116 | LIBS = $(LIBS) cw32mti.lib |
Igor Zlatkovic | 47a428d | 2003-08-29 10:25:39 +0000 | [diff] [blame] | 117 | !elif "$(STATIC_RTL)" == "1" |
| 118 | LIBS = $(LIBS) cw32.lib |
| 119 | else |
Igor Zlatkovic | 9e0acaa | 2003-08-28 12:34:00 +0000 | [diff] [blame] | 120 | LIBS = $(LIBS) cw32i.lib |
| 121 | !endif |
| 122 | !if "$(WITH_FTP)" == "1" || "$(WITH_HTTP)" == "1" |
| 123 | LIBS = $(LIBS) wsock32.lib |
| 124 | !endif |
| 125 | !if "$(WITH_ICONV)" == "1" |
Igor Zlatkovic | 47a428d | 2003-08-29 10:25:39 +0000 | [diff] [blame] | 126 | LIBS = $(LIBS) iconvomf.lib |
Igor Zlatkovic | 9e0acaa | 2003-08-28 12:34:00 +0000 | [diff] [blame] | 127 | !endif |
| 128 | !if "$(WITH_ZLIB)" == "1" |
Igor Zlatkovic | 47a428d | 2003-08-29 10:25:39 +0000 | [diff] [blame] | 129 | LIBS = $(LIBS) zlibomf.lib |
Igor Zlatkovic | 9e0acaa | 2003-08-28 12:34:00 +0000 | [diff] [blame] | 130 | !endif |
| 131 | !if "$(WITH_THREADS)" == "posix" |
| 132 | LIBS = $(LIBS) pthreadVC.lib |
| 133 | !endif |
| 134 | |
| 135 | # The archiver and its options. |
| 136 | AR = tlib.exe |
| 137 | ARFLAGS = /P64 /0 |
| 138 | |
| 139 | # Optimisation and debug symbols. |
| 140 | !if "$(DEBUG)" == "1" |
| 141 | CFLAGS = $(CFLAGS) -D_DEBUG -Od -v |
| 142 | LDFLAGS = $(LDFLAGS) -v |
| 143 | !else |
| 144 | CFLAGS = $(CFLAGS) -DNDEBUG -O2 |
| 145 | LDFLAGS = $(LDFLAGS) |
| 146 | !endif |
| 147 | |
| 148 | # Libxml object files. |
| 149 | XML_OBJS = $(XML_INTDIR)\c14n.obj\ |
| 150 | $(XML_INTDIR)\catalog.obj\ |
| 151 | $(XML_INTDIR)\debugXML.obj\ |
| 152 | $(XML_INTDIR)\dict.obj\ |
| 153 | $(XML_INTDIR)\DOCBparser.obj\ |
| 154 | $(XML_INTDIR)\encoding.obj\ |
| 155 | $(XML_INTDIR)\entities.obj\ |
| 156 | $(XML_INTDIR)\error.obj\ |
| 157 | $(XML_INTDIR)\globals.obj\ |
| 158 | $(XML_INTDIR)\hash.obj\ |
| 159 | $(XML_INTDIR)\HTMLparser.obj\ |
| 160 | $(XML_INTDIR)\HTMLtree.obj\ |
| 161 | $(XML_INTDIR)\list.obj\ |
| 162 | $(XML_INTDIR)\nanoftp.obj\ |
| 163 | $(XML_INTDIR)\nanohttp.obj\ |
| 164 | $(XML_INTDIR)\parser.obj\ |
| 165 | $(XML_INTDIR)\parserInternals.obj\ |
| 166 | $(XML_INTDIR)\relaxng.obj\ |
| 167 | $(XML_INTDIR)\SAX.obj\ |
| 168 | $(XML_INTDIR)\SAX2.obj\ |
| 169 | $(XML_INTDIR)\threads.obj\ |
| 170 | $(XML_INTDIR)\tree.obj\ |
| 171 | $(XML_INTDIR)\uri.obj\ |
| 172 | $(XML_INTDIR)\valid.obj\ |
| 173 | $(XML_INTDIR)\xinclude.obj\ |
| 174 | $(XML_INTDIR)\xlink.obj\ |
| 175 | $(XML_INTDIR)\xmlIO.obj\ |
| 176 | $(XML_INTDIR)\xmlmemory.obj\ |
| 177 | $(XML_INTDIR)\xmlreader.obj\ |
| 178 | $(XML_INTDIR)\xmlregexp.obj\ |
| 179 | $(XML_INTDIR)\xmlschemas.obj\ |
| 180 | $(XML_INTDIR)\xmlschemastypes.obj\ |
| 181 | $(XML_INTDIR)\xmlunicode.obj\ |
| 182 | $(XML_INTDIR)\xpath.obj\ |
| 183 | $(XML_INTDIR)\xpointer.obj |
| 184 | |
| 185 | # Static libxml object files. |
| 186 | XML_OBJS_A = $(XML_INTDIR_A)\c14n.obj\ |
| 187 | $(XML_INTDIR_A)\catalog.obj\ |
| 188 | $(XML_INTDIR_A)\debugXML.obj\ |
| 189 | $(XML_INTDIR_A)\dict.obj\ |
| 190 | $(XML_INTDIR_A)\DOCBparser.obj\ |
| 191 | $(XML_INTDIR_A)\encoding.obj\ |
| 192 | $(XML_INTDIR_A)\entities.obj\ |
| 193 | $(XML_INTDIR_A)\error.obj\ |
| 194 | $(XML_INTDIR_A)\globals.obj\ |
| 195 | $(XML_INTDIR_A)\hash.obj\ |
| 196 | $(XML_INTDIR_A)\HTMLparser.obj\ |
| 197 | $(XML_INTDIR_A)\HTMLtree.obj\ |
| 198 | $(XML_INTDIR_A)\list.obj\ |
| 199 | $(XML_INTDIR_A)\nanoftp.obj\ |
| 200 | $(XML_INTDIR_A)\nanohttp.obj\ |
| 201 | $(XML_INTDIR_A)\parser.obj\ |
| 202 | $(XML_INTDIR_A)\parserInternals.obj\ |
| 203 | $(XML_INTDIR_A)\relaxng.obj\ |
| 204 | $(XML_INTDIR_A)\SAX.obj\ |
| 205 | $(XML_INTDIR_A)\SAX2.obj\ |
| 206 | $(XML_INTDIR_A)\threads.obj\ |
| 207 | $(XML_INTDIR_A)\tree.obj\ |
| 208 | $(XML_INTDIR_A)\uri.obj\ |
| 209 | $(XML_INTDIR_A)\valid.obj\ |
| 210 | $(XML_INTDIR_A)\xinclude.obj\ |
| 211 | $(XML_INTDIR_A)\xlink.obj\ |
| 212 | $(XML_INTDIR_A)\xmlIO.obj\ |
| 213 | $(XML_INTDIR_A)\xmlmemory.obj\ |
| 214 | $(XML_INTDIR_A)\xmlreader.obj\ |
| 215 | $(XML_INTDIR_A)\xmlregexp.obj\ |
| 216 | $(XML_INTDIR_A)\xmlschemas.obj\ |
| 217 | $(XML_INTDIR_A)\xmlschemastypes.obj\ |
| 218 | $(XML_INTDIR_A)\xmlunicode.obj\ |
| 219 | $(XML_INTDIR_A)\xpath.obj\ |
| 220 | $(XML_INTDIR_A)\xpointer.obj |
| 221 | |
| 222 | # Xmllint and friends executables. |
| 223 | UTILS = $(BINDIR)\xmllint.exe\ |
| 224 | $(BINDIR)\xmlcatalog.exe\ |
| 225 | $(BINDIR)\testAutomata.exe\ |
| 226 | $(BINDIR)\testC14N.exe\ |
| 227 | $(BINDIR)\testDocbook.exe\ |
| 228 | $(BINDIR)\testHTML.exe\ |
| 229 | $(BINDIR)\testReader.exe\ |
| 230 | $(BINDIR)\testRelax.exe\ |
| 231 | $(BINDIR)\testRegexp.exe\ |
| 232 | $(BINDIR)\testSAX.exe\ |
| 233 | $(BINDIR)\testSchemas.exe\ |
| 234 | $(BINDIR)\testURI.exe\ |
| 235 | $(BINDIR)\testXPath.exe |
| 236 | |
| 237 | |
| 238 | !if "$(WITH_THREADS)" == "yes" || "$(WITH_THREADS)" == "ctls" || "$(WITH_THREADS)" == "native" |
| 239 | UTILS = $(UTILS) $(BINDIR)\testThreadsWin32.exe |
| 240 | !else if "$(WITH_THREADS)" == "posix" |
| 241 | UTILS = $(UTILS) $(BINDIR)\testThreads.exe |
| 242 | !endif |
| 243 | |
| 244 | |
| 245 | all : libxml libxmla utils |
| 246 | |
| 247 | libxml : $(BINDIR)\$(XML_SO) |
| 248 | |
| 249 | libxmla : $(BINDIR)\$(XML_A) |
| 250 | |
| 251 | utils : $(UTILS) |
| 252 | |
| 253 | clean : |
| 254 | if exist $(XML_INTDIR) rmdir /S /Q $(XML_INTDIR) |
| 255 | if exist $(XML_INTDIR_A) rmdir /S /Q $(XML_INTDIR_A) |
| 256 | if exist $(UTILS_INTDIR) rmdir /S /Q $(UTILS_INTDIR) |
| 257 | if exist $(BINDIR) rmdir /S /Q $(BINDIR) |
| 258 | |
| 259 | distclean : clean |
| 260 | if exist config.* del config.* |
| 261 | if exist Makefile del Makefile |
| 262 | |
| 263 | rebuild : clean all |
| 264 | |
| 265 | install : all |
| 266 | if not exist $(INCPREFIX)\libxml mkdir $(INCPREFIX)\libxml |
| 267 | if not exist $(BINPREFIX) mkdir $(BINPREFIX) |
| 268 | if not exist $(LIBPREFIX) mkdir $(LIBPREFIX) |
| 269 | copy $(XML_SRCDIR)\include\libxml\*.h $(INCPREFIX)\libxml |
| 270 | copy $(BINDIR)\$(XML_SO) $(SOPREFIX) |
| 271 | copy $(BINDIR)\$(XML_A) $(LIBPREFIX) |
| 272 | copy $(BINDIR)\$(XML_IMP) $(LIBPREFIX) |
| 273 | copy $(BINDIR)\*.exe $(BINPREFIX) |
| 274 | -copy $(BINDIR)\*.pdb $(BINPREFIX) |
| 275 | |
| 276 | # This is a target for me, to make a binary distribution. Not for the public use, |
| 277 | # keep your hands off :-) |
| 278 | BDVERSION = $(LIBXML_MAJOR_VERSION).$(LIBXML_MINOR_VERSION).$(LIBXML_MICRO_VERSION) |
| 279 | BDPREFIX = $(XML_BASENAME)-$(BDVERSION).win32 |
| 280 | bindist : all |
| 281 | $(MAKE) /nologo PREFIX=$(BDPREFIX) BINPREFIX=$(BDPREFIX)\util install |
| 282 | cscript //NoLogo configure.js genreadme $(XML_BASENAME) $(BDVERSION) $(BDPREFIX)\readme.txt |
| 283 | |
| 284 | |
| 285 | # Makes the output directory. |
Igor Zlatkovic | 47a428d | 2003-08-29 10:25:39 +0000 | [diff] [blame] | 286 | $(BINDIR)\$(DUMMY) : |
Igor Zlatkovic | 9e0acaa | 2003-08-28 12:34:00 +0000 | [diff] [blame] | 287 | if not exist $(BINDIR) mkdir $(BINDIR) |
Igor Zlatkovic | 47a428d | 2003-08-29 10:25:39 +0000 | [diff] [blame] | 288 | touch $(BINDIR)\$(DUMMY) |
Igor Zlatkovic | 9e0acaa | 2003-08-28 12:34:00 +0000 | [diff] [blame] | 289 | |
| 290 | # Makes the libxml intermediate directory. |
Igor Zlatkovic | 47a428d | 2003-08-29 10:25:39 +0000 | [diff] [blame] | 291 | $(XML_INTDIR)\$(DUMMY) : |
Igor Zlatkovic | 9e0acaa | 2003-08-28 12:34:00 +0000 | [diff] [blame] | 292 | if not exist $(XML_INTDIR) mkdir $(XML_INTDIR) |
Igor Zlatkovic | 47a428d | 2003-08-29 10:25:39 +0000 | [diff] [blame] | 293 | touch $(XML_INTDIR)\$(DUMMY) |
Igor Zlatkovic | 9e0acaa | 2003-08-28 12:34:00 +0000 | [diff] [blame] | 294 | |
| 295 | # Makes the static libxml intermediate directory. |
Igor Zlatkovic | 47a428d | 2003-08-29 10:25:39 +0000 | [diff] [blame] | 296 | $(XML_INTDIR_A)\$(DUMMY) : |
Igor Zlatkovic | 9e0acaa | 2003-08-28 12:34:00 +0000 | [diff] [blame] | 297 | if not exist $(XML_INTDIR_A) mkdir $(XML_INTDIR_A) |
Igor Zlatkovic | 47a428d | 2003-08-29 10:25:39 +0000 | [diff] [blame] | 298 | touch $(XML_INTDIR_A)\$(DUMMY) |
Igor Zlatkovic | 9e0acaa | 2003-08-28 12:34:00 +0000 | [diff] [blame] | 299 | |
| 300 | # An implicit rule for libxml compilation. |
| 301 | {$(XML_SRCDIR)}.c{$(XML_INTDIR)}.obj: |
| 302 | $(CC) $(CFLAGS) -n$(XML_INTDIR) -c $< |
| 303 | |
| 304 | # An implicit rule for static libxml compilation. |
| 305 | {$(XML_SRCDIR)}.c{$(XML_INTDIR_A)}.obj: |
| 306 | $(CC) $(CFLAGS) -DLIBXML_STATIC -n$(XML_INTDIR_A)\ -c $< |
| 307 | |
| 308 | # Compiles libxml source. Uses the implicit rule for commands. |
Igor Zlatkovic | 47a428d | 2003-08-29 10:25:39 +0000 | [diff] [blame] | 309 | $(XML_OBJS) : $(XML_INTDIR)\$(DUMMY) |
Igor Zlatkovic | 9e0acaa | 2003-08-28 12:34:00 +0000 | [diff] [blame] | 310 | |
| 311 | # Compiles static libxml source. Uses the implicit rule for commands. |
Igor Zlatkovic | 47a428d | 2003-08-29 10:25:39 +0000 | [diff] [blame] | 312 | $(XML_OBJS_A) : $(XML_INTDIR_A)\$(DUMMY) |
Igor Zlatkovic | 9e0acaa | 2003-08-28 12:34:00 +0000 | [diff] [blame] | 313 | |
| 314 | #def4bcb.exe : def4bcb.c |
| 315 | |
| 316 | # Creates the export definition file (DEF) for libxml. |
Igor Zlatkovic | 47a428d | 2003-08-29 10:25:39 +0000 | [diff] [blame] | 317 | #$(XML_INTDIR)\$(XML_DEF) : $(XML_INTDIR)\$(DUMMY) $(XML_DEF).src def4bcb.exe |
| 318 | # $(CPP) $(CPPFLAGS) -o $(XML_INTDIR)\$(XML_DEF).tmp $(XML_DEF).src |
| 319 | # def4bcb -msnames < $(XML_INTDIR)\$(XML_DEF).tmp > $(XML_INTDIR)\$(XML_DEF) |
Igor Zlatkovic | 9e0acaa | 2003-08-28 12:34:00 +0000 | [diff] [blame] | 320 | |
| 321 | # Creates the libxml shared object. |
Igor Zlatkovic | 47a428d | 2003-08-29 10:25:39 +0000 | [diff] [blame] | 322 | $(BINDIR)\$(XML_SO) : $(BINDIR)\$(DUMMY) $(XML_OBJS) |
| 323 | $(LD) $(LDFLAGS) -Tpd -Gi c0d32.obj $(XML_OBJS),$(BINDIR)\$(XML_SO),,$(LIBS) |
| 324 | |
| 325 | #$(BINDIR)\$(XML_SO) : $(BINDIR)\$(DUMMY) $(XML_OBJS) $(XML_INTDIR)\$(XML_DEF) |
| 326 | # $(LD) $(LDFLAGS) -Tpd -Gi c0d32.obj $(XML_OBJS),$(BINDIR)\$(XML_SO),,$(LIBS),$(XML_INTDIR)\$(XML_DEF) |
Igor Zlatkovic | 9e0acaa | 2003-08-28 12:34:00 +0000 | [diff] [blame] | 327 | |
| 328 | # Creates the libxml archive. |
Igor Zlatkovic | 47a428d | 2003-08-29 10:25:39 +0000 | [diff] [blame] | 329 | $(BINDIR)\$(XML_A) : $(BINDIR)\$(DUMMY) $(XML_OBJS_A) |
Igor Zlatkovic | 9e0acaa | 2003-08-28 12:34:00 +0000 | [diff] [blame] | 330 | $(AR) $(BINDIR)\$(XML_A) $(ARFLAGS) /u $(XML_OBJS_A) |
| 331 | |
| 332 | # Makes the utils intermediate directory. |
Igor Zlatkovic | 47a428d | 2003-08-29 10:25:39 +0000 | [diff] [blame] | 333 | $(UTILS_INTDIR)\$(DUMMY) : |
Igor Zlatkovic | 9e0acaa | 2003-08-28 12:34:00 +0000 | [diff] [blame] | 334 | if not exist $(UTILS_INTDIR) mkdir $(UTILS_INTDIR) |
Igor Zlatkovic | 47a428d | 2003-08-29 10:25:39 +0000 | [diff] [blame] | 335 | touch $(UTILS_INTDIR)\$(DUMMY) |
Igor Zlatkovic | 9e0acaa | 2003-08-28 12:34:00 +0000 | [diff] [blame] | 336 | |
| 337 | # An implicit rule for xmllint and friends. |
| 338 | !if "$(STATIC)" == "1" |
| 339 | {$(UTILS_SRCDIR)}.c{$(BINDIR)}.exe: |
| 340 | $(CC) -DLIBXML_STATIC -w -D_RTLDLL -tWC $(CFLAGS) -o$(UTILS_INTDIR)\$&.obj -c $< |
| 341 | $(LD) $(LDFLAGS) c0x32.obj $(UTILS_INTDIR)\$&.obj,$@,,$(LIBS) $(XML_A) |
| 342 | !else |
| 343 | {$(UTILS_SRCDIR)}.c{$(BINDIR)}.exe: |
| 344 | $(CC) $(CFLAGS) -D_RTLDLL -tWC -o$(UTILS_INTDIR)\$&.obj -c $< |
| 345 | $(LD) $(LDFLAGS) c0x32.obj $(UTILS_INTDIR)\$&.obj $(XML_IMP),$@,,$(LIBS) |
| 346 | !endif |
| 347 | |
| 348 | # Builds xmllint and friends. Uses the implicit rule for commands. |
Igor Zlatkovic | 47a428d | 2003-08-29 10:25:39 +0000 | [diff] [blame] | 349 | $(UTILS) : $(UTILS_INTDIR)\$(DUMMY) $(BINDIR)\$(DUMMY) $(BINDIR)\$(XML_SO) $(BINDIR)\$(XML_A) |
Igor Zlatkovic | 9e0acaa | 2003-08-28 12:34:00 +0000 | [diff] [blame] | 350 | |
| 351 | # Source dependences should be autogenerated somehow here, but how to |
| 352 | # do it? I have no clue. |
| 353 | |