OLD | NEW |
1 # Makefile for libxml2, specific for Windows, GCC (mingw) and GNU make. | 1 # Makefile for libxml2, specific for Windows, GCC (mingw) and GNU make. |
2 # | 2 # |
3 # Take a look at the beginning and modify the variables to suit your | 3 # Take a look at the beginning and modify the variables to suit your |
4 # environment. Having done that, you can do a | 4 # environment. Having done that, you can do a |
5 # | 5 # |
6 # nmake [all] to build the libxml and the accompanying utilities. | 6 # nmake [all] to build the libxml and the accompanying utilities. |
7 # nmake clean to remove all compiler output files and return to a | 7 # nmake clean to remove all compiler output files and return to a |
8 # clean state. | 8 # clean state. |
9 # nmake rebuild to rebuild everything from scratch. This basically does | 9 # nmake rebuild to rebuild everything from scratch. This basically does |
10 # a 'nmake clean' and then a 'nmake all'. | 10 # a 'nmake clean' and then a 'nmake all'. |
(...skipping 15 matching lines...) Expand all Loading... |
26 XML_A = $(XML_BASENAME).a | 26 XML_A = $(XML_BASENAME).a |
27 | 27 |
28 # Place where we let the compiler put its output. | 28 # Place where we let the compiler put its output. |
29 BINDIR = bin.mingw | 29 BINDIR = bin.mingw |
30 XML_INTDIR = int.mingw | 30 XML_INTDIR = int.mingw |
31 XML_INTDIR_A = int.a.mingw | 31 XML_INTDIR_A = int.a.mingw |
32 UTILS_INTDIR = int.utils.mingw | 32 UTILS_INTDIR = int.utils.mingw |
33 | 33 |
34 # The preprocessor and its options. | 34 # The preprocessor and its options. |
35 CPP = gcc.exe -E | 35 CPP = gcc.exe -E |
36 CPPFLAGS += -I$(XML_SRCDIR)/include | 36 CPPFLAGS += -I$(XML_SRCDIR)/include -DNOLIBTOOL |
37 ifeq ($(WITH_THREADS),1) | 37 ifeq ($(WITH_THREADS),1) |
38 CPPFLAGS += -D_REENTRANT | 38 CPPFLAGS += -D_REENTRANT |
39 endif | 39 endif |
40 | 40 |
41 # The compiler and its options. | 41 # The compiler and its options. |
42 CC = gcc.exe | 42 CC = gcc.exe |
43 CFLAGS += -DWIN32 -D_WINDOWS -D_MBCS | 43 CFLAGS += -DWIN32 -D_WINDOWS -D_MBCS -DNOLIBTOOL |
44 CFLAGS += -I$(XML_SRCDIR) -I$(XML_SRCDIR)/include -I$(INCPREFIX) | 44 CFLAGS += -I$(XML_SRCDIR) -I$(XML_SRCDIR)/include -I$(INCPREFIX) $(INCLUDE) |
45 ifneq ($(WITH_THREADS),no) | 45 ifneq ($(WITH_THREADS),no) |
46 CFLAGS += -D_REENTRANT | 46 CFLAGS += -D_REENTRANT |
47 endif | 47 endif |
48 ifeq ($(WITH_THREADS),yes) | 48 ifeq ($(WITH_THREADS),yes) |
49 CFLAGS += -DHAVE_WIN32_THREADS -DHAVE_COMPILER_TLS | 49 CFLAGS += -DHAVE_WIN32_THREADS -DHAVE_COMPILER_TLS |
50 endif | 50 endif |
51 ifeq ($(WITH_THREADS),ctls) | 51 ifeq ($(WITH_THREADS),ctls) |
52 CFLAGS += -DHAVE_WIN32_THREADS -DHAVE_COMPILER_TLS | 52 CFLAGS += -DHAVE_WIN32_THREADS -DHAVE_COMPILER_TLS |
53 endif | 53 endif |
54 ifeq ($(WITH_THREADS),native) | 54 ifeq ($(WITH_THREADS),native) |
55 CFLAGS += -DHAVE_WIN32_THREADS | 55 CFLAGS += -DHAVE_WIN32_THREADS |
56 endif | 56 endif |
57 ifeq ($(WITH_THREADS),posix) | 57 ifeq ($(WITH_THREADS),posix) |
58 CFLAGS += -DHAVE_PTHREAD_H | 58 CFLAGS += -DHAVE_PTHREAD_H |
59 endif | 59 endif |
60 ifeq ($(WITH_ZLIB),1) | 60 ifeq ($(WITH_ZLIB),1) |
61 CFLAGS += -DHAVE_ZLIB_H | 61 CFLAGS += -DHAVE_ZLIB_H |
62 endif | 62 endif |
| 63 ifeq ($(WITH_LZMA),1) |
| 64 CFLAGS += -DHAVE_LZMA_H |
| 65 endif |
63 | 66 |
64 # The linker and its options. | 67 # The linker and its options. |
65 LD = gcc.exe | 68 LD = gcc.exe |
66 LDFLAGS += -Wl,--major-image-version,$(LIBXML_MAJOR_VERSION) | 69 LDFLAGS += -Wl,--major-image-version,$(LIBXML_MAJOR_VERSION) |
67 LDFLAGS += -Wl,--minor-image-version,$(LIBXML_MINOR_VERSION) | 70 LDFLAGS += -Wl,--minor-image-version,$(LIBXML_MINOR_VERSION) |
68 LDFLAGS += -Wl,-L,$(BINDIR) -Wl,-L,$(LIBPREFIX) | 71 LDFLAGS += -Wl,-L,$(BINDIR) -Wl,-L,$(LIBPREFIX) |
69 LIBS = | 72 LIBS = |
70 ifeq ($(WITH_FTP),1) | 73 ifeq ($(WITH_FTP),1) |
71 CFLAGS += -D_WINSOCKAPI_ | 74 CFLAGS += -D_WINSOCKAPI_ |
72 LIBS += -lwsock32 | 75 LIBS += -lwsock32 -lws2_32 |
73 endif | 76 endif |
74 ifeq ($(WITH_HTTP),1) | 77 ifeq ($(WITH_HTTP),1) |
75 CFLAGS += -D_WINSOCKAPI_ | 78 CFLAGS += -D_WINSOCKAPI_ |
76 LIBS += -lwsock32 | 79 LIBS += -lwsock32 -lws2_32 |
77 endif | 80 endif |
78 ifeq ($(WITH_ICONV),1) | 81 ifeq ($(WITH_ICONV),1) |
79 LIBS += -liconv | 82 LIBS += -liconv |
80 endif | 83 endif |
81 ifeq ($(WITH_ZLIB),1) | 84 ifeq ($(WITH_ZLIB),1) |
82 LIBS += -lzdll | 85 # Could be named differently |
| 86 # LIBS += -lzdll |
| 87 LIBS += -lz |
| 88 endif |
| 89 ifeq ($(WITH_LZMA),1) |
| 90 LIBS += -llzma |
83 endif | 91 endif |
84 ifeq ($(WITH_THREADS),posix) | 92 ifeq ($(WITH_THREADS),posix) |
85 LIBS += -lpthreadGC | 93 LIBS += -lpthreadGC |
86 endif | 94 endif |
87 ifeq ($(WITH_MODULES),1) | 95 ifeq ($(WITH_MODULES),1) |
88 LIBS += -lkernel32 | 96 LIBS += -lkernel32 |
89 endif | 97 endif |
90 | 98 |
| 99 LIBS += $(LIB) |
| 100 |
91 # The archiver and its options. | 101 # The archiver and its options. |
92 AR = ar.exe | 102 AR = ar.exe |
93 ARFLAGS = -r | 103 ARFLAGS = -r |
94 | 104 |
95 # Optimisation and debug symbols. | 105 # Optimisation and debug symbols. |
96 ifeq ($(DEBUG),1) | 106 ifeq ($(DEBUG),1) |
97 CFLAGS += -D_DEBUG -g | 107 CFLAGS += -D_DEBUG -g |
98 LDFLAGS += | 108 LDFLAGS += |
99 else | 109 else |
100 CFLAGS += -DNDEBUG -O2 | 110 CFLAGS += -DNDEBUG -O2 |
101 LDFLAGS += | 111 LDFLAGS += |
102 endif | 112 endif |
103 | 113 |
104 | 114 |
105 # Libxml object files. | 115 # Libxml object files. |
106 XML_OBJS = $(XML_INTDIR)/c14n.o\ | 116 XML_OBJS = $(XML_INTDIR)/buf.o\ |
| 117 » $(XML_INTDIR)/c14n.o\ |
107 $(XML_INTDIR)/catalog.o\ | 118 $(XML_INTDIR)/catalog.o\ |
108 $(XML_INTDIR)/chvalid.o\ | 119 $(XML_INTDIR)/chvalid.o\ |
109 $(XML_INTDIR)/debugXML.o\ | 120 $(XML_INTDIR)/debugXML.o\ |
110 $(XML_INTDIR)/dict.o\ | 121 $(XML_INTDIR)/dict.o\ |
111 $(XML_INTDIR)/DOCBparser.o\ | 122 $(XML_INTDIR)/DOCBparser.o\ |
112 $(XML_INTDIR)/encoding.o\ | 123 $(XML_INTDIR)/encoding.o\ |
113 $(XML_INTDIR)/entities.o\ | 124 $(XML_INTDIR)/entities.o\ |
114 $(XML_INTDIR)/error.o\ | 125 $(XML_INTDIR)/error.o\ |
115 $(XML_INTDIR)/globals.o\ | 126 $(XML_INTDIR)/globals.o\ |
116 $(XML_INTDIR)/hash.o\ | 127 $(XML_INTDIR)/hash.o\ |
(...skipping 26 matching lines...) Expand all Loading... |
143 $(XML_INTDIR)/xmlschemastypes.o\ | 154 $(XML_INTDIR)/xmlschemastypes.o\ |
144 $(XML_INTDIR)/xmlunicode.o\ | 155 $(XML_INTDIR)/xmlunicode.o\ |
145 $(XML_INTDIR)/xmlwriter.o\ | 156 $(XML_INTDIR)/xmlwriter.o\ |
146 $(XML_INTDIR)/xpath.o\ | 157 $(XML_INTDIR)/xpath.o\ |
147 $(XML_INTDIR)/xpointer.o\ | 158 $(XML_INTDIR)/xpointer.o\ |
148 $(XML_INTDIR)/xmlstring.o | 159 $(XML_INTDIR)/xmlstring.o |
149 | 160 |
150 XML_SRCS = $(subst .o,.c,$(subst $(XML_INTDIR)/,$(XML_SRCDIR)/,$(XML_OBJS))) | 161 XML_SRCS = $(subst .o,.c,$(subst $(XML_INTDIR)/,$(XML_SRCDIR)/,$(XML_OBJS))) |
151 | 162 |
152 # Static libxml object files. | 163 # Static libxml object files. |
153 XML_OBJS_A = $(XML_INTDIR_A)/c14n.o\ | 164 XML_OBJS_A = $(XML_INTDIR_A)/buf.o\ |
| 165 » $(XML_INTDIR_A)/c14n.o\ |
154 $(XML_INTDIR_A)/catalog.o\ | 166 $(XML_INTDIR_A)/catalog.o\ |
155 $(XML_INTDIR_A)/chvalid.o\ | 167 $(XML_INTDIR_A)/chvalid.o\ |
156 $(XML_INTDIR_A)/debugXML.o\ | 168 $(XML_INTDIR_A)/debugXML.o\ |
157 $(XML_INTDIR_A)/dict.o\ | 169 $(XML_INTDIR_A)/dict.o\ |
158 $(XML_INTDIR_A)/DOCBparser.o\ | 170 $(XML_INTDIR_A)/DOCBparser.o\ |
159 $(XML_INTDIR_A)/encoding.o\ | 171 $(XML_INTDIR_A)/encoding.o\ |
160 $(XML_INTDIR_A)/entities.o\ | 172 $(XML_INTDIR_A)/entities.o\ |
161 $(XML_INTDIR_A)/error.o\ | 173 $(XML_INTDIR_A)/error.o\ |
162 $(XML_INTDIR_A)/globals.o\ | 174 $(XML_INTDIR_A)/globals.o\ |
163 $(XML_INTDIR_A)/hash.o\ | 175 $(XML_INTDIR_A)/hash.o\ |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
206 $(BINDIR)/testReader.exe\ | 218 $(BINDIR)/testReader.exe\ |
207 $(BINDIR)/testRegexp.exe\ | 219 $(BINDIR)/testRegexp.exe\ |
208 $(BINDIR)/testModule.exe\ | 220 $(BINDIR)/testModule.exe\ |
209 $(BINDIR)/testRelax.exe\ | 221 $(BINDIR)/testRelax.exe\ |
210 $(BINDIR)/testSAX.exe\ | 222 $(BINDIR)/testSAX.exe\ |
211 $(BINDIR)/testSchemas.exe\ | 223 $(BINDIR)/testSchemas.exe\ |
212 $(BINDIR)/testURI.exe\ | 224 $(BINDIR)/testURI.exe\ |
213 $(BINDIR)/testXPath.exe\ | 225 $(BINDIR)/testXPath.exe\ |
214 $(BINDIR)/runtest.exe\ | 226 $(BINDIR)/runtest.exe\ |
215 $(BINDIR)/runsuite.exe\ | 227 $(BINDIR)/runsuite.exe\ |
216 » $(BINDIR)/testapi.exe | 228 » $(BINDIR)/testapi.exe\ |
| 229 » $(BINDIR)/testlimits.exe |
217 | 230 |
218 ifeq ($(WITH_THREADS),yes) | 231 ifeq ($(WITH_THREADS),yes) |
219 UTILS += $(BINDIR)/testThreadsWin32.exe | 232 UTILS += $(BINDIR)/testThreadsWin32.exe |
220 endif | 233 endif |
221 ifeq ($(WITH_THREADS),ctls) | 234 ifeq ($(WITH_THREADS),ctls) |
222 UTILS += $(BINDIR)/testThreadsWin32.exe | 235 UTILS += $(BINDIR)/testThreadsWin32.exe |
223 endif | 236 endif |
224 ifeq ($(WITH_THREADS),native) | 237 ifeq ($(WITH_THREADS),native) |
225 UTILS += $(BINDIR)/testThreadsWin32.exe | 238 UTILS += $(BINDIR)/testThreadsWin32.exe |
226 endif | 239 endif |
(...skipping 16 matching lines...) Expand all Loading... |
243 cmd.exe /C "if exist $(BINDIR) rmdir /S /Q $(BINDIR)" | 256 cmd.exe /C "if exist $(BINDIR) rmdir /S /Q $(BINDIR)" |
244 cmd.exe /C "if exist depends.mingw del depends.mingw" | 257 cmd.exe /C "if exist depends.mingw del depends.mingw" |
245 | 258 |
246 distclean : clean | 259 distclean : clean |
247 cmd.exe /C "if exist config.* del config.*" | 260 cmd.exe /C "if exist config.* del config.*" |
248 cmd.exe /C "if exist Makefile del Makefile" | 261 cmd.exe /C "if exist Makefile del Makefile" |
249 | 262 |
250 rebuild : clean all | 263 rebuild : clean all |
251 | 264 |
252 install-libs : all | 265 install-libs : all |
253 » cmd.exe /C "if not exist $(INCPREFIX)\libxml mkdir $(INCPREFIX)\libxml" | 266 » cmd.exe /C "if not exist $(INCPREFIX)\libxml2 mkdir $(INCPREFIX)\libxml2
" |
| 267 » cmd.exe /C "if not exist $(INCPREFIX)\libxml2\libxml mkdir $(INCPREFIX)\
libxml2\libxml" |
254 cmd.exe /C "if not exist $(BINPREFIX) mkdir $(BINPREFIX)" | 268 cmd.exe /C "if not exist $(BINPREFIX) mkdir $(BINPREFIX)" |
255 cmd.exe /C "if not exist $(LIBPREFIX) mkdir $(LIBPREFIX)" | 269 cmd.exe /C "if not exist $(LIBPREFIX) mkdir $(LIBPREFIX)" |
256 » cmd.exe /C "copy $(XML_SRCDIR)\include\libxml\*.h $(INCPREFIX)\libxml" | 270 » cmd.exe /C "copy $(XML_SRCDIR)\include\libxml\*.h $(INCPREFIX)\libxml2\l
ibxml" |
257 cmd.exe /C "copy $(BINDIR)\$(XML_SO) $(SOPREFIX)" | 271 cmd.exe /C "copy $(BINDIR)\$(XML_SO) $(SOPREFIX)" |
258 cmd.exe /C "copy $(BINDIR)\$(XML_A) $(LIBPREFIX)" | 272 cmd.exe /C "copy $(BINDIR)\$(XML_A) $(LIBPREFIX)" |
259 cmd.exe /C "copy $(BINDIR)\$(XML_IMP) $(LIBPREFIX)" | 273 cmd.exe /C "copy $(BINDIR)\$(XML_IMP) $(LIBPREFIX)" |
260 cmd.exe /C "copy $(BINDIR)\xml*.exe $(BINPREFIX)" | 274 cmd.exe /C "copy $(BINDIR)\xml*.exe $(BINPREFIX)" |
261 | 275 |
262 install : install-libs | 276 install : install-libs |
263 cmd.exe /C "copy $(BINDIR)\*.exe $(BINPREFIX)" | 277 cmd.exe /C "copy $(BINDIR)\*.exe $(BINPREFIX)" |
264 | 278 |
265 install-dist : install-libs | 279 install-dist : install-libs |
266 cmd.exe /C "copy $(BINDIR)\xml*.exe $(BINPREFIX)" | 280 cmd.exe /C "copy $(BINDIR)\xml*.exe $(BINPREFIX)" |
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
331 $(CC) $(CFLAGS) -o $(subst .c,.o,$(UTILS_INTDIR)/$(<F)) -c $< | 345 $(CC) $(CFLAGS) -o $(subst .c,.o,$(UTILS_INTDIR)/$(<F)) -c $< |
332 $(LD) $(LDFLAGS) -o $@ $(subst .c,.o,$(UTILS_INTDIR)/$(<F)) -l$(XML_BASE
NAME) $(LIBS) | 346 $(LD) $(LDFLAGS) -o $@ $(subst .c,.o,$(UTILS_INTDIR)/$(<F)) -l$(XML_BASE
NAME) $(LIBS) |
333 endif | 347 endif |
334 | 348 |
335 # Builds xmllint and friends. Uses the implicit rule for commands. | 349 # Builds xmllint and friends. Uses the implicit rule for commands. |
336 $(UTILS) : $(UTILS_INTDIR) $(BINDIR) libxml libxmla | 350 $(UTILS) : $(UTILS_INTDIR) $(BINDIR) libxml libxmla |
337 | 351 |
338 # Source dependencies | 352 # Source dependencies |
339 #-include depends.mingw | 353 #-include depends.mingw |
340 | 354 |
OLD | NEW |