1*7c568831SAndroid Build Coastguard Worker# Makefile for libxml2, specific for Windows, BCB6 and Borland make. 2*7c568831SAndroid Build Coastguard Worker# 3*7c568831SAndroid Build Coastguard Worker# Take a look at the beginning and modify the variables to suit your 4*7c568831SAndroid Build Coastguard Worker# environment. Having done that, you can do a 5*7c568831SAndroid Build Coastguard Worker# 6*7c568831SAndroid Build Coastguard Worker# make [all] to build the libxml and the accompanying utilities. 7*7c568831SAndroid Build Coastguard Worker# make clean to remove all compiler output files and return to a 8*7c568831SAndroid Build Coastguard Worker# clean state. 9*7c568831SAndroid Build Coastguard Worker# make rebuild to rebuild everything from scratch. This basically does 10*7c568831SAndroid Build Coastguard Worker# a 'nmake clean' and then a 'nmake all'. 11*7c568831SAndroid Build Coastguard Worker# make install to install the library and its header files. 12*7c568831SAndroid Build Coastguard Worker# 13*7c568831SAndroid Build Coastguard Worker# August 2003, Eric Zurcher <[email protected]> 14*7c568831SAndroid Build Coastguard Worker# based on the MSVC version of 15*7c568831SAndroid Build Coastguard Worker# March 2002, Igor Zlatkovic <[email protected]> 16*7c568831SAndroid Build Coastguard Worker# 17*7c568831SAndroid Build Coastguard Worker 18*7c568831SAndroid Build Coastguard Worker# There should never be a need to modify anything below this line. 19*7c568831SAndroid Build Coastguard Worker# ---------------------------------------------------------------- 20*7c568831SAndroid Build Coastguard Worker 21*7c568831SAndroid Build Coastguard WorkerAUTOCONF = .\config.bcb 22*7c568831SAndroid Build Coastguard Worker!include $(AUTOCONF) 23*7c568831SAndroid Build Coastguard Worker 24*7c568831SAndroid Build Coastguard Worker!if !$d(BCB) 25*7c568831SAndroid Build Coastguard WorkerBCB = $(MAKEDIR)\.. 26*7c568831SAndroid Build Coastguard Worker!endif 27*7c568831SAndroid Build Coastguard Worker.autodepend 28*7c568831SAndroid Build Coastguard Worker 29*7c568831SAndroid Build Coastguard Worker# Names of various input and output components. 30*7c568831SAndroid Build Coastguard WorkerXML_NAME = xml2 31*7c568831SAndroid Build Coastguard WorkerXML_BASENAME = lib$(XML_NAME) 32*7c568831SAndroid Build Coastguard WorkerXML_SO = $(XML_BASENAME).dll 33*7c568831SAndroid Build Coastguard WorkerXML_IMP = $(XML_BASENAME).lib 34*7c568831SAndroid Build Coastguard WorkerXML_A = $(XML_BASENAME)_a.lib 35*7c568831SAndroid Build Coastguard WorkerDUMMY = dir.exists 36*7c568831SAndroid Build Coastguard Worker 37*7c568831SAndroid Build Coastguard Worker# Place where we let the compiler put its intermediate trash. 38*7c568831SAndroid Build Coastguard WorkerBINDIR = bin.bcb 39*7c568831SAndroid Build Coastguard WorkerXML_INTDIR = int.bcb 40*7c568831SAndroid Build Coastguard WorkerXML_INTDIR_A = int.a.bcb 41*7c568831SAndroid Build Coastguard WorkerUTILS_INTDIR = int.utils.bcb 42*7c568831SAndroid Build Coastguard Worker 43*7c568831SAndroid Build Coastguard Worker# The preprocessor and its options. 44*7c568831SAndroid Build Coastguard WorkerCPP = cpp32.exe -P- 45*7c568831SAndroid Build Coastguard WorkerCPPFLAGS = -I"$(XML_SRCDIR)\include" -DNOLIBTOOL 46*7c568831SAndroid Build Coastguard Worker!if "$(WITH_THREADS)" != "no" 47*7c568831SAndroid Build Coastguard WorkerCPPFLAGS = $(CPPFLAGS) -D__MT__ 48*7c568831SAndroid Build Coastguard Worker!endif 49*7c568831SAndroid Build Coastguard Worker 50*7c568831SAndroid Build Coastguard Worker# The compiler and its options. 51*7c568831SAndroid Build Coastguard WorkerCC = bcc32.exe 52*7c568831SAndroid Build Coastguard WorkerCFLAGS = -q -D_NO_VCL -D_WINDOWS -D_MBCS -DEILSEQ=2 -DNOLIBTOOL -w- 53*7c568831SAndroid Build Coastguard WorkerCFLAGS = $(CFLAGS) -I"$(XML_SRCDIR)" -I"$(XML_SRCDIR)\include" -I"$(INCPREFIX)" -I"$(INCLUDE)" 54*7c568831SAndroid Build Coastguard Worker!if "$(WITH_THREADS)" != "no" 55*7c568831SAndroid Build Coastguard WorkerCFLAGS = $(CFLAGS) -tWM 56*7c568831SAndroid Build Coastguard Worker!endif 57*7c568831SAndroid Build Coastguard Worker!if "$(DYNRUNTIME)" == "1" 58*7c568831SAndroid Build Coastguard WorkerCFLAGS = $(CFLAGS) -tWR 59*7c568831SAndroid Build Coastguard Worker!endif 60*7c568831SAndroid Build Coastguard Worker!if "$(WITH_THREADS)" == "ctls" 61*7c568831SAndroid Build Coastguard WorkerCFLAGS = $(CFLAGS) "-DXML_THREAD_LOCAL=__declspec(thread)" 62*7c568831SAndroid Build Coastguard Worker!endif 63*7c568831SAndroid Build Coastguard Worker 64*7c568831SAndroid Build Coastguard Worker# The linker and its options. 65*7c568831SAndroid Build Coastguard WorkerLD = ilink32.exe 66*7c568831SAndroid Build Coastguard WorkerLDFLAGS = -q -U$(LIBXML_MAJOR_VERSION).$(LIBXML_MINOR_VERSION) 67*7c568831SAndroid Build Coastguard WorkerLDFLAGS = $(LDFLAGS) -L"$(BINDIR);$(LIBPREFIX);$(LIB);$(BCB)\lib;$(BCB)\lib\PSdk" 68*7c568831SAndroid Build Coastguard WorkerLIBS = import32.lib 69*7c568831SAndroid Build Coastguard Worker!if "$(WITH_THREADS)" != "no" && "$(DYNRUNTIME)" == "1" 70*7c568831SAndroid Build Coastguard WorkerLIBS = $(LIBS) cw32mti.lib 71*7c568831SAndroid Build Coastguard Worker!elif "$(WITH_THREADS)" != "no" 72*7c568831SAndroid Build Coastguard WorkerLIBS = $(LIBS) cw32mt.lib 73*7c568831SAndroid Build Coastguard Worker!elif "$(DYNRUNTIME)" == "1" 74*7c568831SAndroid Build Coastguard WorkerLIBS = $(LIBS) cw32i.lib 75*7c568831SAndroid Build Coastguard Worker!else 76*7c568831SAndroid Build Coastguard WorkerLIBS = $(LIBS) cw32.lib 77*7c568831SAndroid Build Coastguard Worker!endif 78*7c568831SAndroid Build Coastguard Worker!if "$(WITH_HTTP)" == "1" 79*7c568831SAndroid Build Coastguard WorkerLIBS = $(LIBS) wsock32.lib ws2_32.lib 80*7c568831SAndroid Build Coastguard Worker!endif 81*7c568831SAndroid Build Coastguard Worker!if "$(WITH_ICONV)" == "1" 82*7c568831SAndroid Build Coastguard WorkerLIBS = $(LIBS) iconvomf.lib 83*7c568831SAndroid Build Coastguard Worker!endif 84*7c568831SAndroid Build Coastguard Worker!if "$(WITH_ZLIB)" == "1" 85*7c568831SAndroid Build Coastguard WorkerLIBS = $(LIBS) zlibomf.lib 86*7c568831SAndroid Build Coastguard Worker!endif 87*7c568831SAndroid Build Coastguard Worker!if "$(WITH_LZMA)" == "1" 88*7c568831SAndroid Build Coastguard WorkerLIBS = $(LIBS) liblzma.lib 89*7c568831SAndroid Build Coastguard Worker!endif 90*7c568831SAndroid Build Coastguard Worker!if "$(WITH_THREADS)" == "posix" 91*7c568831SAndroid Build Coastguard WorkerLIBS = $(LIBS) pthreadVC.lib 92*7c568831SAndroid Build Coastguard Worker!endif 93*7c568831SAndroid Build Coastguard Worker!if "$(WITH_MODULES)" == "1" 94*7c568831SAndroid Build Coastguard WorkerLIBS = $(LIBS) kernel32.lib 95*7c568831SAndroid Build Coastguard Worker!endif 96*7c568831SAndroid Build Coastguard Worker 97*7c568831SAndroid Build Coastguard Worker# The archiver and its options. 98*7c568831SAndroid Build Coastguard WorkerAR = tlib.exe 99*7c568831SAndroid Build Coastguard WorkerARFLAGS = /P64 /0 100*7c568831SAndroid Build Coastguard Worker 101*7c568831SAndroid Build Coastguard Worker# Optimisation and debug symbols. 102*7c568831SAndroid Build Coastguard Worker!if "$(DEBUG)" == "1" 103*7c568831SAndroid Build Coastguard WorkerCFLAGS = $(CFLAGS) -D_DEBUG -Od -v 104*7c568831SAndroid Build Coastguard WorkerLDFLAGS = $(LDFLAGS) -v 105*7c568831SAndroid Build Coastguard Worker!else 106*7c568831SAndroid Build Coastguard WorkerCFLAGS = $(CFLAGS) -DNDEBUG -O2 107*7c568831SAndroid Build Coastguard WorkerLDFLAGS = $(LDFLAGS) 108*7c568831SAndroid Build Coastguard Worker!endif 109*7c568831SAndroid Build Coastguard Worker 110*7c568831SAndroid Build Coastguard Worker# Libxml object files. 111*7c568831SAndroid Build Coastguard WorkerXML_OBJS = $(XML_INTDIR)\buf.obj\ 112*7c568831SAndroid Build Coastguard Worker $(XML_INTDIR)\c14n.obj\ 113*7c568831SAndroid Build Coastguard Worker $(XML_INTDIR)\catalog.obj\ 114*7c568831SAndroid Build Coastguard Worker $(XML_INTDIR)\chvalid.obj\ 115*7c568831SAndroid Build Coastguard Worker $(XML_INTDIR)\debugXML.obj\ 116*7c568831SAndroid Build Coastguard Worker $(XML_INTDIR)\dict.obj\ 117*7c568831SAndroid Build Coastguard Worker $(XML_INTDIR)\encoding.obj\ 118*7c568831SAndroid Build Coastguard Worker $(XML_INTDIR)\entities.obj\ 119*7c568831SAndroid Build Coastguard Worker $(XML_INTDIR)\error.obj\ 120*7c568831SAndroid Build Coastguard Worker $(XML_INTDIR)\globals.obj\ 121*7c568831SAndroid Build Coastguard Worker $(XML_INTDIR)\hash.obj\ 122*7c568831SAndroid Build Coastguard Worker $(XML_INTDIR)\HTMLparser.obj\ 123*7c568831SAndroid Build Coastguard Worker $(XML_INTDIR)\HTMLtree.obj\ 124*7c568831SAndroid Build Coastguard Worker $(XML_INTDIR)\legacy.obj\ 125*7c568831SAndroid Build Coastguard Worker $(XML_INTDIR)\list.obj\ 126*7c568831SAndroid Build Coastguard Worker $(XML_INTDIR)\nanohttp.obj\ 127*7c568831SAndroid Build Coastguard Worker $(XML_INTDIR)\parser.obj\ 128*7c568831SAndroid Build Coastguard Worker $(XML_INTDIR)\parserInternals.obj\ 129*7c568831SAndroid Build Coastguard Worker $(XML_INTDIR)\pattern.obj\ 130*7c568831SAndroid Build Coastguard Worker $(XML_INTDIR)\relaxng.obj\ 131*7c568831SAndroid Build Coastguard Worker $(XML_INTDIR)\SAX.obj\ 132*7c568831SAndroid Build Coastguard Worker $(XML_INTDIR)\SAX2.obj\ 133*7c568831SAndroid Build Coastguard Worker $(XML_INTDIR)\schematron.obj\ 134*7c568831SAndroid Build Coastguard Worker $(XML_INTDIR)\threads.obj\ 135*7c568831SAndroid Build Coastguard Worker $(XML_INTDIR)\tree.obj\ 136*7c568831SAndroid Build Coastguard Worker $(XML_INTDIR)\uri.obj\ 137*7c568831SAndroid Build Coastguard Worker $(XML_INTDIR)\valid.obj\ 138*7c568831SAndroid Build Coastguard Worker $(XML_INTDIR)\xinclude.obj\ 139*7c568831SAndroid Build Coastguard Worker $(XML_INTDIR)\xlink.obj\ 140*7c568831SAndroid Build Coastguard Worker $(XML_INTDIR)\xmlIO.obj\ 141*7c568831SAndroid Build Coastguard Worker $(XML_INTDIR)\xmlmemory.obj\ 142*7c568831SAndroid Build Coastguard Worker $(XML_INTDIR)\xmlreader.obj\ 143*7c568831SAndroid Build Coastguard Worker $(XML_INTDIR)\xmlregexp.obj\ 144*7c568831SAndroid Build Coastguard Worker $(XML_INTDIR)\xmlmodule.obj\ 145*7c568831SAndroid Build Coastguard Worker $(XML_INTDIR)\xmlsave.obj\ 146*7c568831SAndroid Build Coastguard Worker $(XML_INTDIR)\xmlschemas.obj\ 147*7c568831SAndroid Build Coastguard Worker $(XML_INTDIR)\xmlschemastypes.obj\ 148*7c568831SAndroid Build Coastguard Worker $(XML_INTDIR)\xmlunicode.obj\ 149*7c568831SAndroid Build Coastguard Worker $(XML_INTDIR)\xmlwriter.obj\ 150*7c568831SAndroid Build Coastguard Worker $(XML_INTDIR)\xpath.obj\ 151*7c568831SAndroid Build Coastguard Worker $(XML_INTDIR)\xpointer.obj\ 152*7c568831SAndroid Build Coastguard Worker $(XML_INTDIR)\xmlstring.obj 153*7c568831SAndroid Build Coastguard Worker 154*7c568831SAndroid Build Coastguard Worker# Static libxml object files. 155*7c568831SAndroid Build Coastguard WorkerXML_OBJS_A = $(XML_INTDIR_A)\buf.obj\ 156*7c568831SAndroid Build Coastguard Worker $(XML_INTDIR_A)\c14n.obj\ 157*7c568831SAndroid Build Coastguard Worker $(XML_INTDIR_A)\catalog.obj\ 158*7c568831SAndroid Build Coastguard Worker $(XML_INTDIR_A)\chvalid.obj\ 159*7c568831SAndroid Build Coastguard Worker $(XML_INTDIR_A)\debugXML.obj\ 160*7c568831SAndroid Build Coastguard Worker $(XML_INTDIR_A)\dict.obj\ 161*7c568831SAndroid Build Coastguard Worker $(XML_INTDIR_A)\encoding.obj\ 162*7c568831SAndroid Build Coastguard Worker $(XML_INTDIR_A)\entities.obj\ 163*7c568831SAndroid Build Coastguard Worker $(XML_INTDIR_A)\error.obj\ 164*7c568831SAndroid Build Coastguard Worker $(XML_INTDIR_A)\globals.obj\ 165*7c568831SAndroid Build Coastguard Worker $(XML_INTDIR_A)\hash.obj\ 166*7c568831SAndroid Build Coastguard Worker $(XML_INTDIR_A)\HTMLparser.obj\ 167*7c568831SAndroid Build Coastguard Worker $(XML_INTDIR_A)\HTMLtree.obj\ 168*7c568831SAndroid Build Coastguard Worker $(XML_INTDIR_A)\legacy.obj\ 169*7c568831SAndroid Build Coastguard Worker $(XML_INTDIR_A)\list.obj\ 170*7c568831SAndroid Build Coastguard Worker $(XML_INTDIR_A)\nanohttp.obj\ 171*7c568831SAndroid Build Coastguard Worker $(XML_INTDIR_A)\parser.obj\ 172*7c568831SAndroid Build Coastguard Worker $(XML_INTDIR_A)\parserInternals.obj\ 173*7c568831SAndroid Build Coastguard Worker $(XML_INTDIR_A)\pattern.obj\ 174*7c568831SAndroid Build Coastguard Worker $(XML_INTDIR_A)\relaxng.obj\ 175*7c568831SAndroid Build Coastguard Worker $(XML_INTDIR_A)\SAX.obj\ 176*7c568831SAndroid Build Coastguard Worker $(XML_INTDIR_A)\SAX2.obj\ 177*7c568831SAndroid Build Coastguard Worker $(XML_INTDIR_A)\schematron.obj\ 178*7c568831SAndroid Build Coastguard Worker $(XML_INTDIR_A)\threads.obj\ 179*7c568831SAndroid Build Coastguard Worker $(XML_INTDIR_A)\tree.obj\ 180*7c568831SAndroid Build Coastguard Worker $(XML_INTDIR_A)\uri.obj\ 181*7c568831SAndroid Build Coastguard Worker $(XML_INTDIR_A)\valid.obj\ 182*7c568831SAndroid Build Coastguard Worker $(XML_INTDIR_A)\xinclude.obj\ 183*7c568831SAndroid Build Coastguard Worker $(XML_INTDIR_A)\xlink.obj\ 184*7c568831SAndroid Build Coastguard Worker $(XML_INTDIR_A)\xmlIO.obj\ 185*7c568831SAndroid Build Coastguard Worker $(XML_INTDIR_A)\xmlmemory.obj\ 186*7c568831SAndroid Build Coastguard Worker $(XML_INTDIR_A)\xmlreader.obj\ 187*7c568831SAndroid Build Coastguard Worker $(XML_INTDIR_A)\xmlregexp.obj\ 188*7c568831SAndroid Build Coastguard Worker $(XML_INTDIR_A)\xmlmodule.obj\ 189*7c568831SAndroid Build Coastguard Worker $(XML_INTDIR_A)\xmlsave.obj\ 190*7c568831SAndroid Build Coastguard Worker $(XML_INTDIR_A)\xmlschemas.obj\ 191*7c568831SAndroid Build Coastguard Worker $(XML_INTDIR_A)\xmlschemastypes.obj\ 192*7c568831SAndroid Build Coastguard Worker $(XML_INTDIR_A)\xmlunicode.obj\ 193*7c568831SAndroid Build Coastguard Worker $(XML_INTDIR_A)\xmlwriter.obj\ 194*7c568831SAndroid Build Coastguard Worker $(XML_INTDIR_A)\xpath.obj\ 195*7c568831SAndroid Build Coastguard Worker $(XML_INTDIR_A)\xpointer.obj\ 196*7c568831SAndroid Build Coastguard Worker $(XML_INTDIR_A)\xmlstring.obj 197*7c568831SAndroid Build Coastguard Worker 198*7c568831SAndroid Build Coastguard Worker# Xmllint and friends executables. 199*7c568831SAndroid Build Coastguard WorkerUTILS = $(BINDIR)\xmllint.exe\ 200*7c568831SAndroid Build Coastguard Worker $(BINDIR)\xmlcatalog.exe\ 201*7c568831SAndroid Build Coastguard Worker $(BINDIR)\testModule.exe\ 202*7c568831SAndroid Build Coastguard Worker $(BINDIR)\runtest.exe\ 203*7c568831SAndroid Build Coastguard Worker $(BINDIR)\runsuite.exe\ 204*7c568831SAndroid Build Coastguard Worker $(BINDIR)\testapi.exe\ 205*7c568831SAndroid Build Coastguard Worker $(BINDIR)\testlimits.exe 206*7c568831SAndroid Build Coastguard Worker 207*7c568831SAndroid Build Coastguard Workerall : libxml libxmla utils 208*7c568831SAndroid Build Coastguard Worker 209*7c568831SAndroid Build Coastguard Workerlibxml : $(BINDIR)\$(XML_SO) 210*7c568831SAndroid Build Coastguard Worker 211*7c568831SAndroid Build Coastguard Workerlibxmla : $(BINDIR)\$(XML_A) 212*7c568831SAndroid Build Coastguard Worker 213*7c568831SAndroid Build Coastguard Workerutils : $(UTILS) 214*7c568831SAndroid Build Coastguard Worker 215*7c568831SAndroid Build Coastguard Workerclean : 216*7c568831SAndroid Build Coastguard Worker if exist $(XML_INTDIR) rmdir /S /Q $(XML_INTDIR) 217*7c568831SAndroid Build Coastguard Worker if exist $(XML_INTDIR_A) rmdir /S /Q $(XML_INTDIR_A) 218*7c568831SAndroid Build Coastguard Worker if exist $(UTILS_INTDIR) rmdir /S /Q $(UTILS_INTDIR) 219*7c568831SAndroid Build Coastguard Worker if exist $(BINDIR) rmdir /S /Q $(BINDIR) 220*7c568831SAndroid Build Coastguard Worker 221*7c568831SAndroid Build Coastguard Workerdistclean : clean 222*7c568831SAndroid Build Coastguard Worker if exist config.* del config.* 223*7c568831SAndroid Build Coastguard Worker if exist Makefile del Makefile 224*7c568831SAndroid Build Coastguard Worker 225*7c568831SAndroid Build Coastguard Workerrebuild : clean all 226*7c568831SAndroid Build Coastguard Worker 227*7c568831SAndroid Build Coastguard Workerinstall-libs : all 228*7c568831SAndroid Build Coastguard Worker if not exist "$(INCPREFIX)\libxml2" mkdir "$(INCPREFIX)\libxml2" 229*7c568831SAndroid Build Coastguard Worker if not exist "$(INCPREFIX)\libxml2\libxml" mkdir "$(INCPREFIX)\libxml2\libxml" 230*7c568831SAndroid Build Coastguard Worker if not exist "$(BINPREFIX)" mkdir "$(BINPREFIX)" 231*7c568831SAndroid Build Coastguard Worker if not exist "$(LIBPREFIX)" mkdir "$(LIBPREFIX)" 232*7c568831SAndroid Build Coastguard Worker copy $(XML_SRCDIR)\include\libxml\*.h "$(INCPREFIX)\libxml2\libxml" 233*7c568831SAndroid Build Coastguard Worker copy $(BINDIR)\$(XML_SO) "$(SOPREFIX)" 234*7c568831SAndroid Build Coastguard Worker copy $(BINDIR)\$(XML_A) "$(LIBPREFIX)" 235*7c568831SAndroid Build Coastguard Worker copy $(BINDIR)\$(XML_IMP) "$(LIBPREFIX)" 236*7c568831SAndroid Build Coastguard Worker copy $(BINDIR)\*.exe "$(BINPREFIX)" 237*7c568831SAndroid Build Coastguard Worker 238*7c568831SAndroid Build Coastguard Workerinstall : install-libs 239*7c568831SAndroid Build Coastguard Worker copy $(BINDIR)\*.exe "$(BINPREFIX)" 240*7c568831SAndroid Build Coastguard Worker 241*7c568831SAndroid Build Coastguard Workerinstall-dist : install-libs 242*7c568831SAndroid Build Coastguard Worker copy $(BINDIR)\xml*.exe "$(BINPREFIX)" 243*7c568831SAndroid Build Coastguard Worker 244*7c568831SAndroid Build Coastguard Worker# This is a target for me, to make a binary distribution. Not for the public use, 245*7c568831SAndroid Build Coastguard Worker# keep your hands off :-) 246*7c568831SAndroid Build Coastguard WorkerBDVERSION = $(LIBXML_MAJOR_VERSION).$(LIBXML_MINOR_VERSION).$(LIBXML_MICRO_VERSION) 247*7c568831SAndroid Build Coastguard WorkerBDPREFIX = $(XML_BASENAME)-$(BDVERSION).win32 248*7c568831SAndroid Build Coastguard Workerbindist : all 249*7c568831SAndroid Build Coastguard Worker $(MAKE) /nologo PREFIX=$(BDPREFIX) SOPREFIX=$(BDPREFIX)\bin install-dist 250*7c568831SAndroid Build Coastguard Worker cscript //NoLogo configure.js genreadme $(XML_BASENAME) $(BDVERSION) $(BDPREFIX)\readme.txt 251*7c568831SAndroid Build Coastguard Worker 252*7c568831SAndroid Build Coastguard Worker 253*7c568831SAndroid Build Coastguard Worker# Makes the output directory. 254*7c568831SAndroid Build Coastguard Worker$(BINDIR)\$(DUMMY) : 255*7c568831SAndroid Build Coastguard Worker if not exist $(BINDIR) mkdir $(BINDIR) 256*7c568831SAndroid Build Coastguard Worker touch $(BINDIR)\$(DUMMY) 257*7c568831SAndroid Build Coastguard Worker 258*7c568831SAndroid Build Coastguard Worker# Makes the libxml intermediate directory. 259*7c568831SAndroid Build Coastguard Worker$(XML_INTDIR)\$(DUMMY) : 260*7c568831SAndroid Build Coastguard Worker if not exist $(XML_INTDIR) mkdir $(XML_INTDIR) 261*7c568831SAndroid Build Coastguard Worker touch $(XML_INTDIR)\$(DUMMY) 262*7c568831SAndroid Build Coastguard Worker 263*7c568831SAndroid Build Coastguard Worker# Makes the static libxml intermediate directory. 264*7c568831SAndroid Build Coastguard Worker$(XML_INTDIR_A)\$(DUMMY) : 265*7c568831SAndroid Build Coastguard Worker if not exist $(XML_INTDIR_A) mkdir $(XML_INTDIR_A) 266*7c568831SAndroid Build Coastguard Worker touch $(XML_INTDIR_A)\$(DUMMY) 267*7c568831SAndroid Build Coastguard Worker 268*7c568831SAndroid Build Coastguard Worker# An implicit rule for libxml compilation. 269*7c568831SAndroid Build Coastguard Worker{$(XML_SRCDIR)}.c{$(XML_INTDIR)}.obj: 270*7c568831SAndroid Build Coastguard Worker $(CC) $(CFLAGS) -n$(XML_INTDIR) -c $< 271*7c568831SAndroid Build Coastguard Worker 272*7c568831SAndroid Build Coastguard Worker# An implicit rule for static libxml compilation. 273*7c568831SAndroid Build Coastguard Worker{$(XML_SRCDIR)}.c{$(XML_INTDIR_A)}.obj: 274*7c568831SAndroid Build Coastguard Worker $(CC) $(CFLAGS) -DLIBXML_STATIC -n$(XML_INTDIR_A)\ -c $< 275*7c568831SAndroid Build Coastguard Worker 276*7c568831SAndroid Build Coastguard Worker# Compiles libxml source. Uses the implicit rule for commands. 277*7c568831SAndroid Build Coastguard Worker$(XML_OBJS) : $(XML_INTDIR)\$(DUMMY) 278*7c568831SAndroid Build Coastguard Worker 279*7c568831SAndroid Build Coastguard Worker# Compiles static libxml source. Uses the implicit rule for commands. 280*7c568831SAndroid Build Coastguard Worker$(XML_OBJS_A) : $(XML_INTDIR_A)\$(DUMMY) 281*7c568831SAndroid Build Coastguard Worker 282*7c568831SAndroid Build Coastguard Worker#def4bcb.exe : def4bcb.c 283*7c568831SAndroid Build Coastguard Worker 284*7c568831SAndroid Build Coastguard Worker# Creates the libxml shared object. 285*7c568831SAndroid Build Coastguard Worker$(BINDIR)\$(XML_SO) : $(BINDIR)\$(DUMMY) $(XML_OBJS) 286*7c568831SAndroid Build Coastguard Worker $(LD) $(LDFLAGS) -Tpd -Gi c0d32.obj $(XML_OBJS),$(BINDIR)\$(XML_SO),,$(LIBS) 287*7c568831SAndroid Build Coastguard Worker 288*7c568831SAndroid Build Coastguard Worker#$(BINDIR)\$(XML_SO) : $(BINDIR)\$(DUMMY) $(XML_OBJS) 289*7c568831SAndroid Build Coastguard Worker# $(LD) $(LDFLAGS) -Tpd -Gi c0d32.obj $(XML_OBJS),$(BINDIR)\$(XML_SO),,$(LIBS) 290*7c568831SAndroid Build Coastguard Worker 291*7c568831SAndroid Build Coastguard Worker# Creates the libxml archive. 292*7c568831SAndroid Build Coastguard Worker$(BINDIR)\$(XML_A) : $(BINDIR)\$(DUMMY) $(XML_OBJS_A) 293*7c568831SAndroid Build Coastguard Worker $(AR) $(BINDIR)\$(XML_A) $(ARFLAGS) /u $(XML_OBJS_A) 294*7c568831SAndroid Build Coastguard Worker 295*7c568831SAndroid Build Coastguard Worker# Makes the utils intermediate directory. 296*7c568831SAndroid Build Coastguard Worker$(UTILS_INTDIR)\$(DUMMY) : 297*7c568831SAndroid Build Coastguard Worker if not exist $(UTILS_INTDIR) mkdir $(UTILS_INTDIR) 298*7c568831SAndroid Build Coastguard Worker touch $(UTILS_INTDIR)\$(DUMMY) 299*7c568831SAndroid Build Coastguard Worker 300*7c568831SAndroid Build Coastguard Worker# An implicit rule for xmllint and friends. 301*7c568831SAndroid Build Coastguard Worker!if "$(STATIC)" == "1" 302*7c568831SAndroid Build Coastguard Worker{$(UTILS_SRCDIR)}.c{$(BINDIR)}.exe: 303*7c568831SAndroid Build Coastguard Worker $(CC) -DLIBXML_STATIC -w -tWC $(CFLAGS) -o$(UTILS_INTDIR)\$&.obj -c $< 304*7c568831SAndroid Build Coastguard Worker $(LD) $(LDFLAGS) c0x32.obj $(UTILS_INTDIR)\$&.obj,$@,,$(LIBS) $(XML_A) 305*7c568831SAndroid Build Coastguard Worker!else 306*7c568831SAndroid Build Coastguard Worker{$(UTILS_SRCDIR)}.c{$(BINDIR)}.exe: 307*7c568831SAndroid Build Coastguard Worker $(CC) $(CFLAGS) -tWC -o$(UTILS_INTDIR)\$&.obj -c $< 308*7c568831SAndroid Build Coastguard Worker $(LD) $(LDFLAGS) c0x32.obj $(UTILS_INTDIR)\$&.obj $(XML_IMP),$@,,$(LIBS) 309*7c568831SAndroid Build Coastguard Worker!endif 310*7c568831SAndroid Build Coastguard Worker 311*7c568831SAndroid Build Coastguard Worker# Builds xmllint and friends. Uses the implicit rule for commands. 312*7c568831SAndroid Build Coastguard Worker$(UTILS) : $(UTILS_INTDIR)\$(DUMMY) $(BINDIR)\$(DUMMY) $(BINDIR)\$(XML_SO) $(BINDIR)\$(XML_A) 313*7c568831SAndroid Build Coastguard Worker 314*7c568831SAndroid Build Coastguard Worker# Source dependences should be autogenerated somehow here, but how to 315*7c568831SAndroid Build Coastguard Worker# do it? I have no clue. 316*7c568831SAndroid Build Coastguard Worker 317