2002-10-02 07:16:04 +00:00
|
|
|
################################################################
|
|
|
|
# Process this file with top-level configure script to produce Makefile
|
|
|
|
#
|
|
|
|
# Copyright 2000 Clark Cooper
|
|
|
|
#
|
|
|
|
# This file is part of EXPAT.
|
|
|
|
#
|
|
|
|
# EXPAT is free software; you can redistribute it and/or modify it
|
|
|
|
# under the terms of the License (based on the MIT/X license) contained
|
|
|
|
# in the file COPYING that comes with this distribution.
|
|
|
|
#
|
|
|
|
# EXPAT IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
|
|
|
# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
|
|
|
# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
|
|
|
# IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
|
|
|
# CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
|
|
|
# TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
|
|
|
# SOFTWARE OR THE USE OR OTHER DEALINGS IN EXPAT.
|
|
|
|
#
|
|
|
|
|
|
|
|
SHELL = @SHELL@
|
|
|
|
|
|
|
|
srcdir = @srcdir@
|
|
|
|
top_srcdir = @top_srcdir@
|
|
|
|
VPATH = @srcdir@
|
|
|
|
|
|
|
|
prefix = @prefix@
|
|
|
|
exec_prefix = @exec_prefix@
|
|
|
|
|
|
|
|
bindir = @bindir@
|
|
|
|
libdir = @libdir@
|
|
|
|
includedir = @includedir@
|
2008-05-08 13:51:16 +00:00
|
|
|
man1dir = @mandir@/man1
|
2013-02-26 00:43:01 +00:00
|
|
|
pkgconfigdir = $(libdir)/pkgconfig
|
2002-10-02 07:16:04 +00:00
|
|
|
|
|
|
|
top_builddir = .
|
|
|
|
|
|
|
|
|
|
|
|
INSTALL = @INSTALL@
|
|
|
|
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
|
|
|
INSTALL_DATA = @INSTALL_DATA@
|
|
|
|
mkinstalldirs = $(SHELL) $(top_srcdir)/conftools/mkinstalldirs
|
|
|
|
|
|
|
|
MANFILE = $(srcdir)/doc/xmlwf.1
|
2008-05-08 13:51:16 +00:00
|
|
|
APIHEADER = $(srcdir)/lib/expat.h $(srcdir)/lib/expat_external.h
|
2002-10-02 07:16:04 +00:00
|
|
|
LIBRARY = libexpat.la
|
|
|
|
|
2008-05-08 13:51:16 +00:00
|
|
|
DESTDIR = $(INSTALL_ROOT)
|
2002-10-02 07:16:04 +00:00
|
|
|
|
2013-02-26 00:43:01 +00:00
|
|
|
default: buildlib xmlwf/xmlwf@EXEEXT@
|
2002-10-02 07:16:04 +00:00
|
|
|
|
2013-02-26 00:43:01 +00:00
|
|
|
buildlib: $(LIBRARY) expat.pc
|
2002-10-02 07:16:04 +00:00
|
|
|
|
2013-02-26 00:43:01 +00:00
|
|
|
all: $(LIBRARY) expat.pc xmlwf/xmlwf@EXEEXT@ examples/elements examples/outline
|
2002-10-02 07:16:04 +00:00
|
|
|
|
|
|
|
clean:
|
2013-02-26 00:43:01 +00:00
|
|
|
cd lib && rm -f $(LIBRARY) *.@OBJEXT@ *.lo && rm -rf .libs _libs
|
|
|
|
cd xmlwf && rm -f xmlwf *.@OBJEXT@ *.lo && rm -rf .libs _libs
|
|
|
|
cd examples && rm -f elements outline *.@OBJEXT@ *.lo && rm -rf .libs _libs
|
|
|
|
cd tests && rm -rf .libs runtests runtests.@OBJEXT@ runtestspp runtestspp.@OBJEXT@
|
|
|
|
cd tests && rm -f chardata.@OBJEXT@ minicheck.@OBJEXT@
|
2002-10-02 07:16:04 +00:00
|
|
|
rm -rf .libs libexpat.la
|
2008-05-08 13:51:16 +00:00
|
|
|
rm -f examples/core tests/core xmlwf/core
|
|
|
|
|
|
|
|
clobber: clean
|
2002-10-02 07:16:04 +00:00
|
|
|
|
|
|
|
distclean: clean
|
|
|
|
rm -f expat_config.h config.status config.log config.cache libtool
|
2013-02-26 00:43:01 +00:00
|
|
|
rm -f Makefile expat.pc
|
2002-10-02 07:16:04 +00:00
|
|
|
|
|
|
|
extraclean: distclean
|
|
|
|
rm -f expat_config.h.in configure
|
2013-02-26 00:43:01 +00:00
|
|
|
rm -f aclocal.m4 m4/*
|
|
|
|
rm -f conftools/ltmain.sh conftools/install-sh conftools/config.guess conftools/config.sub
|
2002-10-02 07:16:04 +00:00
|
|
|
|
2008-05-08 13:51:16 +00:00
|
|
|
check: tests/runtests tests/runtestspp
|
2002-10-02 07:16:04 +00:00
|
|
|
tests/runtests
|
2008-05-08 13:51:16 +00:00
|
|
|
tests/runtestspp
|
2002-10-02 07:16:04 +00:00
|
|
|
|
2013-02-26 00:43:01 +00:00
|
|
|
install: xmlwf/xmlwf@EXEEXT@ installlib
|
2008-05-08 13:51:16 +00:00
|
|
|
$(mkinstalldirs) $(DESTDIR)$(bindir) $(DESTDIR)$(man1dir)
|
2013-02-26 00:43:01 +00:00
|
|
|
$(LIBTOOL) --mode=install $(INSTALL_PROGRAM) xmlwf/xmlwf@EXEEXT@ $(DESTDIR)$(bindir)/xmlwf
|
2008-05-08 13:51:16 +00:00
|
|
|
$(INSTALL_DATA) $(MANFILE) $(DESTDIR)$(man1dir)
|
2002-10-02 07:16:04 +00:00
|
|
|
|
2013-02-26 00:43:01 +00:00
|
|
|
installlib: $(LIBRARY) $(APIHEADER) expat.pc
|
|
|
|
$(mkinstalldirs) $(DESTDIR)$(libdir) $(DESTDIR)$(includedir) $(DESTDIR)$(pkgconfigdir)
|
2008-05-08 13:51:16 +00:00
|
|
|
$(LIBTOOL) --mode=install $(INSTALL) $(LIBRARY) $(DESTDIR)$(libdir)/$(LIBRARY)
|
|
|
|
for FN in $(APIHEADER) ; do $(INSTALL_DATA) $$FN $(DESTDIR)$(includedir) ; done
|
2013-02-26 00:43:01 +00:00
|
|
|
$(INSTALL_DATA) expat.pc $(DESTDIR)$(pkgconfigdir)/expat.pc
|
2002-10-02 07:16:04 +00:00
|
|
|
|
|
|
|
uninstall: uninstalllib
|
2013-02-26 00:43:01 +00:00
|
|
|
$(LIBTOOL) --mode=uninstall rm -f $(DESTDIR)$(bindir)/xmlwf@EXEEXT@
|
2008-05-08 13:51:16 +00:00
|
|
|
rm -f $(DESTDIR)$(man1dir)/xmlwf.1
|
2002-10-02 07:16:04 +00:00
|
|
|
|
|
|
|
uninstalllib:
|
2008-05-08 13:51:16 +00:00
|
|
|
$(LIBTOOL) --mode=uninstall rm -f $(DESTDIR)$(libdir)/$(LIBRARY)
|
|
|
|
rm -f $(DESTDIR)$(includedir)/expat.h
|
|
|
|
rm -f $(DESTDIR)$(includedir)/expat_external.h
|
2013-02-26 00:43:01 +00:00
|
|
|
rm -f $(DESTDIR)$(pkgconfigdir)/expat.pc
|
2002-10-02 07:16:04 +00:00
|
|
|
|
|
|
|
# for VPATH builds (invoked by configure)
|
|
|
|
mkdir-init:
|
|
|
|
@for d in lib xmlwf examples tests ; do \
|
|
|
|
(mkdir $$d 2> /dev/null || test 1) ; \
|
|
|
|
done
|
|
|
|
|
|
|
|
CC = @CC@
|
2008-05-08 13:51:16 +00:00
|
|
|
CXX = @CXX@
|
2002-10-02 07:16:04 +00:00
|
|
|
LIBTOOL = @LIBTOOL@
|
|
|
|
|
|
|
|
INCLUDES = -I$(srcdir)/lib -I.
|
|
|
|
LDFLAGS = @LDFLAGS@
|
2008-05-08 13:51:16 +00:00
|
|
|
CPPFLAGS = @CPPFLAGS@ -DHAVE_EXPAT_CONFIG_H
|
2002-10-02 07:16:04 +00:00
|
|
|
CFLAGS = @CFLAGS@
|
2008-05-08 13:51:16 +00:00
|
|
|
CXXFLAGS = @CXXFLAGS@
|
2002-10-02 07:16:04 +00:00
|
|
|
VSNFLAG = -version-info @LIBCURRENT@:@LIBREVISION@:@LIBAGE@
|
|
|
|
|
|
|
|
### autoconf this?
|
|
|
|
LTFLAGS = --silent
|
|
|
|
|
2008-05-08 13:51:16 +00:00
|
|
|
COMPILE = $(CC) $(INCLUDES) $(CFLAGS) $(DEFS) $(CPPFLAGS)
|
|
|
|
CXXCOMPILE = $(CXX) $(INCLUDES) $(CXXFLAGS) $(DEFS) $(CPPFLAGS)
|
2002-10-02 07:16:04 +00:00
|
|
|
LTCOMPILE = $(LIBTOOL) $(LTFLAGS) --mode=compile $(COMPILE)
|
|
|
|
LINK_LIB = $(LIBTOOL) $(LTFLAGS) --mode=link $(COMPILE) -no-undefined $(VSNFLAG) -rpath $(libdir) $(LDFLAGS) -o $@
|
|
|
|
LINK_EXE = $(LIBTOOL) $(LTFLAGS) --mode=link $(COMPILE) $(LDFLAGS) -o $@
|
2008-05-08 13:51:16 +00:00
|
|
|
LINK_CXX_EXE = $(LIBTOOL) $(LTFLAGS) --mode=link $(CXXCOMPILE) $(LDFLAGS) -o $@
|
2002-10-02 07:16:04 +00:00
|
|
|
|
|
|
|
LIB_OBJS = lib/xmlparse.lo lib/xmltok.lo lib/xmlrole.lo
|
|
|
|
$(LIBRARY): $(LIB_OBJS)
|
|
|
|
$(LINK_LIB) $(LIB_OBJS)
|
|
|
|
|
2013-02-26 00:43:01 +00:00
|
|
|
expat.pc: $(top_builddir)/config.status
|
|
|
|
cd $(top_builddir) && $(SHELL) ./config.status $@
|
|
|
|
|
2002-10-02 07:16:04 +00:00
|
|
|
lib/xmlparse.lo: lib/xmlparse.c lib/expat.h lib/xmlrole.h lib/xmltok.h \
|
2008-05-08 13:51:16 +00:00
|
|
|
$(top_builddir)/expat_config.h lib/expat_external.h lib/internal.h
|
2002-10-02 07:16:04 +00:00
|
|
|
|
|
|
|
lib/xmlrole.lo: lib/xmlrole.c lib/ascii.h lib/xmlrole.h \
|
2008-05-08 13:51:16 +00:00
|
|
|
$(top_builddir)/expat_config.h lib/expat_external.h lib/internal.h
|
2002-10-02 07:16:04 +00:00
|
|
|
|
|
|
|
lib/xmltok.lo: lib/xmltok.c lib/xmltok_impl.c lib/xmltok_ns.c \
|
|
|
|
lib/ascii.h lib/asciitab.h lib/iasciitab.h lib/latin1tab.h \
|
|
|
|
lib/nametab.h lib/utf8tab.h lib/xmltok.h lib/xmltok_impl.h \
|
2008-05-08 13:51:16 +00:00
|
|
|
$(top_builddir)/expat_config.h lib/expat_external.h lib/internal.h
|
2002-10-02 07:16:04 +00:00
|
|
|
|
|
|
|
|
2013-02-26 00:43:01 +00:00
|
|
|
XMLWF_OBJS = xmlwf/xmlwf.@OBJEXT@ xmlwf/xmlfile.@OBJEXT@ xmlwf/codepage.@OBJEXT@ xmlwf/@FILEMAP@.@OBJEXT@
|
|
|
|
xmlwf/xmlwf.@OBJEXT@: xmlwf/xmlwf.c
|
|
|
|
xmlwf/xmlfile.@OBJEXT@: xmlwf/xmlfile.c
|
|
|
|
xmlwf/codepage.@OBJEXT@: xmlwf/codepage.c
|
|
|
|
xmlwf/@FILEMAP@.@OBJEXT@: xmlwf/@FILEMAP@.c
|
|
|
|
xmlwf/xmlwf@EXEEXT@: $(XMLWF_OBJS) $(LIBRARY)
|
2002-10-02 07:16:04 +00:00
|
|
|
$(LINK_EXE) $(XMLWF_OBJS) $(LIBRARY)
|
|
|
|
|
2013-02-26 00:43:01 +00:00
|
|
|
examples/elements.@OBJEXT@: examples/elements.c
|
|
|
|
examples/elements: examples/elements.@OBJEXT@ $(LIBRARY)
|
2002-10-02 07:16:04 +00:00
|
|
|
$(LINK_EXE) $< $(LIBRARY)
|
|
|
|
|
2013-02-26 00:43:01 +00:00
|
|
|
examples/outline.@OBJEXT@: examples/outline.c
|
|
|
|
examples/outline: examples/outline.@OBJEXT@ $(LIBRARY)
|
2002-10-02 07:16:04 +00:00
|
|
|
$(LINK_EXE) $< $(LIBRARY)
|
|
|
|
|
2013-02-26 00:43:01 +00:00
|
|
|
tests/chardata.@OBJEXT@: tests/chardata.c tests/chardata.h
|
|
|
|
tests/minicheck.@OBJEXT@: tests/minicheck.c tests/minicheck.h
|
|
|
|
tests/runtests.@OBJEXT@: tests/runtests.c tests/chardata.h
|
|
|
|
tests/runtests: tests/runtests.@OBJEXT@ tests/chardata.@OBJEXT@ tests/minicheck.@OBJEXT@ $(LIBRARY)
|
|
|
|
$(LINK_EXE) tests/runtests.@OBJEXT@ tests/chardata.@OBJEXT@ tests/minicheck.@OBJEXT@ $(LIBRARY)
|
|
|
|
tests/runtestspp.@OBJEXT@: tests/runtestspp.cpp tests/runtests.c tests/chardata.h
|
|
|
|
tests/runtestspp: tests/runtestspp.@OBJEXT@ tests/chardata.@OBJEXT@ tests/minicheck.@OBJEXT@ $(LIBRARY)
|
|
|
|
$(LINK_CXX_EXE) tests/runtestspp.@OBJEXT@ tests/chardata.@OBJEXT@ tests/minicheck.@OBJEXT@ $(LIBRARY)
|
|
|
|
|
|
|
|
tests/benchmark/benchmark.@OBJEXT@: tests/benchmark/benchmark.c
|
|
|
|
tests/benchmark/benchmark: tests/benchmark/benchmark.@OBJEXT@ $(LIBRARY)
|
|
|
|
$(LINK_EXE) tests/benchmark/benchmark.@OBJEXT@ $(LIBRARY)
|
|
|
|
|
|
|
|
run-benchmark: tests/benchmark/benchmark
|
|
|
|
tests/benchmark/benchmark@EXEEXT@ -n $(top_srcdir)/../testdata/largefiles/recset.xml 65535 3
|
2002-10-02 07:16:04 +00:00
|
|
|
|
|
|
|
tests/xmlts.zip:
|
|
|
|
wget --output-document=tests/xmlts.zip \
|
2013-02-26 00:43:01 +00:00
|
|
|
http://www.w3.org/XML/Test/xmlts20080827.zip
|
2002-10-02 07:16:04 +00:00
|
|
|
|
|
|
|
tests/XML-Test-Suite: tests/xmlts.zip
|
|
|
|
cd tests && unzip -q xmlts.zip
|
|
|
|
|
2013-02-26 00:43:01 +00:00
|
|
|
run-xmltest: xmlwf/xmlwf@EXEEXT@ tests/XML-Test-Suite
|
2002-10-02 07:16:04 +00:00
|
|
|
tests/xmltest.sh
|
|
|
|
|
2013-02-26 00:43:01 +00:00
|
|
|
.SUFFIXES: .c .cpp .lo .@OBJEXT@
|
2002-10-02 07:16:04 +00:00
|
|
|
|
2013-02-26 00:43:01 +00:00
|
|
|
.cpp.@OBJEXT@:
|
2008-05-08 13:51:16 +00:00
|
|
|
$(CXXCOMPILE) -o $@ -c $<
|
2013-02-26 00:43:01 +00:00
|
|
|
.c.@OBJEXT@:
|
2002-10-02 07:16:04 +00:00
|
|
|
$(COMPILE) -o $@ -c $<
|
|
|
|
.c.lo:
|
|
|
|
$(LTCOMPILE) -o $@ -c $<
|
|
|
|
|
|
|
|
.PHONY: buildlib all \
|
|
|
|
clean distclean extraclean maintainer-clean \
|
|
|
|
dist distdir \
|
|
|
|
install uninstall
|