Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(10)

Side by Side Diff: third_party/libxslt/win32/Makefile.msvc

Issue 2865973002: Check in the libxslt roll script. (Closed)
Patch Set: Consistent quotes. Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « third_party/libxslt/win32/Makefile.mingw ('k') | third_party/libxslt/win32/Readme.txt » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 # Makefile for libxslt, specific for Windows, MSVC and NMAKE.
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 libxslt 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 #
13 # March 2002, Igor Zlatkovic <igor@zlatkovic.com>
14
15 AUTOCONF = .\config.msvc
16 !include $(AUTOCONF)
17
18 # There should never be a need to modify anything below this line.
19 # ----------------------------------------------------------------
20
21 BASEDIR = ..
22 XSLT_SRCDIR = $(BASEDIR)\libxslt
23 EXSLT_SRCDIR = $(BASEDIR)\libexslt
24 UTILS_SRCDIR = $(BASEDIR)\xsltproc
25 BINDIR = bin.msvc
26
27 # Names of various input and output components.
28 XSLT_NAME = xslt
29 XSLT_BASENAME = lib$(XSLT_NAME)
30 XSLT_SO = $(XSLT_BASENAME).dll
31 XSLT_IMP = $(XSLT_BASENAME).lib
32 XSLT_DEF = $(XSLT_BASENAME).def
33 XSLT_A = $(XSLT_BASENAME)_a.lib
34 EXSLT_NAME = exslt
35 EXSLT_BASENAME = lib$(EXSLT_NAME)
36 EXSLT_SO = $(EXSLT_BASENAME).dll
37 EXSLT_IMP = $(EXSLT_BASENAME).lib
38 EXSLT_DEF = $(EXSLT_BASENAME).def
39 EXSLT_A = $(EXSLT_BASENAME)_a.lib
40
41 # Places where intermediate files produced by the compiler go
42 XSLT_INTDIR = int.xslt.msvc
43 XSLT_INTDIR_A = int.xslta.msvc
44 EXSLT_INTDIR = int.exslt.msvc
45 EXSLT_INTDIR_A = int.exslta.msvc
46 UTILS_INTDIR = int.utils.msvc
47
48 # The preprocessor and its options.
49 CPP = cl.exe /EP
50 CPPFLAGS = /nologo
51
52 # The compiler and its options.
53 CC = cl.exe
54 CFLAGS = /nologo /D "WIN32" /D "_WINDOWS" /D "_MBCS" /W3 $(CRUNTIME) /D "_REENTR ANT"
55 CFLAGS = $(CFLAGS) /I$(BASEDIR) /I$(XSLT_SRCDIR) /I$(INCPREFIX)
56 CFLAGS = $(CFLAGS) /D_CRT_SECURE_NO_DEPRECATE /D_CRT_NONSTDC_NO_DEPRECATE
57
58 # The linker and its options.
59 LD = link.exe
60 LDFLAGS = /nologo
61 LDFLAGS = $(LDFLAGS) /LIBPATH:$(BINDIR) /LIBPATH:$(LIBPREFIX)
62 LIBS = wsock32.lib
63
64 # The archiver and its options.
65 AR = lib.exe
66 ARFLAGS = /nologo
67
68 # Optimisation and debug symbols.
69 !if "$(DEBUG)" == "1"
70 CFLAGS = $(CFLAGS) /D "_DEBUG" /Od /Z7
71 LDFLAGS = $(LDFLAGS) /DEBUG
72 !else
73 CFLAGS = $(CFLAGS) /D "NDEBUG" /O2
74 !endif
75
76 # Libxslt object files.
77 XSLT_OBJS = $(XSLT_INTDIR)\attributes.obj\
78 $(XSLT_INTDIR)\documents.obj\
79 $(XSLT_INTDIR)\extensions.obj\
80 $(XSLT_INTDIR)\extra.obj\
81 $(XSLT_INTDIR)\functions.obj\
82 $(XSLT_INTDIR)\imports.obj\
83 $(XSLT_INTDIR)\keys.obj\
84 $(XSLT_INTDIR)\namespaces.obj\
85 $(XSLT_INTDIR)\numbers.obj\
86 $(XSLT_INTDIR)\pattern.obj\
87 $(XSLT_INTDIR)\preproc.obj\
88 $(XSLT_INTDIR)\security.obj\
89 $(XSLT_INTDIR)\templates.obj\
90 $(XSLT_INTDIR)\transform.obj\
91 $(XSLT_INTDIR)\variables.obj\
92 $(XSLT_INTDIR)\xslt.obj\
93 $(XSLT_INTDIR)\xsltlocale.obj\
94 $(XSLT_INTDIR)\xsltutils.obj\
95 $(XSLT_INTDIR)\attrvt.obj
96
97 # Static libxslt object files.
98 XSLT_OBJS_A = $(XSLT_INTDIR_A)\attributes.obj\
99 $(XSLT_INTDIR_A)\documents.obj\
100 $(XSLT_INTDIR_A)\extensions.obj\
101 $(XSLT_INTDIR_A)\extra.obj\
102 $(XSLT_INTDIR_A)\functions.obj\
103 $(XSLT_INTDIR_A)\imports.obj\
104 $(XSLT_INTDIR_A)\keys.obj\
105 $(XSLT_INTDIR_A)\namespaces.obj\
106 $(XSLT_INTDIR_A)\numbers.obj\
107 $(XSLT_INTDIR_A)\pattern.obj\
108 $(XSLT_INTDIR_A)\preproc.obj\
109 $(XSLT_INTDIR_A)\security.obj\
110 $(XSLT_INTDIR_A)\templates.obj\
111 $(XSLT_INTDIR_A)\transform.obj\
112 $(XSLT_INTDIR_A)\variables.obj\
113 $(XSLT_INTDIR_A)\xslt.obj\
114 $(XSLT_INTDIR_A)\xsltlocale.obj\
115 $(XSLT_INTDIR_A)\xsltutils.obj\
116 $(XSLT_INTDIR_A)\attrvt.obj
117
118 # Libexslt object files.
119 EXSLT_OBJS = $(EXSLT_INTDIR)\common.obj\
120 $(EXSLT_INTDIR)\crypto.obj\
121 $(EXSLT_INTDIR)\date.obj\
122 $(EXSLT_INTDIR)\exslt.obj\
123 $(EXSLT_INTDIR)\functions.obj\
124 $(EXSLT_INTDIR)\math.obj\
125 $(EXSLT_INTDIR)\saxon.obj\
126 $(EXSLT_INTDIR)\sets.obj\
127 $(EXSLT_INTDIR)\strings.obj\
128 $(EXSLT_INTDIR)\dynamic.obj
129
130 # Static libexslt object files.
131 EXSLT_OBJS_A = $(EXSLT_INTDIR_A)\common.obj\
132 $(EXSLT_INTDIR_A)\crypto.obj\
133 $(EXSLT_INTDIR_A)\date.obj\
134 $(EXSLT_INTDIR_A)\exslt.obj\
135 $(EXSLT_INTDIR_A)\functions.obj\
136 $(EXSLT_INTDIR_A)\math.obj\
137 $(EXSLT_INTDIR_A)\saxon.obj\
138 $(EXSLT_INTDIR_A)\sets.obj\
139 $(EXSLT_INTDIR_A)\strings.obj\
140 $(EXSLT_INTDIR_A)\dynamic.obj
141
142
143 # Xsltproc and friends executables.
144 UTILS = $(BINDIR)\xsltproc.exe
145
146 !if "$(VCMANIFEST)" == "1"
147 _VC_MANIFEST_EMBED_EXE= if exist $@.manifest mt.exe -nologo -manifest $@.manifes t -outputresource:$@;1
148 _VC_MANIFEST_EMBED_DLL= if exist $@.manifest mt.exe -nologo -manifest $@.manifes t -outputresource:$@;2
149 !else
150 _VC_MANIFEST_EMBED_EXE=
151 _VC_MANIFEST_EMBED_DLL=
152 !endif
153
154 all : libxslt libxslta libexslt libexslta utils
155
156 libxslt : $(BINDIR)\$(XSLT_SO)
157
158 libxslta : $(BINDIR)\$(XSLT_A)
159
160 libexslt : $(BINDIR)\$(EXSLT_SO)
161
162 libexslta : $(BINDIR)\$(EXSLT_A)
163
164 utils : $(UTILS)
165
166 clean :
167 if exist $(XSLT_INTDIR) rmdir /S /Q $(XSLT_INTDIR)
168 if exist $(XSLT_INTDIR_A) rmdir /S /Q $(XSLT_INTDIR_A)
169 if exist $(EXSLT_INTDIR) rmdir /S /Q $(EXSLT_INTDIR)
170 if exist $(EXSLT_INTDIR_A) rmdir /S /Q $(EXSLT_INTDIR_A)
171 if exist $(UTILS_INTDIR) rmdir /S /Q $(UTILS_INTDIR)
172 if exist $(BINDIR) rmdir /S /Q $(BINDIR)
173
174 rebuild : clean all
175
176 distclean : clean
177 if exist config.* del config.*
178 if exist Makefile del Makefile
179
180 install-libs : all
181 if not exist $(INCPREFIX)\$(XSLT_BASENAME) mkdir $(INCPREFIX)\$(XSLT_BAS ENAME)
182 if not exist $(INCPREFIX)\$(EXSLT_BASENAME) mkdir $(INCPREFIX)\$(EXSLT_B ASENAME)
183 if not exist $(BINPREFIX) mkdir $(BINPREFIX)
184 if not exist $(LIBPREFIX) mkdir $(LIBPREFIX)
185 copy $(XSLT_SRCDIR)\*.h $(INCPREFIX)\$(XSLT_BASENAME)
186 copy $(EXSLT_SRCDIR)\*.h $(INCPREFIX)\$(EXSLT_BASENAME)
187 copy $(BINDIR)\$(XSLT_SO) $(SOPREFIX)
188 copy $(BINDIR)\$(XSLT_A) $(LIBPREFIX)
189 copy $(BINDIR)\$(XSLT_IMP) $(LIBPREFIX)
190 copy $(BINDIR)\$(EXSLT_SO) $(SOPREFIX)
191 copy $(BINDIR)\$(EXSLT_A) $(LIBPREFIX)
192 copy $(BINDIR)\$(EXSLT_IMP) $(LIBPREFIX)
193
194 install : install-libs
195 copy $(BINDIR)\*.exe $(BINPREFIX)
196 -copy $(BINDIR)\*.pdb $(BINPREFIX)
197
198 install-dist : install
199
200 # This is a target for me, to make a binary distribution. Not for the public use ,
201 # keep your hands off :-)
202 BDVERSION = $(LIBXSLT_MAJOR_VERSION).$(LIBXSLT_MINOR_VERSION).$(LIBXSLT_MICRO_VE RSION)
203 BDPREFIX = $(XSLT_BASENAME)-$(BDVERSION).win32
204 bindist : all
205 $(MAKE) /nologo PREFIX=$(BDPREFIX) SOPREFIX=$(BDPREFIX)\bin install-dist
206 cscript //NoLogo configure.js genreadme $(XSLT_BASENAME) $(BDVERSION) $( BDPREFIX)\readme.txt
207
208 # Makes the compiler output directory.
209 $(BINDIR) :
210 if not exist $(BINDIR) mkdir $(BINDIR)
211
212
213 # Makes the libxslt intermediate directory.
214 $(XSLT_INTDIR) :
215 if not exist $(XSLT_INTDIR) mkdir $(XSLT_INTDIR)
216
217 # Makes the static libxslt intermediate directory.
218 $(XSLT_INTDIR_A) :
219 if not exist $(XSLT_INTDIR_A) mkdir $(XSLT_INTDIR_A)
220
221 # An implicit rule for libxslt compilation.
222 {$(XSLT_SRCDIR)}.c{$(XSLT_INTDIR)}.obj::
223 $(CC) $(CFLAGS) /Fo$(XSLT_INTDIR)\ /c $<
224
225 # An implicit rule for static libxslt compilation.
226 {$(XSLT_SRCDIR)}.c{$(XSLT_INTDIR_A)}.obj::
227 $(CC) $(CFLAGS) /D "LIBXML_STATIC" /D "LIBXSLT_STATIC" \
228 /Fo$(XSLT_INTDIR_A)\ /c $<
229
230 # Compiles libxslt source. Uses the implicit rule for commands.
231 $(XSLT_OBJS) : $(XSLT_INTDIR)
232
233 # Compiles static libxslt source. Uses the implicit rule for commands.
234 $(XSLT_OBJS_A) : $(XSLT_INTDIR_A)
235
236 # Creates the export definition file (DEF) for libxslt.
237 $(XSLT_INTDIR)\$(XSLT_DEF) : $(XSLT_INTDIR) $(XSLT_DEF).src
238 $(CPP) $(CPPFLAGS) $(XSLT_DEF).src > $(XSLT_INTDIR)\$(XSLT_DEF)
239
240 # Creates the libxslt shared object.
241 $(BINDIR)\$(XSLT_SO) : $(BINDIR) $(XSLT_OBJS) $(XSLT_INTDIR)\$(XSLT_DEF)
242 $(LD) $(LDFLAGS) /DLL \
243 /VERSION:$(LIBXSLT_MAJOR_VERSION).$(LIBXSLT_MINOR_VERSION) \
244 /IMPLIB:$(BINDIR)\$(XSLT_IMP) /OUT:$(BINDIR)\$(XSLT_SO) \
245 $(XSLT_OBJS) $(LIBS) libxml2.lib
246 @$(_VC_MANIFEST_EMBED_DLL)
247
248 #$(BINDIR)\$(XSLT_SO) : $(BINDIR) $(XSLT_OBJS) $(XSLT_INTDIR)\$(XSLT_DEF)
249 # $(LD) $(LDFLAGS) /DLL /DEF:$(XSLT_INTDIR)\$(XSLT_DEF) \
250 # /VERSION:$(LIBXSLT_MAJOR_VERSION).$(LIBXSLT_MINOR_VERSION) \
251 # /IMPLIB:$(BINDIR)\$(XSLT_IMP) /OUT:$(BINDIR)\$(XSLT_SO) \
252 # $(XSLT_OBJS) $(LIBS) libxml2.lib
253
254 # Creates the libxslt archive.
255 $(BINDIR)\$(XSLT_A) : $(BINDIR) $(XSLT_OBJS_A)
256 $(AR) $(ARFLAGS) /OUT:$(BINDIR)\$(XSLT_A) $(XSLT_OBJS_A)
257
258
259 # Creates the libexslt intermediate directory.
260 $(EXSLT_INTDIR) :
261 if not exist $(EXSLT_INTDIR) mkdir $(EXSLT_INTDIR)
262
263 # Creates the static libexslt intermediate directory.
264 $(EXSLT_INTDIR_A) :
265 if not exist $(EXSLT_INTDIR_A) mkdir $(EXSLT_INTDIR_A)
266
267 # An implicit rule for libexslt compilation.
268 {$(EXSLT_SRCDIR)}.c{$(EXSLT_INTDIR)}.obj::
269 $(CC) /I$(EXSLT_SRCDIR) $(CFLAGS) /Fo$(EXSLT_INTDIR)\ /c $<
270
271 # An implicit rule for static libexslt compilation.
272 {$(EXSLT_SRCDIR)}.c{$(EXSLT_INTDIR_A)}.obj::
273 $(CC) /D "LIBXML_STATIC" /D "LIBXSLT_STATIC" /D "LIBEXSLT_STATIC" \
274 /I$(EXSLT_SRCDIR) $(CFLAGS) /Fo$(EXSLT_INTDIR_A)\ /c $<
275
276 # Compiles libxslt source. Uses the implicit rule for commands.
277 $(EXSLT_OBJS) : $(EXSLT_INTDIR)
278
279 # Compiles libxslt source. Uses the implicit rule for commands.
280 $(EXSLT_OBJS_A) : $(EXSLT_INTDIR_A)
281
282 # Creates the export definition file (DEF) for libxslt.
283 $(EXSLT_INTDIR)\$(EXSLT_DEF) : $(EXSLT_INTDIR) $(EXSLT_DEF).src
284 $(CPP) $(CPPFLAGS) $(EXSLT_DEF).src > $(EXSLT_INTDIR)\$(EXSLT_DEF)
285
286 # Creates the libexslt shared object.
287 $(BINDIR)\$(EXSLT_SO) : $(BINDIR) $(EXSLT_OBJS) $(EXSLT_INTDIR)\$(EXSLT_DEF) lib xslt
288 $(LD) $(LDFLAGS) /DLL \
289 /VERSION:$(LIBEXSLT_MAJOR_VERSION).$(LIBEXSLT_MINOR_VERSION) \
290 /IMPLIB:$(BINDIR)\$(EXSLT_IMP) /OUT:$(BINDIR)\$(EXSLT_SO) \
291 $(EXSLT_OBJS) $(XSLT_IMP) $(LIBS) libxml2.lib
292 @$(_VC_MANIFEST_EMBED_DLL)
293
294 #$(BINDIR)\$(EXSLT_SO) : $(BINDIR) $(EXSLT_OBJS) $(EXSLT_INTDIR)\$(EXSLT_DEF) li bxslt
295 # $(LD) $(LDFLAGS) /DLL /DEF:$(EXSLT_INTDIR)\$(EXSLT_DEF) \
296 # /VERSION:$(LIBEXSLT_MAJOR_VERSION).$(LIBEXSLT_MINOR_VERSION) \
297 # /IMPLIB:$(BINDIR)\$(EXSLT_IMP) /OUT:$(BINDIR)\$(EXSLT_SO) \
298 # $(EXSLT_OBJS) $(XSLT_IMP) $(LIBS) libxml2.lib
299
300 # Creates the libexslt archive.
301 $(BINDIR)\$(EXSLT_A) : $(BINDIR) $(EXSLT_OBJS_A) libxslta
302 $(AR) $(ARFLAGS) /OUT:$(BINDIR)\$(EXSLT_A) $(EXSLT_OBJS_A)
303
304
305 # Creates the utils intermediate directory.
306 $(UTILS_INTDIR) :
307 if not exist $(UTILS_INTDIR) mkdir $(UTILS_INTDIR)
308
309 # An implicit rule for xsltproc and friends.
310 APPLIBS = $(LIBS)
311 !if "$(STATIC)" == "1"
312 APPLIBS = $(LIBS) libxml2_a.lib
313 !if "$(WITH_ICONV)" == "1"
314 APPLIBS = $(APPLIBS) iconv.lib
315 !endif
316 !if "$(WITH_ZLIB)" == "1"
317 APPLIBS = $(APPLIBS) zlib.lib
318 !endif
319 {$(UTILS_SRCDIR)}.c{$(BINDIR)}.exe:
320 $(CC) /D "LIBXML_STATIC" /D "LIBXSLT_STATIC" /D "LIBEXSLT_STATIC" \
321 $(CFLAGS) /Fo$(UTILS_INTDIR)\ /c $<
322 $(LD) $(LDFLAGS) /OUT:$@ $(XSLT_A) $(EXSLT_A) $(APPLIBS) $(UTILS_INTDIR) \$(<B).obj
323 @$(_VC_MANIFEST_EMBED_EXE)
324 !else
325 APPLIBS = $(LIBS) libxml2.lib
326 {$(UTILS_SRCDIR)}.c{$(BINDIR)}.exe:
327 $(CC) $(CFLAGS) /Fo$(UTILS_INTDIR)\ /c $<
328 $(LD) $(LDFLAGS) /OUT:$@ $(XSLT_IMP) $(EXSLT_IMP) $(APPLIBS) $(UTILS_INT DIR)\$(<B).obj
329 @$(_VC_MANIFEST_EMBED_EXE)
330 !endif
331
332 # Builds xsltproc and friends. Uses the implicit rule for commands.
333 $(UTILS) : $(UTILS_INTDIR) $(BINDIR) libxslt libxslta libexslt libexslta
334
335 # plugins only work with non-static builds currently.
336 !if "$(STATIC)" == "0"
337
338 TESTPLUGIN_SRCDIR = $(BASEDIR)\tests\plugins
339 TESTPLUGIN_DIR = $(TESTPLUGIN_SRCDIR)\plugin
340 TESTPLUGIN_SO = xmlsoft_org_xslt_testplugin.dll
341 TESTPLUGIN_OBJS = $(TESTPLUGIN_DIR)\testplugin.obj
342
343 testplugin:
344 if exist $(TESTPLUGIN_DIR) rmdir /S /Q $(TESTPLUGIN_DIR)
345 $(MAKE) $(TESTPLUGIN_DIR)\$(TESTPLUGIN_SO)
346
347 $(TESTPLUGIN_DIR) :
348 if not exist $(TESTPLUGIN_DIR) mkdir $(TESTPLUGIN_DIR)
349
350 {$(TESTPLUGIN_SRCDIR)}.c{$(TESTPLUGIN_DIR)}.obj::
351 $(CC) $(CFLAGS) /Fo$(TESTPLUGIN_DIR)\ /c $<
352
353 # Creates the testplugin archive.
354 $(TESTPLUGIN_DIR)\$(TESTPLUGIN_SO) : $(TESTPLUGIN_DIR) $(TESTPLUGIN_OBJS) libxsl t
355 $(LD) $(LDFLAGS) /DLL $(XSLT_IMP) $(APPLIBS) $(LIBS)\
356 /OUT:$(TESTPLUGIN_DIR)\$(TESTPLUGIN_SO) \
357 $(TESTPLUGIN_OBJS)
358
359 !else
360
361 testplugin:
362 @echo "plugins are disabled with static=yes"
363
364 !endif
365
366
367 # Source dependences should be autogenerated somehow here, but how to
368 # do it? I have no clue.
369
OLDNEW
« no previous file with comments | « third_party/libxslt/win32/Makefile.mingw ('k') | third_party/libxslt/win32/Readme.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698