Igor Zlatkovic | bd1a306 | 2002-11-14 17:43:24 +0000 | [diff] [blame] | 1 | # Makefile for libxml2, specific for Windows, GCC (mingw) and GNU 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 | # nmake [all] to build the libxml and the accompanying utilities. |
| 7 | # nmake clean to remove all compiler output files and return to a |
| 8 | # clean state. |
| 9 | # nmake rebuild to rebuild everything from scratch. This basically does |
| 10 | # a 'nmake clean' and then a 'nmake all'. |
| 11 | # nmake install to install the library and its header files. |
| 12 | # |
Daniel Veillard | beb70bd | 2002-12-18 14:53:54 +0000 | [diff] [blame] | 13 | # November 2002, Igor Zlatkovic <igor@zlatkovic.com> |
Igor Zlatkovic | bd1a306 | 2002-11-14 17:43:24 +0000 | [diff] [blame] | 14 | |
| 15 | AUTOCONF = .\config.mingw |
| 16 | |
| 17 | # If you cannot run the configuration script, which would take the burden of |
| 18 | # editing this file from your back, then remove the following line... |
| 19 | include $(AUTOCONF) |
| 20 | # ...and enable the following lines and adapt them to your environment. |
| 21 | #XML_SRCDIR = .. |
| 22 | #UTILS_SRCDIR = .. |
| 23 | #BINDIR = binaries |
| 24 | #LIBXML_MAJOR_VERSION = 0 # set this to the right value. |
| 25 | #LIBXML_MINOR_VERSION = 0 # set this to the right value. |
| 26 | #LIBXML_MICRO_VERSION = 0 # set this to the right value. |
| 27 | #WITH_TRIO = 0 |
| 28 | #WITH_THREADS = 0 |
| 29 | #WITH_FTP = 1 |
| 30 | #WITH_HTTP = 1 |
| 31 | #WITH_HTML = 1 |
| 32 | #WITH_C14N = 1 |
| 33 | #WITH_CATALOG = 1 |
| 34 | #WITH_DOCB = 1 |
| 35 | #WITH_XPATH = 1 |
| 36 | #WITH_XPTR = 1 |
| 37 | #WITH_XINCLUDE = 1 |
| 38 | #WITH_ICONV = 1 |
| 39 | #WITH_ZLIB = 0 |
| 40 | #WITH_DEBUG = 1 |
| 41 | #WITH_MEM_DEBUG = 0 |
| 42 | #WITH_SCHEMAS = 1 |
| 43 | #DEBUG = 0 |
| 44 | #STATIC = 0 |
| 45 | #PREFIX = . # set this to the right value. |
| 46 | #BINPREFIX = $(PREFIX)\bin |
| 47 | #INCPREFIX = $(PREFIX)\include |
| 48 | #LIBPREFIX = $(PREFIX)\lib |
| 49 | #SOPREFIX = $(PREFIX)\lib |
| 50 | #INCLUDE += ;$(INCPREFIX) |
| 51 | #LIB += ;$(LIBPREFIX) |
| 52 | |
| 53 | |
| 54 | # There should never be a need to modify anything below this line. |
| 55 | # ---------------------------------------------------------------- |
| 56 | |
| 57 | |
| 58 | # Names of various input and output components. |
| 59 | XML_NAME = xml2 |
| 60 | XML_BASENAME = lib$(XML_NAME) |
| 61 | XML_SO = $(XML_BASENAME).dll |
| 62 | XML_IMP = $(XML_BASENAME).lib |
| 63 | XML_A = $(XML_BASENAME).a |
| 64 | |
| 65 | # Place where we let the compiler put its intermediate trash. |
| 66 | XML_INTDIR = $(XML_BASENAME).int |
| 67 | XML_INTDIR_A = $(XML_BASENAME)_a.int |
| 68 | UTILS_INTDIR = utils.int |
| 69 | |
| 70 | # The preprocessor and its options. |
| 71 | CPP = gcc.exe -E |
| 72 | CPPFLAGS += -I$(XML_SRCDIR)/include |
| 73 | ifeq ($(WITH_THREADS),1) |
| 74 | CPPFLAGS += -D_REENTRANT |
| 75 | endif |
| 76 | |
| 77 | # The compiler and its options. |
| 78 | CC = gcc.exe |
| 79 | CFLAGS += -DWIN32 -D_WINDOWS -D_MBCS |
| 80 | CFLAGS += -I$(XML_SRCDIR) -I$(XML_SRCDIR)/include -I$(INCPREFIX) |
| 81 | ifneq ($(WITH_THREADS),no) |
| 82 | CFLAGS += -D_REENTRANT |
| 83 | endif |
| 84 | ifeq ($(WITH_THREADS),yes) |
| 85 | CFLAGS += -DHAVE_WIN32_THREADS -DHAVE_COMPILER_TLS |
| 86 | endif |
| 87 | ifeq ($(WITH_THREADS),ctls) |
| 88 | CFLAGS += -DHAVE_WIN32_THREADS -DHAVE_COMPILER_TLS |
| 89 | endif |
| 90 | ifeq ($(WITH_THREADS),native) |
| 91 | CFLAGS += -DHAVE_WIN32_THREADS |
| 92 | endif |
| 93 | ifeq ($(WITH_THREADS),posix) |
| 94 | CFLAGS += -DHAVE_PTHREAD_H |
| 95 | endif |
| 96 | ifeq ($(WITH_ZLIB),1) |
| 97 | CFLAGS += -DHAVE_ZLIB_H |
| 98 | endif |
| 99 | |
| 100 | # The linker and its options. |
| 101 | LD = gcc.exe |
| 102 | LDFLAGS += -Wl,--major-image-version,$(LIBXML_MAJOR_VERSION) |
| 103 | LDFLAGS += -Wl,--minor-image-version,$(LIBXML_MINOR_VERSION) |
| 104 | LDFLAGS += -Wl,-L,$(BINDIR) -Wl,-L,$(LIBPREFIX) |
| 105 | LIBS = |
| 106 | ifeq ($(WITH_FTP),1) |
| 107 | CFLAGS += -D_WINSOCKAPI_ |
| 108 | LIBS += -lwsock32 |
| 109 | endif |
| 110 | ifeq ($(WITH_HTTP),1) |
| 111 | CFLAGS += -D_WINSOCKAPI_ |
| 112 | LIBS += -lwsock32 |
| 113 | endif |
| 114 | ifeq ($(WITH_ICONV),1) |
| 115 | LIBS += -liconv |
| 116 | endif |
| 117 | ifeq ($(WITH_ZLIB),1) |
| 118 | LIBS += -lzlib |
| 119 | endif |
| 120 | ifeq ($(WITH_THREADS),posix) |
| 121 | LIBS += -lpthreadGC |
| 122 | endif |
| 123 | |
| 124 | # The archiver and its options. |
| 125 | AR = ar.exe |
| 126 | ARFLAGS = -r |
| 127 | |
| 128 | # Optimisation and debug symbols. |
| 129 | ifeq ($(DEBUG),1) |
| 130 | CFLAGS += -D_DEBUG -g |
| 131 | LDFLAGS += |
| 132 | else |
| 133 | CFLAGS += -DNDEBUG -O2 |
| 134 | LDFLAGS += |
| 135 | endif |
| 136 | |
| 137 | |
| 138 | # Libxml object files. |
| 139 | XML_OBJS = $(XML_INTDIR)/c14n.o\ |
| 140 | $(XML_INTDIR)/catalog.o\ |
Daniel Veillard | 1e5e438 | 2003-10-21 19:15:44 +0000 | [diff] [blame^] | 141 | $(XML_INTDIR)/chvalid.o\ |
Igor Zlatkovic | bd1a306 | 2002-11-14 17:43:24 +0000 | [diff] [blame] | 142 | $(XML_INTDIR)/debugXML.o\ |
Igor Zlatkovic | 1bab92d | 2003-08-28 10:24:40 +0000 | [diff] [blame] | 143 | $(XML_INTDIR)/dict.o\ |
Igor Zlatkovic | bd1a306 | 2002-11-14 17:43:24 +0000 | [diff] [blame] | 144 | $(XML_INTDIR)/DOCBparser.o\ |
| 145 | $(XML_INTDIR)/encoding.o\ |
| 146 | $(XML_INTDIR)/entities.o\ |
| 147 | $(XML_INTDIR)/error.o\ |
| 148 | $(XML_INTDIR)/globals.o\ |
| 149 | $(XML_INTDIR)/hash.o\ |
| 150 | $(XML_INTDIR)/HTMLparser.o\ |
| 151 | $(XML_INTDIR)/HTMLtree.o\ |
Daniel Veillard | 141310a | 2003-10-06 08:47:56 +0000 | [diff] [blame] | 152 | $(XML_INTDIR)/legacy.o\ |
Igor Zlatkovic | bd1a306 | 2002-11-14 17:43:24 +0000 | [diff] [blame] | 153 | $(XML_INTDIR)/list.o\ |
| 154 | $(XML_INTDIR)/nanoftp.o\ |
| 155 | $(XML_INTDIR)/nanohttp.o\ |
| 156 | $(XML_INTDIR)/parser.o\ |
| 157 | $(XML_INTDIR)/parserInternals.o\ |
Igor Zlatkovic | f3bffaf | 2003-02-08 17:53:46 +0000 | [diff] [blame] | 158 | $(XML_INTDIR)/relaxng.o\ |
Igor Zlatkovic | bd1a306 | 2002-11-14 17:43:24 +0000 | [diff] [blame] | 159 | $(XML_INTDIR)/SAX.o\ |
Igor Zlatkovic | 1bab92d | 2003-08-28 10:24:40 +0000 | [diff] [blame] | 160 | $(XML_INTDIR)/SAX2.o\ |
Igor Zlatkovic | bd1a306 | 2002-11-14 17:43:24 +0000 | [diff] [blame] | 161 | $(XML_INTDIR)/threads.o\ |
| 162 | $(XML_INTDIR)/tree.o\ |
| 163 | $(XML_INTDIR)/uri.o\ |
| 164 | $(XML_INTDIR)/valid.o\ |
| 165 | $(XML_INTDIR)/xinclude.o\ |
| 166 | $(XML_INTDIR)/xlink.o\ |
| 167 | $(XML_INTDIR)/xmlIO.o\ |
| 168 | $(XML_INTDIR)/xmlmemory.o\ |
Igor Zlatkovic | 3f752e2 | 2002-12-16 18:45:29 +0000 | [diff] [blame] | 169 | $(XML_INTDIR)/xmlreader.o\ |
Igor Zlatkovic | bd1a306 | 2002-11-14 17:43:24 +0000 | [diff] [blame] | 170 | $(XML_INTDIR)/xmlregexp.o\ |
| 171 | $(XML_INTDIR)/xmlschemas.o\ |
| 172 | $(XML_INTDIR)/xmlschemastypes.o\ |
| 173 | $(XML_INTDIR)/xmlunicode.o\ |
| 174 | $(XML_INTDIR)/xpath.o\ |
| 175 | $(XML_INTDIR)/xpointer.o |
| 176 | |
| 177 | XML_SRCS = $(subst .o,.c,$(subst $(XML_INTDIR)/,$(XML_SRCDIR)/,$(XML_OBJS))) |
| 178 | |
| 179 | # Static libxml object files. |
| 180 | XML_OBJS_A = $(XML_INTDIR_A)/c14n.o\ |
| 181 | $(XML_INTDIR_A)/catalog.o\ |
Daniel Veillard | 1e5e438 | 2003-10-21 19:15:44 +0000 | [diff] [blame^] | 182 | $(XML_INTDIR_A)/chvalid.o\ |
Igor Zlatkovic | bd1a306 | 2002-11-14 17:43:24 +0000 | [diff] [blame] | 183 | $(XML_INTDIR_A)/debugXML.o\ |
Igor Zlatkovic | 1bab92d | 2003-08-28 10:24:40 +0000 | [diff] [blame] | 184 | $(XML_INTDIR_A)/dict.o\ |
Igor Zlatkovic | bd1a306 | 2002-11-14 17:43:24 +0000 | [diff] [blame] | 185 | $(XML_INTDIR_A)/DOCBparser.o\ |
| 186 | $(XML_INTDIR_A)/encoding.o\ |
| 187 | $(XML_INTDIR_A)/entities.o\ |
| 188 | $(XML_INTDIR_A)/error.o\ |
| 189 | $(XML_INTDIR_A)/globals.o\ |
| 190 | $(XML_INTDIR_A)/hash.o\ |
| 191 | $(XML_INTDIR_A)/HTMLparser.o\ |
| 192 | $(XML_INTDIR_A)/HTMLtree.o\ |
Daniel Veillard | 141310a | 2003-10-06 08:47:56 +0000 | [diff] [blame] | 193 | $(XML_INTDIR_A)/legacy.o\ |
Igor Zlatkovic | bd1a306 | 2002-11-14 17:43:24 +0000 | [diff] [blame] | 194 | $(XML_INTDIR_A)/list.o\ |
| 195 | $(XML_INTDIR_A)/nanoftp.o\ |
| 196 | $(XML_INTDIR_A)/nanohttp.o\ |
| 197 | $(XML_INTDIR_A)/parser.o\ |
| 198 | $(XML_INTDIR_A)/parserInternals.o\ |
Igor Zlatkovic | f3bffaf | 2003-02-08 17:53:46 +0000 | [diff] [blame] | 199 | $(XML_INTDIR_A)/relaxng.o\ |
Igor Zlatkovic | bd1a306 | 2002-11-14 17:43:24 +0000 | [diff] [blame] | 200 | $(XML_INTDIR_A)/SAX.o\ |
Igor Zlatkovic | 1bab92d | 2003-08-28 10:24:40 +0000 | [diff] [blame] | 201 | $(XML_INTDIR_A)/SAX2.o\ |
Igor Zlatkovic | bd1a306 | 2002-11-14 17:43:24 +0000 | [diff] [blame] | 202 | $(XML_INTDIR_A)/threads.o\ |
| 203 | $(XML_INTDIR_A)/tree.o\ |
| 204 | $(XML_INTDIR_A)/uri.o\ |
| 205 | $(XML_INTDIR_A)/valid.o\ |
| 206 | $(XML_INTDIR_A)/xinclude.o\ |
| 207 | $(XML_INTDIR_A)/xlink.o\ |
| 208 | $(XML_INTDIR_A)/xmlIO.o\ |
| 209 | $(XML_INTDIR_A)/xmlmemory.o\ |
Igor Zlatkovic | 3f752e2 | 2002-12-16 18:45:29 +0000 | [diff] [blame] | 210 | $(XML_INTDIR_A)/xmlreader.o\ |
Igor Zlatkovic | bd1a306 | 2002-11-14 17:43:24 +0000 | [diff] [blame] | 211 | $(XML_INTDIR_A)/xmlregexp.o\ |
| 212 | $(XML_INTDIR_A)/xmlschemas.o\ |
| 213 | $(XML_INTDIR_A)/xmlschemastypes.o\ |
| 214 | $(XML_INTDIR_A)/xmlunicode.o\ |
| 215 | $(XML_INTDIR_A)/xpath.o\ |
| 216 | $(XML_INTDIR_A)/xpointer.o |
| 217 | |
| 218 | XML_SRCS_A = $(subst .o,.c,$(subst $(XML_INTDIR_A)/,$(XML_SRCDIR)/,$(XML_OBJS_A))) |
| 219 | |
| 220 | # Xmllint and friends executables. |
| 221 | UTILS = $(BINDIR)/xmllint.exe\ |
| 222 | $(BINDIR)/xmlcatalog.exe\ |
| 223 | $(BINDIR)/testAutomata.exe\ |
| 224 | $(BINDIR)/testC14N.exe\ |
| 225 | $(BINDIR)/testDocbook.exe\ |
| 226 | $(BINDIR)/testHTML.exe\ |
Igor Zlatkovic | 3f752e2 | 2002-12-16 18:45:29 +0000 | [diff] [blame] | 227 | $(BINDIR)/testReader.exe\ |
Igor Zlatkovic | bd1a306 | 2002-11-14 17:43:24 +0000 | [diff] [blame] | 228 | $(BINDIR)/testRegexp.exe\ |
Igor Zlatkovic | f3bffaf | 2003-02-08 17:53:46 +0000 | [diff] [blame] | 229 | $(BINDIR)/testRelax.exe\ |
Igor Zlatkovic | bd1a306 | 2002-11-14 17:43:24 +0000 | [diff] [blame] | 230 | $(BINDIR)/testSAX.exe\ |
| 231 | $(BINDIR)/testSchemas.exe\ |
| 232 | $(BINDIR)/testURI.exe\ |
| 233 | $(BINDIR)/testXPath.exe |
| 234 | ifeq ($(WITH_THREADS),yes) |
| 235 | UTILS += $(BINDIR)/testThreadsWin32.exe |
| 236 | endif |
| 237 | ifeq ($(WITH_THREADS),ctls) |
| 238 | UTILS += $(BINDIR)/testThreadsWin32.exe |
| 239 | endif |
| 240 | ifeq ($(WITH_THREADS),native) |
| 241 | UTILS += $(BINDIR)/testThreadsWin32.exe |
| 242 | endif |
| 243 | ifeq ($(WITH_THREADS),posix) |
| 244 | UTILS += $(BINDIR)/testThreads.exe |
| 245 | endif |
| 246 | |
| 247 | all : dep libxml libxmla utils |
| 248 | |
| 249 | libxml : $(BINDIR)/$(XML_SO) |
| 250 | |
| 251 | libxmla : $(BINDIR)/$(XML_A) |
| 252 | |
| 253 | utils : $(UTILS) |
| 254 | |
| 255 | clean : |
Igor Zlatkovic | 1bab92d | 2003-08-28 10:24:40 +0000 | [diff] [blame] | 256 | cmd.exe /C if exist $(XML_INTDIR) rmdir /S /Q $(XML_INTDIR) |
| 257 | cmd.exe /C if exist $(XML_INTDIR_A) rmdir /S /Q $(XML_INTDIR_A) |
| 258 | cmd.exe /C if exist $(UTILS_INTDIR) rmdir /S /Q $(UTILS_INTDIR) |
| 259 | cmd.exe /C if exist $(BINDIR) rmdir /S /Q $(BINDIR) |
| 260 | cmd.exe /C if exist depends.mingw del depends.mingw |
Igor Zlatkovic | bd1a306 | 2002-11-14 17:43:24 +0000 | [diff] [blame] | 261 | |
| 262 | distclean : clean |
Igor Zlatkovic | 1bab92d | 2003-08-28 10:24:40 +0000 | [diff] [blame] | 263 | cmd.exe /C if exist config.* del config.* |
| 264 | cmd.exe /C if exist Makefile del Makefile |
Igor Zlatkovic | bd1a306 | 2002-11-14 17:43:24 +0000 | [diff] [blame] | 265 | |
| 266 | rebuild : clean all |
| 267 | |
| 268 | install : all |
Igor Zlatkovic | 1bab92d | 2003-08-28 10:24:40 +0000 | [diff] [blame] | 269 | cmd.exe /C if not exist $(INCPREFIX)\libxml mkdir $(INCPREFIX)\libxml |
| 270 | cmd.exe /C if not exist $(BINPREFIX) mkdir $(BINPREFIX) |
| 271 | cmd.exe /C if not exist $(LIBPREFIX) mkdir $(LIBPREFIX) |
| 272 | cmd.exe /C copy $(XML_SRCDIR)\include\libxml\*.h $(INCPREFIX)\libxml |
| 273 | cmd.exe /C copy $(BINDIR)\$(XML_SO) $(SOPREFIX) |
| 274 | cmd.exe /C copy $(BINDIR)\$(XML_A) $(LIBPREFIX) |
| 275 | cmd.exe /C copy $(BINDIR)\$(XML_IMP) $(LIBPREFIX) |
| 276 | cmd.exe /C copy $(BINDIR)\*.exe $(BINPREFIX) |
Igor Zlatkovic | bd1a306 | 2002-11-14 17:43:24 +0000 | [diff] [blame] | 277 | |
| 278 | # This is a target for me, to make a binary distribution. Not for the public use, |
| 279 | # keep your hands off :-) |
| 280 | BDVERSION = $(LIBXML_MAJOR_VERSION).$(LIBXML_MINOR_VERSION).$(LIBXML_MICRO_VERSION) |
| 281 | BDPREFIX = $(XML_BASENAME)-$(BDVERSION).win32 |
| 282 | bindist : all |
| 283 | $(MAKE) PREFIX=$(BDPREFIX) BINPREFIX=$(BDPREFIX)/util install |
| 284 | cscript //NoLogo configure.js genreadme $(XML_BASENAME) $(BDVERSION) $(BDPREFIX)\readme.txt |
| 285 | |
| 286 | |
| 287 | # Creates the dependency file |
| 288 | dep : |
| 289 | $(CC) $(CFLAGS) -M $(XML_SRCS) > depends.mingw |
| 290 | |
| 291 | |
| 292 | # Makes the output directory. |
| 293 | $(BINDIR) : |
Igor Zlatkovic | 1bab92d | 2003-08-28 10:24:40 +0000 | [diff] [blame] | 294 | cmd.exe /C if not exist $(BINDIR) mkdir $(BINDIR) |
Igor Zlatkovic | bd1a306 | 2002-11-14 17:43:24 +0000 | [diff] [blame] | 295 | |
| 296 | |
| 297 | # Makes the libxml intermediate directory. |
| 298 | $(XML_INTDIR) : |
Igor Zlatkovic | 1bab92d | 2003-08-28 10:24:40 +0000 | [diff] [blame] | 299 | cmd.exe /C if not exist $(XML_INTDIR) mkdir $(XML_INTDIR) |
Igor Zlatkovic | bd1a306 | 2002-11-14 17:43:24 +0000 | [diff] [blame] | 300 | |
| 301 | # Makes the static libxml intermediate directory. |
| 302 | $(XML_INTDIR_A) : |
Igor Zlatkovic | 1bab92d | 2003-08-28 10:24:40 +0000 | [diff] [blame] | 303 | cmd.exe /C if not exist $(XML_INTDIR_A) mkdir $(XML_INTDIR_A) |
Igor Zlatkovic | bd1a306 | 2002-11-14 17:43:24 +0000 | [diff] [blame] | 304 | |
| 305 | # An implicit rule for libxml compilation. |
| 306 | $(XML_INTDIR)/%.o : $(XML_SRCDIR)/%.c |
| 307 | $(CC) $(CFLAGS) -o $@ -c $< |
| 308 | |
| 309 | # An implicit rule for static libxml compilation. |
| 310 | $(XML_INTDIR_A)/%.o : $(XML_SRCDIR)/%.c |
| 311 | $(CC) $(CFLAGS) -DLIBXML_STATIC -o $@ -c $< |
| 312 | |
| 313 | |
| 314 | # Compiles libxml source. Uses the implicit rule for commands. |
| 315 | $(XML_OBJS) : $(XML_INTDIR) |
| 316 | |
| 317 | # Compiles static libxml source. Uses the implicit rule for commands. |
| 318 | $(XML_OBJS_A) : $(XML_INTDIR_A) |
| 319 | |
| 320 | # Creates the libxml shared object. |
| 321 | XMLSO_LDFLAGS = $(LDFLAGS) -shared -Wl,--dll -Wl,--out-implib,$(BINDIR)/$(XML_IMP) |
| 322 | $(BINDIR)/$(XML_SO) : $(BINDIR) $(XML_OBJS) |
| 323 | $(LD) $(XMLSO_LDFLAGS) -o $(BINDIR)/$(XML_SO) $(XML_OBJS) $(LIBS) |
| 324 | |
| 325 | # Creates the libxml archive. |
| 326 | $(BINDIR)/$(XML_A) : $(BINDIR) $(XML_OBJS_A) |
| 327 | $(AR) $(ARFLAGS) $(BINDIR)\$(XML_A) $(XML_OBJS_A) |
| 328 | |
| 329 | |
| 330 | # Makes the utils intermediate directory. |
| 331 | $(UTILS_INTDIR) : |
Igor Zlatkovic | 1bab92d | 2003-08-28 10:24:40 +0000 | [diff] [blame] | 332 | cmd.exe /C if not exist $(UTILS_INTDIR) mkdir $(UTILS_INTDIR) |
Igor Zlatkovic | bd1a306 | 2002-11-14 17:43:24 +0000 | [diff] [blame] | 333 | |
| 334 | # An implicit rule for xmllint and friends. |
| 335 | ifeq ($(STATIC),1) |
| 336 | $(BINDIR)/%.exe : $(UTILS_SRCDIR)/%.c |
| 337 | $(CC) -DLIBXML_STATIC $(CFLAGS) -o $(subst .c,.o,$(UTILS_INTDIR)/$(<F)) -c $< |
Igor Zlatkovic | 002372e | 2002-11-22 18:07:37 +0000 | [diff] [blame] | 338 | $(LD) $(LDFLAGS) -o $@ $(subst .c,.o,$(UTILS_INTDIR)/$(<F)) -l$(XML_BASENAME) $(LIBS) |
Igor Zlatkovic | bd1a306 | 2002-11-14 17:43:24 +0000 | [diff] [blame] | 339 | else |
| 340 | $(BINDIR)/%.exe : $(UTILS_SRCDIR)/%.c |
| 341 | $(CC) $(CFLAGS) -o $(subst .c,.o,$(UTILS_INTDIR)/$(<F)) -c $< |
Igor Zlatkovic | 002372e | 2002-11-22 18:07:37 +0000 | [diff] [blame] | 342 | $(LD) $(LDFLAGS) -o $@ $(subst .c,.o,$(UTILS_INTDIR)/$(<F)) -l$(XML_BASENAME) $(LIBS) |
Igor Zlatkovic | bd1a306 | 2002-11-14 17:43:24 +0000 | [diff] [blame] | 343 | endif |
| 344 | |
| 345 | # Builds xmllint and friends. Uses the implicit rule for commands. |
| 346 | $(UTILS) : $(UTILS_INTDIR) $(BINDIR) libxml libxmla |
| 347 | |
| 348 | # Source dependencies |
| 349 | #-include depends.mingw |
| 350 | |