PageRenderTime 41ms CodeModel.GetById 16ms RepoModel.GetById 0ms app.codeStats 0ms

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

#
Makefile | 127 lines | 100 code | 20 blank | 7 comment | 13 complexity | fb76fd44cc2c7fbf7edf557c0d7e55c6 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. chg_scsi_CSRC = chg-scsi.c scsi-changer-driver.c sense.c
  53. if WANT_SCSI_AIX
  54. chg_scsi_CSRC += scsi-aix.c
  55. endif
  56. if WANT_SCSI_HPUX_NEW
  57. chg_scsi_CSRC += scsi-hpux_new.c
  58. endif
  59. if WANT_SCSI_IRIX
  60. chg_scsi_CSRC += scsi-irix.c
  61. endif
  62. if WANT_SCSI_LINUX
  63. chg_scsi_CSRC += scsi-linux.c
  64. endif
  65. if WANT_SCSI_SOLARIS
  66. chg_scsi_CSRC += scsi-solaris.c
  67. endif
  68. if WANT_SCSI_BSD
  69. chg_scsi_CSRC += scsi-bsd.c
  70. endif
  71. if WANT_SCSI_CAM
  72. chg_scsi_CSRC += scsi-cam.c
  73. endif
  74. chg_scsi_SOURCES = libscsi.h scsi-defs.h $(chg_scsi_CSRC)
  75. chg_scsi_chio_CSRC = chg-scsi-chio.c
  76. if WANT_SCSI_HPUX
  77. chg_scsi_chio_CSRC += scsi-hpux.c
  78. endif
  79. if WANT_SCSI_CHIO
  80. chg_scsi_chio_CSRC += scsi-chio.c
  81. endif
  82. chg_scsi_chio_SOURCES = libscsi.h $(chg_scsi_chio_CSRC)
  83. EXTRA_DIST += scsi-proto.c
  84. INSTALLPERMS_exec = \
  85. chown=amanda \
  86. dest=$(sbindir) $(sbin_PROGRAMS) \
  87. dest=$(amlibexecdir) $(amlibexec_PROGRAMS)
  88. INSTALLPERMS_data = \
  89. chown=amanda \
  90. dest=$(sbindir) $(sbin_SCRIPTS) \
  91. dest=$(amlibexecdir) $(amlibexec_SCRIPTS) $(amlibexec_DATA)
  92. lint:
  93. @ for p in $(amlibexec_PROGRAMS) $(EXTRA_PROGRAMS); do \
  94. p=`basename $$p $(EXEEXT)`; \
  95. f="$$p.c $(libamandad_la_SOURCES)"; \
  96. (cd ../common-src; make listlibsrc); \
  97. f="$$f "`cat ../common-src/listlibsrc.output`; \
  98. (cd ../server-src; make listlibsrc); \
  99. f="$$f "`cat ../server-src/listlibsrc.output`; \
  100. echo $(LINT) $$f; \
  101. $(LINT) $(LINTFLAGS) $(CPPFLAGS) $(DEFS) -I. -I$(top_builddir)/config \
  102. $(INCLUDES) $$f; \
  103. if [ $$? -ne 0 ]; then \
  104. exit 1; \
  105. fi; \
  106. done; \
  107. exit 0