(metux) gitignore update
[mirror-ossqm-expat.git] / Makefile.in
blobd1207ab187b51b3e66cb12e90011cdae39c2d605
1 ################################################################
2 # Process this file with top-level configure script to produce Makefile
4 # Copyright 2000 Clark Cooper
6 # This file is part of EXPAT.
8 # EXPAT is free software; you can redistribute it and/or modify it
9 # under the terms of the License (based on the MIT/X license) contained
10 # in the file COPYING that comes with this distribution.
12 # EXPAT IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
13 # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
14 # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
15 # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
16 # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
17 # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
18 # SOFTWARE OR THE USE OR OTHER DEALINGS IN EXPAT.
21 SHELL = @SHELL@
23 srcdir = @srcdir@
24 top_srcdir = @top_srcdir@
25 VPATH = @srcdir@
27 prefix = @prefix@
28 exec_prefix = @exec_prefix@
30 bindir = @bindir@
31 libdir = @libdir@
32 includedir = @includedir@
33 man1dir = @mandir@/man1
34 pkgconfigdir = $(libdir)/pkgconfig
36 top_builddir = .
39 INSTALL = @INSTALL@
40 INSTALL_PROGRAM = @INSTALL_PROGRAM@
41 INSTALL_DATA = @INSTALL_DATA@
42 mkinstalldirs = $(SHELL) $(top_srcdir)/conftools/mkinstalldirs
43 STRIP = @STRIP@
45 MANFILE = $(srcdir)/doc/xmlwf.1
46 APIHEADER = $(srcdir)/lib/expat.h $(srcdir)/lib/expat_external.h expat_config.h
47 LIBRARY = libexpat.la
49 DESTDIR = $(INSTALL_ROOT)
51 ifeq (@ENABLE_TOOLS@,y)
52 XMLWF=xmlwf/xmlwf
53 endif
55 default: buildlib $(XMLWF)
57 buildlib: $(LIBRARY) expat.pc
59 all: $(LIBRARY) expat.pc $(XMLWF) examples/elements examples/outline
61 clean:
62 cd lib && rm -f $(LIBRARY) *.o *.lo && rm -rf .libs _libs
63 cd xmlwf && rm -f xmlwf *.o *.lo && rm -rf .libs _libs
64 cd examples && rm -f elements outline *.o *.lo && rm -rf .libs _libs
65 cd tests && rm -rf .libs runtests runtests.o runtestspp runtestspp.o
66 cd tests && rm -f chardata.o minicheck.o
67 rm -rf .libs libexpat.la
68 rm -f examples/core tests/core xmlwf/core
70 clobber: clean
72 distclean: clean
73 rm -f expat_config.h config.status config.log config.cache libtool
74 rm -f Makefile expat.pc
76 extraclean: distclean
77 rm -f expat_config.h.in configure
78 rm -f conftools/ltconfig conftools/ltmain.sh conftools/libtool.m4
80 check: tests/runtests tests/runtestspp
81 tests/runtests
82 tests/runtestspp
84 install: installlib installtools
86 ifeq (@ENABLE_TOOLS@,y)
87 installtools: $(XMLWF)
88 $(mkinstalldirs) $(DESTDIR)$(bindir) $(DESTDIR)$(man1dir)
89 $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) --strip-program=$(STRIP) -s xmlwf/xmlwf $(DESTDIR)$(bindir)/xmlwf
90 $(INSTALL_DATA) $(MANFILE) $(DESTDIR)$(man1dir)
91 else
92 installtools:
93 @echo "Not installing tools"
94 endif
96 installlib: $(LIBRARY) $(APIHEADER) expat.pc
97 $(mkinstalldirs) $(DESTDIR)$(libdir) $(DESTDIR)$(includedir) $(DESTDIR)$(pkgconfigdir)
98 $(LIBTOOL) --mode=install $(INSTALL) $(LIBRARY) $(DESTDIR)$(libdir)/$(LIBRARY)
99 chmod ugo-x $(DESTDIR)$(libdir)/$(LIBRARY)
100 for FN in $(APIHEADER) ; do $(INSTALL_DATA) $$FN $(DESTDIR)$(includedir) ; done
101 $(INSTALL_DATA) expat.pc $(DESTDIR)$(pkgconfigdir)/expat.pc
103 uninstall: uninstalllib
104 $(LIBTOOL) --mode=uninstall rm -f $(DESTDIR)$(bindir)/xmlwf
105 rm -f $(DESTDIR)$(man1dir)/xmlwf.1
107 uninstalllib:
108 $(LIBTOOL) --mode=uninstall rm -f $(DESTDIR)$(libdir)/$(LIBRARY)
109 rm -f $(DESTDIR)$(includedir)/expat.h
110 rm -f $(DESTDIR)$(includedir)/expat_external.h
111 rm -f $(DESTDIR)$(pkgconfigdir)/expat.pc
113 # for VPATH builds (invoked by configure)
114 mkdir-init:
115 @for d in lib xmlwf examples tests ; do \
116 (mkdir $$d 2> /dev/null || test 1) ; \
117 done
119 CC = @CC@
120 CXX = @CXX@
121 LIBTOOL = @LIBTOOL@
123 INCLUDES = -I$(srcdir)/lib -I.
124 LDFLAGS = @LDFLAGS@
125 CPPFLAGS = @CPPFLAGS@ -DHAVE_EXPAT_CONFIG_H
126 CFLAGS = @CFLAGS@
127 CXXFLAGS = @CXXFLAGS@
128 VSNFLAG = -version-info @LIBCURRENT@:@LIBREVISION@:@LIBAGE@
130 ### autoconf this?
131 LTFLAGS = --silent
133 COMPILE = $(CC) $(INCLUDES) $(CFLAGS) $(DEFS) $(CPPFLAGS)
134 CXXCOMPILE = $(CXX) $(INCLUDES) $(CXXFLAGS) $(DEFS) $(CPPFLAGS)
135 LTCOMPILE = $(LIBTOOL) $(LTFLAGS) --mode=compile $(COMPILE)
136 LINK_LIB = $(LIBTOOL) $(LTFLAGS) --mode=link $(COMPILE) -no-undefined $(VSNFLAG) -rpath $(libdir) $(LDFLAGS) -o $@
137 LINK_EXE = $(LIBTOOL) $(LTFLAGS) --mode=link $(COMPILE) $(LDFLAGS) -o $@
138 LINK_CXX_EXE = $(LIBTOOL) $(LTFLAGS) --mode=link $(CXXCOMPILE) $(LDFLAGS) -o $@
140 LIB_OBJS = lib/xmlparse.lo lib/xmltok.lo lib/xmlrole.lo
141 $(LIBRARY): $(LIB_OBJS)
142 $(LINK_LIB) $(LIB_OBJS)
144 expat.pc: $(top_builddir)/config.status
145 cd $(top_builddir) && $(SHELL) ./config.status $@
147 lib/xmlparse.lo: lib/xmlparse.c lib/expat.h lib/xmlrole.h lib/xmltok.h \
148 $(top_builddir)/expat_config.h lib/expat_external.h lib/internal.h
150 lib/xmlrole.lo: lib/xmlrole.c lib/ascii.h lib/xmlrole.h \
151 $(top_builddir)/expat_config.h lib/expat_external.h lib/internal.h
153 lib/xmltok.lo: lib/xmltok.c lib/xmltok_impl.c lib/xmltok_ns.c \
154 lib/ascii.h lib/asciitab.h lib/iasciitab.h lib/latin1tab.h \
155 lib/nametab.h lib/utf8tab.h lib/xmltok.h lib/xmltok_impl.h \
156 $(top_builddir)/expat_config.h lib/expat_external.h lib/internal.h
159 XMLWF_OBJS = xmlwf/xmlwf.o xmlwf/xmlfile.o xmlwf/codepage.o xmlwf/@FILEMAP@.o
160 xmlwf/xmlwf.o: xmlwf/xmlwf.c
161 xmlwf/xmlfile.o: xmlwf/xmlfile.c
162 xmlwf/codepage.o: xmlwf/codepage.c
163 xmlwf/@FILEMAP@.o: xmlwf/@FILEMAP@.c
164 xmlwf/xmlwf: $(XMLWF_OBJS) $(LIBRARY)
165 $(LINK_EXE) $(XMLWF_OBJS) $(LIBRARY)
167 examples/elements.o: examples/elements.c
168 examples/elements: examples/elements.o $(LIBRARY)
169 $(LINK_EXE) $< $(LIBRARY)
171 examples/outline.o: examples/outline.c
172 examples/outline: examples/outline.o $(LIBRARY)
173 $(LINK_EXE) $< $(LIBRARY)
175 tests/chardata.o: tests/chardata.c tests/chardata.h
176 tests/minicheck.o: tests/minicheck.c tests/minicheck.h
177 tests/runtests.o: tests/runtests.c tests/chardata.h
178 tests/runtests: tests/runtests.o tests/chardata.o tests/minicheck.o $(LIBRARY)
179 $(LINK_EXE) tests/runtests.o tests/chardata.o tests/minicheck.o $(LIBRARY)
180 tests/runtestspp.o: tests/runtestspp.cpp tests/runtests.c tests/chardata.h
181 tests/runtestspp: tests/runtestspp.o tests/chardata.o tests/minicheck.o $(LIBRARY)
182 $(LINK_CXX_EXE) tests/runtestspp.o tests/chardata.o tests/minicheck.o $(LIBRARY)
184 tests/xmlts.zip:
185 wget --output-document=tests/xmlts.zip \
186 http://www.w3.org/XML/Test/xmlts20020606.zip
188 tests/XML-Test-Suite: tests/xmlts.zip
189 cd tests && unzip -q xmlts.zip
191 run-xmltest: xmlwf/xmlwf tests/XML-Test-Suite
192 tests/xmltest.sh
194 .SUFFIXES: .c .cpp .lo .o
196 .cpp.o:
197 $(CXXCOMPILE) -o $@ -c $<
198 .c.o:
199 $(COMPILE) -o $@ -c $<
200 .c.lo:
201 $(LTCOMPILE) -o $@ -c $<
203 .PHONY: buildlib all \
204 clean distclean extraclean maintainer-clean \
205 dist distdir \
206 install uninstall