Makefile.in 6.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188
  1. ################################################################
  2. # Process this file with top-level configure script to produce Makefile
  3. #
  4. # Copyright 2000 Clark Cooper
  5. #
  6. # This file is part of EXPAT.
  7. #
  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.
  11. #
  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.
  19. #
  20. SHELL = @SHELL@
  21. srcdir = @srcdir@
  22. top_srcdir = @top_srcdir@
  23. VPATH = @srcdir@
  24. prefix = @prefix@
  25. exec_prefix = @exec_prefix@
  26. bindir = @bindir@
  27. libdir = @libdir@
  28. includedir = @includedir@
  29. man1dir = @mandir@/man1
  30. top_builddir = .
  31. INSTALL = @INSTALL@
  32. INSTALL_PROGRAM = @INSTALL_PROGRAM@
  33. INSTALL_DATA = @INSTALL_DATA@
  34. mkinstalldirs = $(SHELL) $(top_srcdir)/conftools/mkinstalldirs
  35. MANFILE = $(srcdir)/doc/xmlwf.1
  36. APIHEADER = $(srcdir)/lib/expat.h $(srcdir)/lib/expat_external.h
  37. LIBRARY = libexpat.la
  38. DESTDIR = $(INSTALL_ROOT)
  39. default: buildlib xmlwf/xmlwf
  40. buildlib: $(LIBRARY)
  41. all: $(LIBRARY) xmlwf/xmlwf examples/elements examples/outline
  42. clean:
  43. cd lib && rm -f $(LIBRARY) *.o *.lo && rm -rf .libs _libs
  44. cd xmlwf && rm -f xmlwf *.o *.lo && rm -rf .libs _libs
  45. cd examples && rm -f elements outline *.o *.lo && rm -rf .libs _libs
  46. cd tests && rm -rf .libs runtests runtests.o runtestspp runtestspp.o
  47. cd tests && rm -f chardata.o minicheck.o
  48. rm -rf .libs libexpat.la
  49. rm -f examples/core tests/core xmlwf/core
  50. clobber: clean
  51. distclean: clean
  52. rm -f expat_config.h config.status config.log config.cache libtool
  53. rm -f Makefile
  54. extraclean: distclean
  55. rm -f expat_config.h.in configure
  56. rm -f conftools/ltconfig conftools/ltmain.sh conftools/libtool.m4
  57. check: tests/runtests tests/runtestspp
  58. tests/runtests
  59. tests/runtestspp
  60. install: xmlwf/xmlwf installlib
  61. $(mkinstalldirs) $(DESTDIR)$(bindir) $(DESTDIR)$(man1dir)
  62. $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) xmlwf/xmlwf $(DESTDIR)$(bindir)/xmlwf
  63. $(INSTALL_DATA) $(MANFILE) $(DESTDIR)$(man1dir)
  64. installlib: $(LIBRARY) $(APIHEADER)
  65. $(mkinstalldirs) $(DESTDIR)$(libdir) $(DESTDIR)$(includedir)
  66. $(LIBTOOL) --mode=install $(INSTALL) $(LIBRARY) $(DESTDIR)$(libdir)/$(LIBRARY)
  67. for FN in $(APIHEADER) ; do $(INSTALL_DATA) $$FN $(DESTDIR)$(includedir) ; done
  68. uninstall: uninstalllib
  69. $(LIBTOOL) --mode=uninstall rm -f $(DESTDIR)$(bindir)/xmlwf
  70. rm -f $(DESTDIR)$(man1dir)/xmlwf.1
  71. uninstalllib:
  72. $(LIBTOOL) --mode=uninstall rm -f $(DESTDIR)$(libdir)/$(LIBRARY)
  73. rm -f $(DESTDIR)$(includedir)/expat.h
  74. rm -f $(DESTDIR)$(includedir)/expat_external.h
  75. # for VPATH builds (invoked by configure)
  76. mkdir-init:
  77. @for d in lib xmlwf examples tests ; do \
  78. (mkdir $$d 2> /dev/null || test 1) ; \
  79. done
  80. CC = @CC@
  81. CXX = @CXX@
  82. LIBTOOL = @LIBTOOL@
  83. INCLUDES = -I$(srcdir)/lib -I.
  84. LDFLAGS = @LDFLAGS@
  85. CPPFLAGS = @CPPFLAGS@ -DHAVE_EXPAT_CONFIG_H
  86. CFLAGS = @CFLAGS@
  87. CXXFLAGS = @CXXFLAGS@
  88. VSNFLAG = -version-info @LIBCURRENT@:@LIBREVISION@:@LIBAGE@
  89. ### autoconf this?
  90. LTFLAGS = --silent
  91. COMPILE = $(CC) $(INCLUDES) $(CFLAGS) $(DEFS) $(CPPFLAGS)
  92. CXXCOMPILE = $(CXX) $(INCLUDES) $(CXXFLAGS) $(DEFS) $(CPPFLAGS)
  93. LTCOMPILE = $(LIBTOOL) $(LTFLAGS) --mode=compile $(COMPILE)
  94. LINK_LIB = $(LIBTOOL) $(LTFLAGS) --mode=link $(COMPILE) -no-undefined $(VSNFLAG) -rpath $(libdir) $(LDFLAGS) -o $@
  95. LINK_EXE = $(LIBTOOL) $(LTFLAGS) --mode=link $(COMPILE) $(LDFLAGS) -o $@
  96. LINK_CXX_EXE = $(LIBTOOL) $(LTFLAGS) --mode=link $(CXXCOMPILE) $(LDFLAGS) -o $@
  97. LIB_OBJS = lib/xmlparse.lo lib/xmltok.lo lib/xmlrole.lo
  98. $(LIBRARY): $(LIB_OBJS)
  99. $(LINK_LIB) $(LIB_OBJS)
  100. lib/xmlparse.lo: lib/xmlparse.c lib/expat.h lib/xmlrole.h lib/xmltok.h \
  101. $(top_builddir)/expat_config.h lib/expat_external.h lib/internal.h
  102. lib/xmlrole.lo: lib/xmlrole.c lib/ascii.h lib/xmlrole.h \
  103. $(top_builddir)/expat_config.h lib/expat_external.h lib/internal.h
  104. lib/xmltok.lo: lib/xmltok.c lib/xmltok_impl.c lib/xmltok_ns.c \
  105. lib/ascii.h lib/asciitab.h lib/iasciitab.h lib/latin1tab.h \
  106. lib/nametab.h lib/utf8tab.h lib/xmltok.h lib/xmltok_impl.h \
  107. $(top_builddir)/expat_config.h lib/expat_external.h lib/internal.h
  108. XMLWF_OBJS = xmlwf/xmlwf.o xmlwf/xmlfile.o xmlwf/codepage.o xmlwf/@FILEMAP@.o
  109. xmlwf/xmlwf.o: xmlwf/xmlwf.c
  110. xmlwf/xmlfile.o: xmlwf/xmlfile.c
  111. xmlwf/codepage.o: xmlwf/codepage.c
  112. xmlwf/@FILEMAP@.o: xmlwf/@FILEMAP@.c
  113. xmlwf/xmlwf: $(XMLWF_OBJS) $(LIBRARY)
  114. $(LINK_EXE) $(XMLWF_OBJS) $(LIBRARY)
  115. examples/elements.o: examples/elements.c
  116. examples/elements: examples/elements.o $(LIBRARY)
  117. $(LINK_EXE) $< $(LIBRARY)
  118. examples/outline.o: examples/outline.c
  119. examples/outline: examples/outline.o $(LIBRARY)
  120. $(LINK_EXE) $< $(LIBRARY)
  121. tests/chardata.o: tests/chardata.c tests/chardata.h
  122. tests/minicheck.o: tests/minicheck.c tests/minicheck.h
  123. tests/runtests.o: tests/runtests.c tests/chardata.h
  124. tests/runtests: tests/runtests.o tests/chardata.o tests/minicheck.o $(LIBRARY)
  125. $(LINK_EXE) tests/runtests.o tests/chardata.o tests/minicheck.o $(LIBRARY)
  126. tests/runtestspp.o: tests/runtestspp.cpp tests/runtests.c tests/chardata.h
  127. tests/runtestspp: tests/runtestspp.o tests/chardata.o tests/minicheck.o $(LIBRARY)
  128. $(LINK_CXX_EXE) tests/runtestspp.o tests/chardata.o tests/minicheck.o $(LIBRARY)
  129. tests/xmlts.zip:
  130. wget --output-document=tests/xmlts.zip \
  131. http://www.w3.org/XML/Test/xmlts20020606.zip
  132. tests/XML-Test-Suite: tests/xmlts.zip
  133. cd tests && unzip -q xmlts.zip
  134. run-xmltest: xmlwf/xmlwf tests/XML-Test-Suite
  135. tests/xmltest.sh
  136. .SUFFIXES: .c .cpp .lo .o
  137. .cpp.o:
  138. $(CXXCOMPILE) -o $@ -c $<
  139. .c.o:
  140. $(COMPILE) -o $@ -c $<
  141. .c.lo:
  142. $(LTCOMPILE) -o $@ -c $<
  143. .PHONY: buildlib all \
  144. clean distclean extraclean maintainer-clean \
  145. dist distdir \
  146. install uninstall