PageRenderTime 37ms CodeModel.GetById 16ms RepoModel.GetById 1ms app.codeStats 0ms

/amanda/tags/amanda261p2/changer-src/Makefile.am

#
Makefile | 131 lines | 103 code | 21 blank | 7 comment | 13 complexity | 2e125cd08c7e893690691f7a77e86b81 MD5 | raw file
  1. # Makefile for Amanda tape changer 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)/device-src \
  9. -I$(top_srcdir)/gnulib
  10. AM_CFLAGS = $(AMANDA_WARNING_CFLAGS)
  11. AM_LDFLAGS = $(AMANDA_STATIC_LDFLAGS)
  12. LINT=$(AMLINT)
  13. LINTFLAGS=$(AMLINTFLAGS)
  14. if WANT_CHG_SCSI_CHIO
  15. CHIO_SCSI = chg-scsi-chio
  16. endif
  17. if WANT_CHG_SCSI
  18. CHG_SCSI = chg-scsi
  19. endif
  20. amlibexec_PROGRAMS = $(CHG_SCSI)
  21. EXTRA_PROGRAMS = $(CHIO_SCSI)
  22. CHECK_PERL = \
  23. chg-glue \
  24. chg-chio \
  25. chg-iomega \
  26. chg-rth
  27. SCRIPTS_PERL = $(CHECK_PERL)
  28. SCRIPTS_SHELL = \
  29. chg-manual \
  30. chg-multi \
  31. chg-mtx \
  32. chg-chs \
  33. chg-zd-mtx \
  34. chg-juke \
  35. chg-rait \
  36. chg-null \
  37. chg-mcutil \
  38. chg-disk
  39. SCRIPTS_INCLUDE = \
  40. chg-lib.sh
  41. EXTRA_DIST += chg-lib.sh.in
  42. amlibexec_SCRIPTS = $(SCRIPTS_PERL) $(SCRIPTS_SHELL)
  43. amlibexec_DATA = $(SCRIPTS_INCLUDE)
  44. ###
  45. # Because libamanda includes routines (e.g. regex) provided by some system
  46. # libraries, and because of the way libtool sets up the command line, we
  47. # need to list libamanda twice here, first to override the system library
  48. # routines, and second to pick up any references in the other libraries.
  49. ###
  50. LDADD = ../common-src/libamanda.la \
  51. ../common-src/libamanda.la \
  52. ../device-src/libamdevice.la \
  53. ../gnulib/libgnu.la \
  54. $(READLINE_LIBS)
  55. chg_scsi_CSRC = chg-scsi.c scsi-changer-driver.c sense.c
  56. if WANT_SCSI_AIX
  57. chg_scsi_CSRC += scsi-aix.c
  58. endif
  59. if WANT_SCSI_HPUX_NEW
  60. chg_scsi_CSRC += scsi-hpux_new.c
  61. endif
  62. if WANT_SCSI_IRIX
  63. chg_scsi_CSRC += scsi-irix.c
  64. endif
  65. if WANT_SCSI_LINUX
  66. chg_scsi_CSRC += scsi-linux.c
  67. endif
  68. if WANT_SCSI_SOLARIS
  69. chg_scsi_CSRC += scsi-solaris.c
  70. endif
  71. if WANT_SCSI_BSD
  72. chg_scsi_CSRC += scsi-bsd.c
  73. endif
  74. if WANT_SCSI_CAM
  75. chg_scsi_CSRC += scsi-cam.c
  76. endif
  77. chg_scsi_SOURCES = libscsi.h scsi-defs.h $(chg_scsi_CSRC)
  78. chg_scsi_chio_CSRC = chg-scsi-chio.c
  79. if WANT_SCSI_HPUX
  80. chg_scsi_chio_CSRC += scsi-hpux.c
  81. endif
  82. if WANT_SCSI_CHIO
  83. chg_scsi_chio_CSRC += scsi-chio.c
  84. endif
  85. chg_scsi_chio_SOURCES = libscsi.h $(chg_scsi_chio_CSRC)
  86. EXTRA_DIST += scsi-proto.c
  87. INSTALLPERMS_exec = \
  88. chown=amanda \
  89. dest=$(sbindir) $(sbin_PROGRAMS) \
  90. dest=$(amlibexecdir) $(amlibexec_PROGRAMS)
  91. INSTALLPERMS_data = \
  92. chown=amanda \
  93. dest=$(sbindir) $(sbin_SCRIPTS) \
  94. dest=$(amlibexecdir) $(amlibexec_SCRIPTS) $(amlibexec_DATA)
  95. lint:
  96. @ for p in $(amlibexec_PROGRAMS) $(EXTRA_PROGRAMS); do \
  97. p=`basename $$p $(EXEEXT)`; \
  98. f="$$p.c $(libamandad_la_SOURCES)"; \
  99. (cd ../common-src; make listlibsrc); \
  100. f="$$f "`cat ../common-src/listlibsrc.output`; \
  101. (cd ../server-src; make listlibsrc); \
  102. f="$$f "`cat ../server-src/listlibsrc.output`; \
  103. echo $(LINT) $$f; \
  104. $(LINT) $(LINTFLAGS) $(CPPFLAGS) $(DEFS) -I. -I$(top_builddir)/config \
  105. $(INCLUDES) $$f; \
  106. if [ $$? -ne 0 ]; then \
  107. exit 1; \
  108. fi; \
  109. done; \
  110. exit 0