Fix for bug #1065040. Improved const correctness.
[mirror-ossqm-expat.git] / Makefile.in
bloba2b2d5359457bd32f005d7fd71fbc7c9c7a64b7e
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
35 top_builddir = .
38 INSTALL = @INSTALL@
39 INSTALL_PROGRAM = @INSTALL_PROGRAM@
40 INSTALL_DATA = @INSTALL_DATA@
41 mkinstalldirs = $(SHELL) $(top_srcdir)/conftools/mkinstalldirs
43 MANFILE = $(srcdir)/doc/xmlwf.1
44 APIHEADER = $(srcdir)/lib/expat.h $(srcdir)/lib/expat_external.h
45 LIBRARY = libexpat.la
48 default: buildlib xmlwf/xmlwf
50 buildlib: $(LIBRARY)
52 all: $(LIBRARY) xmlwf/xmlwf examples/elements examples/outline
54 clean:
55 cd lib && rm -f $(LIBRARY) *.o *.lo && rm -rf .libs _libs
56 cd xmlwf && rm -f xmlwf *.o *.lo && rm -rf .libs _libs
57 cd examples && rm -f elements outline *.o *.lo && rm -rf .libs _libs
58 cd tests && rm -rf .libs runtests runtests.o chardata.o
59 rm -rf .libs libexpat.la
60 rm -f examples/core tests/core xmlwf/core
62 clobber: clean
64 distclean: clean
65 rm -f expat_config.h config.status config.log config.cache libtool
66 rm -f Makefile
68 extraclean: distclean
69 rm -f expat_config.h.in configure
70 rm -f conftools/ltconfig conftools/ltmain.sh conftools/libtool.m4
72 check: tests/runtests
73 tests/runtests
75 install: xmlwf/xmlwf installlib
76 $(mkinstalldirs) $(bindir) $(man1dir)
77 $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) xmlwf/xmlwf $(bindir)/xmlwf
78 $(INSTALL_DATA) $(MANFILE) $(man1dir)
80 installlib: $(LIBRARY) $(APIHEADER)
81 $(mkinstalldirs) $(libdir) $(includedir)
82 $(LIBTOOL) --mode=install $(INSTALL) $(LIBRARY) $(libdir)/$(LIBRARY)
83 for FN in $(APIHEADER) ; do $(INSTALL_DATA) $$FN $(includedir) ; done
85 uninstall: uninstalllib
86 $(LIBTOOL) --mode=uninstall rm -f $(bindir)/xmlwf
87 rm -f $(man1dir)/xmlwf.1
89 uninstalllib:
90 $(LIBTOOL) --mode=uninstall rm -f $(libdir)/$(LIBRARY)
91 rm -f $(includedir)/$(APIHEADER)
93 # for VPATH builds (invoked by configure)
94 mkdir-init:
95 @for d in lib xmlwf examples tests ; do \
96 (mkdir $$d 2> /dev/null || test 1) ; \
97 done
99 CC = @CC@
100 LIBTOOL = @LIBTOOL@
102 INCLUDES = -I$(srcdir)/lib -I.
103 LDFLAGS = @LDFLAGS@
104 CPPFLAGS = @CPPFLAGS@
105 CFLAGS = @CFLAGS@ -DHAVE_EXPAT_CONFIG_H
106 VSNFLAG = -version-info @LIBCURRENT@:@LIBREVISION@:@LIBAGE@
108 ### autoconf this?
109 LTFLAGS = --silent
111 COMPILE = $(CC) $(CFLAGS) $(DEFS) $(CPPFLAGS) $(INCLUDES)
112 LTCOMPILE = $(LIBTOOL) $(LTFLAGS) --mode=compile $(COMPILE)
113 LINK_LIB = $(LIBTOOL) $(LTFLAGS) --mode=link $(COMPILE) -no-undefined $(VSNFLAG) -rpath $(libdir) $(LDFLAGS) -o $@
114 LINK_EXE = $(LIBTOOL) $(LTFLAGS) --mode=link $(COMPILE) $(LDFLAGS) -o $@
116 LIB_OBJS = lib/xmlparse.lo lib/xmltok.lo lib/xmlrole.lo
117 $(LIBRARY): $(LIB_OBJS)
118 $(LINK_LIB) $(LIB_OBJS)
120 lib/xmlparse.lo: lib/xmlparse.c lib/expat.h lib/xmlrole.h lib/xmltok.h \
121 $(top_builddir)/expat_config.h lib/expat_external.h lib/internal.h
123 lib/xmlrole.lo: lib/xmlrole.c lib/ascii.h lib/xmlrole.h \
124 $(top_builddir)/expat_config.h lib/expat_external.h lib/internal.h
126 lib/xmltok.lo: lib/xmltok.c lib/xmltok_impl.c lib/xmltok_ns.c \
127 lib/ascii.h lib/asciitab.h lib/iasciitab.h lib/latin1tab.h \
128 lib/nametab.h lib/utf8tab.h lib/xmltok.h lib/xmltok_impl.h \
129 $(top_builddir)/expat_config.h lib/expat_external.h lib/internal.h
132 XMLWF_OBJS = xmlwf/xmlwf.o xmlwf/xmlfile.o xmlwf/codepage.o xmlwf/@FILEMAP@.o
133 xmlwf/xmlwf.o: xmlwf/xmlwf.c
134 xmlwf/xmlfile.o: xmlwf/xmlfile.c
135 xmlwf/codepage.o: xmlwf/codepage.c
136 xmlwf/@FILEMAP@.o: xmlwf/@FILEMAP@.c
137 xmlwf/xmlwf: $(XMLWF_OBJS) $(LIBRARY)
138 $(LINK_EXE) $(XMLWF_OBJS) $(LIBRARY)
140 examples/elements.o: examples/elements.c
141 examples/elements: examples/elements.o $(LIBRARY)
142 $(LINK_EXE) $< $(LIBRARY)
144 examples/outline.o: examples/outline.c
145 examples/outline: examples/outline.o $(LIBRARY)
146 $(LINK_EXE) $< $(LIBRARY)
148 tests/chardata.o: tests/chardata.c tests/chardata.h
149 tests/minicheck.o: tests/minicheck.c tests/minicheck.h
150 tests/runtests.o: tests/runtests.c tests/chardata.h
151 tests/runtests: tests/runtests.o tests/chardata.o @MINICHECK_OBJECT@ $(LIBRARY)
152 $(LINK_EXE) $^ @CHECK_LIBRARY@
154 tests/xmlts.zip:
155 wget --output-document=tests/xmlts.zip \
156 http://www.w3.org/XML/Test/xmlts20020606.zip
158 tests/XML-Test-Suite: tests/xmlts.zip
159 cd tests && unzip -q xmlts.zip
161 run-xmltest: xmlwf/xmlwf tests/XML-Test-Suite
162 tests/xmltest.sh
164 .SUFFIXES: .c .lo .o
166 .c.o:
167 $(COMPILE) -o $@ -c $<
168 .c.lo:
169 $(LTCOMPILE) -o $@ -c $<
171 .PHONY: buildlib all \
172 clean distclean extraclean maintainer-clean \
173 dist distdir \
174 install uninstall