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

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

#
Makefile | 178 lines | 135 code | 34 blank | 9 comment | 4 complexity | 9e4beb9f0732a44b1f595e4a5e9bf9c5 MD5 | raw file
  1. # Makefile for Amanda server programs.
  2. include $(top_srcdir)/config/automake/vars.am
  3. include $(top_srcdir)/config/automake/scripts.am
  4. include $(top_srcdir)/config/automake/installperms.am
  5. include $(top_srcdir)/config/automake/precompile.am
  6. INCLUDES = -I$(top_builddir)/common-src \
  7. -I$(top_srcdir)/common-src \
  8. -I$(top_srcdir)/restore-src \
  9. -I$(top_srcdir)/amandad-src \
  10. -I$(top_srcdir)/device-src \
  11. -I$(top_srcdir)/gnulib
  12. AM_CFLAGS = $(AMANDA_WARNING_CFLAGS)
  13. AM_LDFLAGS = $(AMANDA_STATIC_LDFLAGS)
  14. LINT=$(AMLINT)
  15. LINTFLAGS=$(AMLINTFLAGS)
  16. amlib_LTLIBRARIES = libamserver.la
  17. sbin_PROGRAMS = amadmin amcheck \
  18. amflush amgetconf amlabel \
  19. amtape amreport
  20. noinst_PROGRAMS = taper_source_test
  21. amlibexec_PROGRAMS = amindexd amlogroll amtrmidx \
  22. amtrmlog driver dumper \
  23. planner taper amcleanupdisk \
  24. chunker
  25. # Exclude scripts which depend on perl extension modules from the syntax checks
  26. CHECK_PERL = \
  27. amaddclient \
  28. amoverview \
  29. amserverconfig \
  30. amstatus \
  31. amtoc
  32. SCRIPTS_PERL = \
  33. $(CHECK_PERL) \
  34. amdevcheck \
  35. amcheckdump
  36. SCRIPTS_SHELL = \
  37. amcheckdb \
  38. amcleanup \
  39. amdump \
  40. amrmtape \
  41. amverify \
  42. amverifyrun
  43. sbin_SCRIPTS = $(SCRIPTS_PERL) $(SCRIPTS_SHELL)
  44. INSTALLPERMS_exec = \
  45. dest=$(sbindir) chown=amanda chmod= \
  46. $(sbin_PROGRAMS) \
  47. chown=root chmod=u+s,o-rwx \
  48. amcheck \
  49. dest=$(amlibexecdir) chown=amanda chmod= \
  50. $(amlibexec_PROGRAMS) \
  51. chown=root chmod=u+s,o-rwx \
  52. dumper planner
  53. INSTALLPERMS_data = \
  54. dest=$(sbindir) chown=amanda chmod= \
  55. $(sbin_SCRIPTS) \
  56. dest=$(amlibexecdir) chown=amanda chmod= \
  57. $(amlibexec_SCRIPTS)
  58. ###
  59. # Because libamanda includes routines (e.g. regex) provided by some system
  60. # libraries, and because of the way libtool sets up the command line, we
  61. # need to list libamanda twice here, first to override the system library
  62. # routines, and second to pick up any references in the other libraries.
  63. ###
  64. LDADD = ../common-src/libamanda.la \
  65. libamserver.la \
  66. ../device-src/libamdevice.la \
  67. ../common-src/libamanda.la \
  68. ../gnulib/libgnu.la \
  69. $(READLINE_LIBS)
  70. libamserver_la_SOURCES= amindex.c changer.c \
  71. diskfile.c driverio.c cmdline.c \
  72. holding.c infofile.c logfile.c \
  73. tapefile.c find.c server_util.c \
  74. taperscan.c
  75. libamserver_la_LDFLAGS= -release $(VERSION)
  76. libamserver_la_LIBADD= ../device-src/libamdevice.la \
  77. ../common-src/libamanda.la
  78. taper_source_test_SOURCES = taper-source-test.c \
  79. taper-source.c \
  80. taper-file-source.c \
  81. taper-port-source.c \
  82. taper-disk-port-source.c \
  83. taper-mem-port-source.c
  84. taper_SOURCES = taper.c \
  85. taper-source.c \
  86. taper-file-source.c \
  87. taper-port-source.c \
  88. taper-disk-port-source.c \
  89. taper-mem-port-source.c
  90. taper_LDADD = $(LDADD) \
  91. ../amandad-src/libamandad.la
  92. taper_source_test_LDADD = $(LDADD) \
  93. ../amandad-src/libamandad.la
  94. amindexd_LDADD = $(LDADD) \
  95. ../amandad-src/libamandad.la
  96. # there are used for testing only:
  97. TEST_PROGS = diskfile infofile
  98. EXTRA_PROGRAMS = $(TEST_PROGS)
  99. CLEANFILES += *.test.c
  100. amindexd_CSRC = amindexd.c disk_history.c list_dir.c
  101. amindexd_SOURCES = disk_history.h list_dir.h $(amindexd_CSRC)
  102. amreport_SOURCES = reporter.c
  103. amgetconf_SOURCES = getconf.c
  104. noinst_HEADERS = amindex.h changer.h cmdline.h \
  105. diskfile.h driverio.h \
  106. holding.h infofile.h logfile.h \
  107. tapefile.h find.h server_util.h \
  108. taperscan.h taper-disk-port-source.h \
  109. taper-mem-port-source.h taper-file-source.h \
  110. taper-port-source.h taper-source.h
  111. lint:
  112. @ for p in $(amlibexec_PROGRAMS) $(sbin_PROGRAMS); do \
  113. if [ $$p = "amindexd" ]; then \
  114. s="$(amindexd_CSRC)"; \
  115. elif [ $$p = "amreport" ]; then \
  116. s="$(amreport_SOURCES)"; \
  117. elif [ $$p = "amgetconf" ]; then \
  118. s="$(getconf_SOURCES)"; \
  119. else \
  120. s=$$p.c; \
  121. fi; \
  122. f="$$s $(libamserver_la_SOURCES)"; \
  123. (cd ../common-src; make listlibsrc); \
  124. f="$$f "`cat ../common-src/listlibsrc.output`; \
  125. (cd ../tape-src; make listlibsrc); \
  126. f="$$f "`cat ../tape-src/listlibsrc.output`; \
  127. echo $(LINT) $$f; \
  128. $(LINT) $(LINTFLAGS) $(CPPFLAGS) $(DEFS) -I. -I$(top_builddir)/config \
  129. $(INCLUDES) $$f; \
  130. if [ $$? -ne 0 ]; then \
  131. exit 1; \
  132. fi; \
  133. done; \
  134. exit 0
  135. listlibsrc:
  136. @ for p in $(libamserver_la_SOURCES); do \
  137. listlibsrcs="$$listlibsrcs `pwd`/$$p"; \
  138. done; \
  139. echo $$listlibsrcs >listlibsrc.output
  140. diskfile_SOURCES = diskfile.test.c
  141. infofile_SOURCES = infofile.test.c
  142. %.test.c: $(srcdir)/%.c
  143. echo '#define TEST' >$@
  144. echo '#include "$<"' >>$@