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