PageRenderTime 56ms CodeModel.GetById 29ms RepoModel.GetById 0ms app.codeStats 0ms

/amanda/tags/3_1_0/server-src/Makefile.am

#
Makefile | 157 lines | 121 code | 28 blank | 8 comment | 5 complexity | f516134c9584c74b39b92a035fa4bda7 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)/amandad-src \
  9. -I$(top_srcdir)/device-src \
  10. -I$(top_srcdir)/xfer-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 \
  19. amservice
  20. amlibexec_PROGRAMS = amindexd amlogroll amtrmidx \
  21. amtrmlog driver dumper \
  22. planner amcleanupdisk \
  23. chunker
  24. amlibexec_SCRIPTS_PERL = \
  25. taper \
  26. amcheck-device
  27. sbin_SCRIPTS_PERL = \
  28. amaddclient \
  29. amoverview \
  30. amserverconfig \
  31. amtoc \
  32. amcheckdump \
  33. amcleanup \
  34. amrmtape \
  35. amlabel \
  36. amreport \
  37. amtape \
  38. amvault \
  39. amstatus
  40. if WANT_RESTORE
  41. amlibexec_SCRIPTS_PERL += \
  42. amidxtaped
  43. sbin_SCRIPTS_PERL += \
  44. amfetchdump \
  45. amrestore
  46. endif
  47. sbin_SCRIPTS_SHELL = \
  48. amcheckdb \
  49. amdump
  50. SCRIPTS_PERL = $(sbin_SCRIPTS_PERL) $(amlibexec_SCRIPTS_PERL)
  51. SCRIPTS_SHELL = $(sbin_SCRIPTS_SHELL) $(amlibexec_SCRIPTS_SHELL)
  52. sbin_SCRIPTS = $(sbin_SCRIPTS_PERL) $(sbin_SCRIPTS_SHELL)
  53. amlibexec_SCRIPTS = $(amlibexec_SCRIPTS_PERL) $(amlibexec_SCRIPTS_SHELL)
  54. INSTALLPERMS_exec = \
  55. dest=$(sbindir) chown=amanda chmod= \
  56. $(sbin_PROGRAMS) \
  57. chown=root chmod=04750 \
  58. amcheck amservice \
  59. dest=$(amlibexecdir) chown=amanda chmod= \
  60. $(amlibexec_PROGRAMS) \
  61. $(amlibexec_SCRIPTS) \
  62. chown=root chmod=04750 \
  63. dumper planner
  64. INSTALLPERMS_data = \
  65. dest=$(sbindir) chown=amanda chmod= \
  66. $(sbin_SCRIPTS) \
  67. dest=$(amlibexecdir) chown=amanda chmod= \
  68. $(amlibexec_SCRIPTS)
  69. ###
  70. # Because libamanda includes routines (e.g. regex) provided by some system
  71. # libraries, and because of the way libtool sets up the command line, we
  72. # need to list libamanda twice here, first to override the system library
  73. # routines, and second to pick up any references in the other libraries.
  74. ###
  75. LDADD = ../common-src/libamanda.la \
  76. libamserver.la \
  77. ../device-src/libamdevice.la \
  78. ../common-src/libamanda.la \
  79. $(READLINE_LIBS)
  80. libamserver_la_SOURCES= amindex.c \
  81. diskfile.c driverio.c cmdline.c \
  82. holding.c infofile.c logfile.c \
  83. tapefile.c find.c server_util.c \
  84. xfer-source-holding.c
  85. libamserver_la_LDFLAGS= -release $(VERSION)
  86. libamserver_la_LIBADD= ../device-src/libamdevice.la \
  87. ../common-src/libamanda.la
  88. amindexd_LDADD = $(LDADD) \
  89. ../amandad-src/libamandad.la
  90. # there are used for testing only:
  91. TEST_PROGS = diskfile infofile
  92. EXTRA_PROGRAMS = $(TEST_PROGS)
  93. CLEANFILES += *.test.c
  94. amindexd_CSRC = amindexd.c disk_history.c list_dir.c
  95. amindexd_SOURCES = disk_history.h list_dir.h $(amindexd_CSRC)
  96. noinst_HEADERS = amindex.h cmdline.h \
  97. diskfile.h driverio.h \
  98. holding.h infofile.h logfile.h \
  99. tapefile.h find.h server_util.h \
  100. xfer-server.h
  101. lint:
  102. @ for p in $(amlibexec_PROGRAMS) $(sbin_PROGRAMS); do \
  103. p=`basename $$p $(EXEEXT)`; \
  104. if [ $$p = "amindexd" ]; then \
  105. s="$(amindexd_CSRC)"; \
  106. else \
  107. s=$$p.c; \
  108. fi; \
  109. f="$$s $(libamserver_la_SOURCES)"; \
  110. (cd ../common-src; make listlibsrc); \
  111. f="$$f "`cat ../common-src/listlibsrc.output`; \
  112. echo $(LINT) $$f; \
  113. $(LINT) $(LINTFLAGS) $(CPPFLAGS) $(DEFS) -I. -I$(top_builddir)/config \
  114. $(INCLUDES) $$f; \
  115. if [ $$? -ne 0 ]; then \
  116. exit 1; \
  117. fi; \
  118. done; \
  119. exit 0
  120. listlibsrc:
  121. @ for p in $(libamserver_la_SOURCES); do \
  122. listlibsrcs="$$listlibsrcs `pwd`/$$p"; \
  123. done; \
  124. echo $$listlibsrcs >listlibsrc.output
  125. diskfile_SOURCES = diskfile.test.c
  126. infofile_SOURCES = infofile.test.c
  127. %.test.c: $(srcdir)/%.c
  128. echo '#define TEST' >$@
  129. echo '#include "$<"' >>$@