2000-09-18 12:26:23 -04: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@
|
2001-12-07 05:19:31 -05:00
|
|
|
|
2000-09-18 12:26:23 -04:00
|
|
|
prefix = @prefix@
|
|
|
|
exec_prefix = @exec_prefix@
|
|
|
|
|
|
|
|
bindir = @bindir@
|
|
|
|
libdir = @libdir@
|
|
|
|
includedir = @includedir@
|
2002-06-01 18:29:30 -04:00
|
|
|
mandir = ${prefix}/man/man1
|
2000-09-18 12:26:23 -04:00
|
|
|
|
|
|
|
top_builddir = .
|
|
|
|
|
|
|
|
|
|
|
|
INSTALL = @INSTALL@
|
|
|
|
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
|
|
|
INSTALL_DATA = @INSTALL_DATA@
|
2001-08-23 05:24:45 -04:00
|
|
|
mkinstalldirs = $(SHELL) $(top_srcdir)/conftools/mkinstalldirs
|
2000-09-18 12:26:23 -04:00
|
|
|
|
2002-07-11 14:54:42 -04:00
|
|
|
MANFILE = $(srcdir)/doc/xmlwf.1
|
|
|
|
APIHEADER = $(srcdir)/lib/expat.h
|
2001-08-23 05:24:45 -04:00
|
|
|
LIBRARY = libexpat.la
|
|
|
|
|
|
|
|
|
2001-12-07 05:19:31 -05:00
|
|
|
default: buildlib xmlwf/xmlwf
|
2001-02-28 23:28:27 -05:00
|
|
|
|
2002-07-11 14:54:42 -04:00
|
|
|
buildlib: $(LIBRARY)
|
2000-09-18 12:26:23 -04:00
|
|
|
|
2002-07-11 14:54:42 -04:00
|
|
|
all: $(LIBRARY) xmlwf/xmlwf examples/elements examples/outline
|
2000-09-18 12:26:23 -04:00
|
|
|
|
|
|
|
clean:
|
2001-08-23 05:24:45 -04:00
|
|
|
cd lib && rm -f $(LIBRARY) *.o *.lo && rm -rf .libs _libs
|
2001-12-07 05:19:31 -05:00
|
|
|
cd xmlwf && rm -f xmlwf *.o *.lo && rm -rf .libs _libs
|
|
|
|
cd examples && rm -f elements outline *.o *.lo && rm -rf .libs _libs
|
2002-08-23 17:53:29 -04:00
|
|
|
cd tests && rm -rf .libs runtests runtests.o chardata.o
|
|
|
|
rm -rf .libs libexpat.la
|
2002-11-07 16:48:05 -05:00
|
|
|
rm -f examples/core tests/core xmlwf/core
|
2001-08-23 05:24:45 -04:00
|
|
|
|
|
|
|
distclean: clean
|
2002-05-17 17:30:07 -04:00
|
|
|
rm -f expat_config.h config.status config.log config.cache libtool
|
2001-12-07 05:19:31 -05:00
|
|
|
rm -f Makefile
|
2001-03-10 10:41:50 -05:00
|
|
|
|
|
|
|
extraclean: distclean
|
2002-05-17 17:30:07 -04:00
|
|
|
rm -f expat_config.h.in configure
|
2002-06-01 18:35:28 -04:00
|
|
|
rm -f conftools/ltconfig conftools/ltmain.sh conftools/libtool.m4
|
2000-09-18 12:26:23 -04:00
|
|
|
|
2001-12-07 05:19:31 -05:00
|
|
|
check: tests/runtests
|
2002-04-20 09:11:16 -04:00
|
|
|
tests/runtests
|
2001-07-24 23:05:22 -04:00
|
|
|
|
2002-06-03 14:16:07 -04:00
|
|
|
install: xmlwf/xmlwf installlib
|
|
|
|
$(mkinstalldirs) $(bindir) $(mandir)
|
2001-08-23 05:24:45 -04:00
|
|
|
$(LIBTOOL) --mode=install $(INSTALL_PROGRAM) xmlwf/xmlwf $(bindir)/xmlwf
|
2002-07-11 14:54:42 -04:00
|
|
|
$(INSTALL_DATA) $(MANFILE) $(mandir)
|
2002-06-03 14:16:07 -04:00
|
|
|
|
2002-07-11 14:54:42 -04:00
|
|
|
installlib: $(LIBRARY) $(APIHEADER)
|
2002-06-03 14:16:07 -04:00
|
|
|
$(mkinstalldirs) $(libdir) $(includedir)
|
2002-07-11 14:54:42 -04:00
|
|
|
$(LIBTOOL) --mode=install $(INSTALL) $(LIBRARY) $(libdir)/$(LIBRARY)
|
|
|
|
$(INSTALL_DATA) $(APIHEADER) $(includedir)
|
2000-09-18 12:26:23 -04:00
|
|
|
|
2002-06-03 14:16:07 -04:00
|
|
|
uninstall: uninstalllib
|
2001-08-23 05:24:45 -04:00
|
|
|
$(LIBTOOL) --mode=uninstall rm -f $(bindir)/xmlwf
|
2002-06-03 14:16:07 -04:00
|
|
|
rm -f $(mandir)/xmlwf.1
|
|
|
|
|
|
|
|
uninstalllib:
|
2001-08-23 05:24:45 -04:00
|
|
|
$(LIBTOOL) --mode=uninstall rm -f $(libdir)/$(LIBRARY)
|
2002-05-17 10:12:25 -04:00
|
|
|
rm -f $(includedir)/$(APIHEADER)
|
2001-03-10 10:41:50 -05:00
|
|
|
|
2001-12-07 05:19:31 -05: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@
|
|
|
|
LIBTOOL = @LIBTOOL@
|
|
|
|
|
2002-07-11 14:54:42 -04:00
|
|
|
INCLUDES = -I$(srcdir)/lib -I.
|
2001-12-07 05:19:31 -05:00
|
|
|
LDFLAGS = @LDFLAGS@
|
|
|
|
CPPFLAGS = @CPPFLAGS@
|
|
|
|
CFLAGS = @CFLAGS@
|
|
|
|
VSNFLAG = -version-info @LIBCURRENT@:@LIBREVISION@:@LIBAGE@
|
|
|
|
|
|
|
|
### autoconf this?
|
|
|
|
LTFLAGS = --silent
|
|
|
|
|
|
|
|
COMPILE = $(CC) $(CFLAGS) $(DEFS) $(CPPFLAGS) $(INCLUDES)
|
|
|
|
LTCOMPILE = $(LIBTOOL) $(LTFLAGS) --mode=compile $(COMPILE)
|
2002-05-17 20:26:59 -04:00
|
|
|
LINK_LIB = $(LIBTOOL) $(LTFLAGS) --mode=link $(COMPILE) -no-undefined $(VSNFLAG) -rpath $(libdir) $(LDFLAGS) -o $@
|
2001-12-07 05:19:31 -05:00
|
|
|
LINK_EXE = $(LIBTOOL) $(LTFLAGS) --mode=link $(COMPILE) $(LDFLAGS) -o $@
|
|
|
|
|
|
|
|
LIB_OBJS = lib/xmlparse.lo lib/xmltok.lo lib/xmlrole.lo
|
2002-07-11 14:54:42 -04:00
|
|
|
$(LIBRARY): $(LIB_OBJS)
|
2001-12-07 05:19:31 -05:00
|
|
|
$(LINK_LIB) $(LIB_OBJS)
|
|
|
|
|
|
|
|
lib/xmlparse.lo: lib/xmlparse.c lib/expat.h lib/xmlrole.h lib/xmltok.h \
|
2002-09-04 21:58:27 -04:00
|
|
|
$(top_builddir)/expat_config.h lib/internal.h
|
2001-12-07 05:19:31 -05:00
|
|
|
|
|
|
|
lib/xmlrole.lo: lib/xmlrole.c lib/ascii.h lib/xmlrole.h \
|
2002-09-04 21:58:27 -04:00
|
|
|
$(top_builddir)/expat_config.h lib/internal.h
|
2001-12-07 05:19:31 -05: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 \
|
2002-05-17 17:38:44 -04:00
|
|
|
$(top_builddir)/expat_config.h
|
2001-12-07 05:19:31 -05:00
|
|
|
|
|
|
|
|
|
|
|
XMLWF_OBJS = xmlwf/xmlwf.o xmlwf/xmlfile.o xmlwf/codepage.o xmlwf/@FILEMAP@.o
|
|
|
|
xmlwf/xmlwf.o: xmlwf/xmlwf.c
|
|
|
|
xmlwf/xmlfile.o: xmlwf/xmlfile.c
|
|
|
|
xmlwf/codepage.o: xmlwf/codepage.c
|
|
|
|
xmlwf/@FILEMAP@.o: xmlwf/@FILEMAP@.c
|
2002-07-11 14:54:42 -04:00
|
|
|
xmlwf/xmlwf: $(XMLWF_OBJS) $(LIBRARY)
|
|
|
|
$(LINK_EXE) $(XMLWF_OBJS) $(LIBRARY)
|
2001-12-07 05:19:31 -05:00
|
|
|
|
|
|
|
examples/elements.o: examples/elements.c
|
2002-07-11 14:54:42 -04:00
|
|
|
examples/elements: examples/elements.o $(LIBRARY)
|
|
|
|
$(LINK_EXE) $< $(LIBRARY)
|
2001-12-07 05:19:31 -05:00
|
|
|
|
|
|
|
examples/outline.o: examples/outline.c
|
2002-07-11 14:54:42 -04:00
|
|
|
examples/outline: examples/outline.o $(LIBRARY)
|
|
|
|
$(LINK_EXE) $< $(LIBRARY)
|
2001-12-07 05:19:31 -05:00
|
|
|
|
2002-04-25 00:04:42 -04:00
|
|
|
tests/chardata.o: tests/chardata.c tests/chardata.h
|
|
|
|
tests/runtests.o: tests/runtests.c tests/chardata.h
|
2002-07-11 14:54:42 -04:00
|
|
|
tests/runtests: tests/runtests.o tests/chardata.o $(LIBRARY)
|
2002-04-25 00:04:42 -04:00
|
|
|
$(LINK_EXE) $^ -lcheck
|
2001-12-07 05:19:31 -05:00
|
|
|
|
2002-09-03 19:19:30 -04:00
|
|
|
tests/xmlts.zip:
|
|
|
|
wget --output-document=tests/xmlts.zip \
|
|
|
|
http://www.w3.org/XML/Test/xmlts20020606.zip
|
2002-04-29 17:31:18 -04:00
|
|
|
|
2002-09-03 19:19:30 -04:00
|
|
|
tests/XML-Test-Suite: tests/xmlts.zip
|
|
|
|
cd tests && unzip -q xmlts.zip
|
2002-04-29 17:31:18 -04:00
|
|
|
|
2002-09-03 19:19:30 -04:00
|
|
|
run-xmltest: xmlwf/xmlwf tests/XML-Test-Suite
|
2002-04-29 17:31:18 -04:00
|
|
|
tests/xmltest.sh
|
|
|
|
|
2001-12-07 05:19:31 -05:00
|
|
|
.SUFFIXES: .c .lo .o
|
|
|
|
|
|
|
|
.c.o:
|
|
|
|
$(COMPILE) -o $@ -c $<
|
|
|
|
.c.lo:
|
|
|
|
$(LTCOMPILE) -o $@ -c $<
|
|
|
|
|
|
|
|
.PHONY: buildlib all \
|
2001-03-10 10:41:50 -05:00
|
|
|
clean distclean extraclean maintainer-clean \
|
|
|
|
dist distdir \
|
|
|
|
install uninstall
|