PageRenderTime 45ms CodeModel.GetById 19ms RepoModel.GetById 0ms app.codeStats 0ms

/amanda/tags/amanda260p2/tape-src/Makefile.am

#
Makefile | 101 lines | 70 code | 23 blank | 8 comment | 4 complexity | 1492dc4808bef037ec0027513588d954 MD5 | raw file
  1. # Makefile for Amanda tape library.
  2. include $(top_srcdir)/config/automake/precompile.am
  3. INCLUDES = -I$(top_builddir)/common-src \
  4. -I$(top_srcdir)/common-src \
  5. -I$(top_srcdir)/gnulib
  6. AM_CFLAGS = $(AMANDA_WARNING_CFLAGS)
  7. AM_LDFLAGS = $(AMANDA_STATIC_LDFLAGS)
  8. LINT=@AMLINT@
  9. LINTFLAGS=@AMLINTFLAGS@
  10. amlib_LTLIBRARIES = libamtape.la
  11. LIB_EXTENSION = la
  12. sbin_PROGRAMS= ammt amdd amtapetype
  13. libamtape_la_SOURCES = output-file.c \
  14. output-null.c \
  15. output-rait.c \
  16. output-tape.c \
  17. tapeio.c
  18. libamtape_la_LDFLAGS = -release $(VERSION)
  19. libamtape_la_LIBADD = ../common-src/libamanda.$(LIB_EXTENSION)
  20. ###
  21. # Because libamanda includes routines (e.g. regex) provided by some system
  22. # libraries, and because of the way libtool sets up the command line, we
  23. # need to list libamanda twice here, first to override the system library
  24. # routines, and second to pick up any references in the other libraries.
  25. ###
  26. LDADD = ../common-src/libamanda.$(LIB_EXTENSION) \
  27. libamtape.$(LIB_EXTENSION) \
  28. ../common-src/libamanda.$(LIB_EXTENSION)
  29. # used for testing only
  30. TEST_PROGS = amtapeio
  31. EXTRA_PROGRAMS = $(TEST_PROGS)
  32. CLEANFILES = *.test.c
  33. amtapetype_SOURCES = tapetype.c
  34. noinst_HEADERS = \
  35. output-file.h \
  36. output-null.h \
  37. output-rait.h \
  38. output-tape.h \
  39. tapeio.h
  40. INSTALLPERMS_exec = \
  41. dest=$(sbindir) chown=amanda $(sbin_PROGRAMS) $(sbin_SCRIPTS) \
  42. dest=$(amlibexecdir) chown=amanda $(amlibexec_PROGRAMS) $(amlibexec_SCRIPTS)
  43. amtapeio_SOURCES = amtapeio.test.c
  44. amtapeio_LDADD = ../common-src/libamanda.$(LIB_EXTENSION) \
  45. libamtape.$(LIB_EXTENSION) \
  46. ../common-src/libamanda.$(LIB_EXTENSION)
  47. amtapeio.test.c: $(srcdir)/tapeio.c
  48. echo '#define TEST' >$@
  49. echo '#include "$<"' >>$@
  50. %.test.c: $(srcdir)/%.c
  51. echo '#define TEST' >$@
  52. echo '#include "$<"' >>$@
  53. tapetype:
  54. @echo "Use amtapetype instead"
  55. lint:
  56. @ for p in $(sbin_PROGRAMS); do \
  57. if [ $$p = "amtapetype" ]; then \
  58. s="$(amtapetype_SOURCES)"; \
  59. else \
  60. s=$$p.c; \
  61. fi; \
  62. f="$$s $(libamandad_la_SOURCES)"; \
  63. f="$$f "`(cd ../common-src; make listlibsrc 2>&1 > /dev/null)`; \
  64. (cd ../common-src; make listlibsrc); \
  65. f="$$f "`cat ../common-src/listlibsrc.output`; \
  66. echo $(LINT) $$f; \
  67. $(LINT) $(LINTFLAGS) $(CPPFLAGS) $(DEFS) -I. -I$(top_builddir)/config \
  68. $(INCLUDES) $$f; \
  69. if [ $$? -ne 0 ]; then \
  70. exit 1; \
  71. fi; \
  72. done; \
  73. exit 0
  74. listlibsrc:
  75. @ for p in $(libamtape_la_SOURCES); do \
  76. listlibsrcs="$$listlibsrcs `pwd`/$$p"; \
  77. done; \
  78. echo $$listlibsrcs > listlibsrc.output