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

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

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