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.
24 top_srcdir
= @top_srcdir@
28 exec_prefix = @
exec_prefix@
32 includedir = @
includedir@
33 man1dir = @
mandir@
/man1
34 pkgconfigdir
= $(libdir)/pkgconfig
40 INSTALL_PROGRAM
= @INSTALL_PROGRAM@
41 INSTALL_DATA
= @INSTALL_DATA@
42 mkinstalldirs
= $(SHELL
) $(top_srcdir
)/conftools
/mkinstalldirs
45 MANFILE
= $(srcdir)/doc
/xmlwf
.1
46 APIHEADER
= $(srcdir)/lib
/expat.h
$(srcdir)/lib
/expat_external.h expat_config.h
49 DESTDIR
= $(INSTALL_ROOT
)
51 ifeq (@ENABLE_TOOLS@
,y
)
55 default
: buildlib
$(XMLWF
)
57 buildlib
: $(LIBRARY
) expat.
pc
59 all: $(LIBRARY
) expat.
pc $(XMLWF
) examples
/elements examples
/outline
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
73 rm -f expat_config.h config.status config.log config.cache libtool
74 rm -f Makefile expat.
pc
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
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)
93 @echo
"Not installing tools"
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
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)
115 @for d in lib xmlwf examples tests
; do \
116 (mkdir
$$d 2> /dev
/null ||
test 1) ; \
123 INCLUDES
= -I
$(srcdir)/lib
-I.
125 CPPFLAGS
= @CPPFLAGS@
-DHAVE_EXPAT_CONFIG_H
127 CXXFLAGS
= @CXXFLAGS@
128 VSNFLAG
= -version-info @LIBCURRENT@
:@LIBREVISION@
:@LIBAGE@
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
)
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
194 .SUFFIXES
: .c .
cpp .lo .o
197 $(CXXCOMPILE
) -o
$@
-c
$<
199 $(COMPILE
) -o
$@
-c
$<
201 $(LTCOMPILE
) -o
$@
-c
$<
203 .PHONY
: buildlib
all \
204 clean distclean extraclean maintainer-clean \