Makefile.in 7.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214
  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. pkgconfigdir = $(libdir)/pkgconfig
  31. top_builddir = .
  32. INSTALL = @INSTALL@
  33. INSTALL_PROGRAM = @INSTALL_PROGRAM@
  34. INSTALL_DATA = @INSTALL_DATA@
  35. mkinstalldirs = $(SHELL) $(top_srcdir)/conftools/mkinstalldirs
  36. MANFILE = $(srcdir)/doc/xmlwf.1
  37. APIHEADER = $(srcdir)/lib/expat.h $(srcdir)/lib/expat_external.h expat_config.h
  38. LIBRARY = libexpat.la
  39. DESTDIR = $(INSTALL_ROOT)
  40. default: buildlib xmlwf/xmlwf@EXEEXT@
  41. buildlib: $(LIBRARY) expat.pc
  42. all: $(LIBRARY) expat.pc xmlwf/xmlwf@EXEEXT@ examples/elements examples/outline $(MANFILE)
  43. clean:
  44. cd lib && rm -f $(LIBRARY) *.@OBJEXT@ *.lo && rm -rf .libs _libs
  45. cd xmlwf && rm -f xmlwf *.@OBJEXT@ *.lo && rm -rf .libs _libs
  46. cd examples && rm -f elements outline *.@OBJEXT@ *.lo && rm -rf .libs _libs
  47. cd tests && rm -rf .libs runtests@EXEEXT@ runtests.@OBJEXT@ runtestspp@EXEEXT@ runtestspp.@OBJEXT@
  48. cd tests && rm -f chardata.@OBJEXT@ memcheck.@OBJEXT@ minicheck.@OBJEXT@
  49. rm -rf .libs libexpat.la
  50. rm -f examples/core tests/core xmlwf/core
  51. clobber: clean
  52. distclean: clean
  53. rm -f expat_config.h config.status config.log config.cache libtool
  54. rm -f Makefile expat.pc
  55. extraclean: distclean
  56. rm -f expat_config.h.in configure
  57. rm -f aclocal.m4 m4/*
  58. rm -f conftools/ltmain.sh conftools/install-sh conftools/config.guess conftools/config.sub
  59. check: tests/runtests@EXEEXT@ tests/runtestspp@EXEEXT@
  60. ./run.sh tests/runtests@EXEEXT@
  61. ./run.sh tests/runtestspp@EXEEXT@
  62. $(MANFILE):
  63. $(MAKE) -C doc xmlwf.1
  64. install: xmlwf/xmlwf@EXEEXT@ installlib $(MANFILE)
  65. $(mkinstalldirs) $(DESTDIR)$(bindir) $(DESTDIR)$(man1dir)
  66. $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) xmlwf/xmlwf@EXEEXT@ $(DESTDIR)$(bindir)/xmlwf
  67. $(INSTALL_DATA) $(MANFILE) $(DESTDIR)$(man1dir)
  68. installlib: $(LIBRARY) $(APIHEADER) expat.pc
  69. $(mkinstalldirs) $(DESTDIR)$(libdir) $(DESTDIR)$(includedir) $(DESTDIR)$(pkgconfigdir)
  70. $(LIBTOOL) --mode=install $(INSTALL) $(LIBRARY) $(DESTDIR)$(libdir)/$(LIBRARY)
  71. for FN in $(APIHEADER) ; do $(INSTALL_DATA) $$FN $(DESTDIR)$(includedir) ; done
  72. $(INSTALL_DATA) expat.pc $(DESTDIR)$(pkgconfigdir)/expat.pc
  73. uninstall: uninstalllib
  74. $(LIBTOOL) --mode=uninstall rm -f $(DESTDIR)$(bindir)/xmlwf@EXEEXT@
  75. rm -f $(DESTDIR)$(man1dir)/xmlwf.1
  76. uninstalllib:
  77. $(LIBTOOL) --mode=uninstall rm -f $(DESTDIR)$(libdir)/$(LIBRARY)
  78. rm -f $(DESTDIR)$(includedir)/expat.h
  79. rm -f $(DESTDIR)$(includedir)/expat_external.h
  80. rm -f $(DESTDIR)$(pkgconfigdir)/expat.pc
  81. # for VPATH builds (invoked by configure)
  82. mkdir-init:
  83. @for d in lib xmlwf examples tests ; do \
  84. (mkdir $$d 2> /dev/null || test 1) ; \
  85. done
  86. CC = @CC@
  87. CXX = @CXX@
  88. LIBTOOL = @LIBTOOL@
  89. INCLUDES = -I$(srcdir)/lib -I.
  90. LDFLAGS = @LDFLAGS@
  91. CPPFLAGS = @CPPFLAGS@ -DHAVE_EXPAT_CONFIG_H
  92. CFLAGS = @CFLAGS@
  93. CXXFLAGS = @CXXFLAGS@
  94. VSNFLAG = -version-info @LIBCURRENT@:@LIBREVISION@:@LIBAGE@
  95. ### autoconf this?
  96. LTFLAGS = --verbose
  97. COMPILE = $(CC) $(INCLUDES) $(CFLAGS) $(DEFS) $(CPPFLAGS)
  98. CXXCOMPILE = $(CXX) $(INCLUDES) $(CXXFLAGS) $(DEFS) $(CPPFLAGS)
  99. LTCOMPILE = $(LIBTOOL) $(LTFLAGS) --mode=compile $(COMPILE)
  100. LINK_LIB = $(LIBTOOL) $(LTFLAGS) --mode=link $(COMPILE) -no-undefined $(VSNFLAG) -rpath $(libdir) $(LDFLAGS) @LIBS@ -o $@
  101. LINK_EXE = $(LIBTOOL) $(LTFLAGS) --mode=link $(COMPILE) $(LDFLAGS) -o $@
  102. LINK_CXX_EXE = $(LIBTOOL) $(LTFLAGS) --mode=link $(CXXCOMPILE) $(LDFLAGS) -o $@
  103. LIB_OBJS = lib/xmlparse.lo lib/xmltok.lo lib/xmlrole.lo
  104. $(LIBRARY): $(LIB_OBJS)
  105. $(LINK_LIB) $(LIB_OBJS)
  106. expat.pc: $(top_builddir)/config.status
  107. cd $(top_builddir) && $(SHELL) ./config.status $@
  108. lib/xmlparse.lo: lib/xmlparse.c lib/expat.h lib/siphash.h lib/xmlrole.h lib/xmltok.h \
  109. $(top_builddir)/expat_config.h lib/expat_external.h lib/internal.h
  110. lib/xmlrole.lo: lib/xmlrole.c lib/ascii.h lib/xmlrole.h \
  111. $(top_builddir)/expat_config.h lib/expat_external.h lib/internal.h
  112. lib/xmltok.lo: lib/xmltok.c lib/xmltok_impl.c lib/xmltok_ns.c \
  113. lib/ascii.h lib/asciitab.h lib/iasciitab.h lib/latin1tab.h \
  114. lib/nametab.h lib/utf8tab.h lib/xmltok.h lib/xmltok_impl.h \
  115. $(top_builddir)/expat_config.h lib/expat_external.h lib/internal.h
  116. XMLWF_OBJS = xmlwf/xmlwf.@OBJEXT@ xmlwf/xmlfile.@OBJEXT@ xmlwf/codepage.@OBJEXT@ xmlwf/@FILEMAP@.@OBJEXT@
  117. xmlwf/xmlwf.@OBJEXT@: xmlwf/xmlwf.c
  118. xmlwf/xmlfile.@OBJEXT@: xmlwf/xmlfile.c
  119. xmlwf/codepage.@OBJEXT@: xmlwf/codepage.c
  120. xmlwf/@FILEMAP@.@OBJEXT@: xmlwf/@FILEMAP@.c xmlwf/filemap.h
  121. xmlwf/xmlwf@EXEEXT@: $(XMLWF_OBJS) $(LIBRARY)
  122. $(LINK_EXE) $(XMLWF_OBJS) $(LIBRARY)
  123. examples/elements.@OBJEXT@: examples/elements.c
  124. examples/elements: examples/elements.@OBJEXT@ $(LIBRARY)
  125. $(LINK_EXE) examples/elements.@OBJEXT@ $(LIBRARY)
  126. examples/outline.@OBJEXT@: examples/outline.c
  127. examples/outline: examples/outline.@OBJEXT@ $(LIBRARY)
  128. $(LINK_EXE) examples/outline.@OBJEXT@ $(LIBRARY)
  129. tests/chardata.@OBJEXT@: tests/chardata.c tests/chardata.h
  130. tests/minicheck.@OBJEXT@: tests/minicheck.c tests/minicheck.h
  131. tests/memcheck.@OBJEXT@: tests/memcheck.c tests/memcheck.h
  132. tests/runtests.@OBJEXT@: tests/runtests.c tests/chardata.h tests/memcheck.h lib/siphash.h
  133. tests/runtests@EXEEXT@: tests/runtests.@OBJEXT@ tests/chardata.@OBJEXT@ tests/minicheck.@OBJEXT@ tests/memcheck.@OBJEXT@ $(LIBRARY)
  134. $(LINK_EXE) tests/runtests.@OBJEXT@ tests/chardata.@OBJEXT@ tests/minicheck.@OBJEXT@ tests/memcheck.@OBJEXT@ $(LIBRARY)
  135. tests/runtestspp.@OBJEXT@: tests/runtestspp.cpp tests/runtests.c tests/chardata.h tests/memcheck.h
  136. tests/runtestspp@EXEEXT@: tests/runtestspp.@OBJEXT@ tests/chardata.@OBJEXT@ tests/minicheck.@OBJEXT@ tests/memcheck.@OBJEXT@ $(LIBRARY)
  137. $(LINK_CXX_EXE) tests/runtestspp.@OBJEXT@ tests/chardata.@OBJEXT@ tests/minicheck.@OBJEXT@ tests/memcheck.@OBJEXT@ $(LIBRARY)
  138. tests/benchmark/benchmark.@OBJEXT@: tests/benchmark/benchmark.c
  139. tests/benchmark/benchmark: tests/benchmark/benchmark.@OBJEXT@ $(LIBRARY)
  140. $(LINK_EXE) tests/benchmark/benchmark.@OBJEXT@ $(LIBRARY)
  141. run-benchmark: tests/benchmark/benchmark
  142. tests/benchmark/benchmark@EXEEXT@ -n $(top_srcdir)/../testdata/largefiles/recset.xml 65535 3
  143. tests/xmlts.zip:
  144. wget --output-document=tests/xmlts.zip \
  145. https://www.w3.org/XML/Test/xmlts20080827.zip
  146. tests/xmlconf: tests/xmlts.zip
  147. cd tests && unzip -q xmlts.zip
  148. run-xmltest: xmlwf/xmlwf@EXEEXT@ tests/xmlconf
  149. tests/xmltest.sh "$(PWD)/run.sh $(PWD)/xmlwf/xmlwf@EXEEXT@" 2>&1 | tee tests/xmltest.log
  150. diff -u -b tests/xmltest.log.expected tests/xmltest.log
  151. .PHONY: qa
  152. qa:
  153. ./qa.sh address
  154. ./qa.sh memory
  155. ./qa.sh undefined
  156. ./qa.sh coverage
  157. .SUFFIXES: .c .cpp .lo .@OBJEXT@
  158. .cpp.@OBJEXT@:
  159. $(CXXCOMPILE) -o $@ -c $<
  160. .c.@OBJEXT@:
  161. $(COMPILE) -o $@ -c $<
  162. .c.lo:
  163. $(LTCOMPILE) -o $@ -c $<
  164. .PHONY: buildlib all \
  165. clean distclean extraclean maintainer-clean \
  166. dist distdir \
  167. install uninstall