PageRenderTime 65ms CodeModel.GetById 27ms RepoModel.GetById 1ms app.codeStats 0ms

/amanda/trunk/server-src/Makefile.am

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