PageRenderTime 48ms CodeModel.GetById 22ms RepoModel.GetById 0ms app.codeStats 0ms

/amanda/tags/3_1_0_mac01/changer-src/Makefile.am

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