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
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
48 default
: buildlib xmlwf
/xmlwf
52 all: $(LIBRARY
) xmlwf
/xmlwf examples
/elements examples
/outline
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
65 rm -f expat_config.h config.status config.log config.cache libtool
69 rm -f expat_config.h.in configure
70 rm -f conftools
/ltconfig conftools
/ltmain.sh conftools
/libtool.m4
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
90 $(LIBTOOL
) --mode
=uninstall rm -f
$(libdir)/$(LIBRARY
)
91 rm -f
$(includedir)/$(APIHEADER
)
93 # for VPATH builds (invoked by configure)
95 @for d in lib xmlwf examples tests
; do \
96 (mkdir
$$d 2> /dev
/null ||
test 1) ; \
102 INCLUDES
= -I
$(srcdir)/lib
-I.
104 CPPFLAGS
= @CPPFLAGS@
105 CFLAGS
= @CFLAGS@
-DHAVE_EXPAT_CONFIG_H
106 VSNFLAG
= -version-info @LIBCURRENT@
:@LIBREVISION@
:@LIBAGE@
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@
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
167 $(COMPILE
) -o
$@
-c
$<
169 $(LTCOMPILE
) -o
$@
-c
$<
171 .PHONY
: buildlib
all \
172 clean distclean extraclean maintainer-clean \