1 # Makefile for Amanda tape changer programs.
3 INCLUDES = -I$(top_builddir)/common-src \
4 -I$(top_srcdir)/common-src \
5 -I$(top_srcdir)/server-src \
6 -I$(top_srcdir)/tape-src
9 LINTFLAGS=@AMLINTFLAGS@
14 CHIO_SCSI = chg-scsi-chio
21 libexec_PROGRAMS = $(CHG_SCSI)
22 EXTRA_PROGRAMS = $(CHIO_SCSI)
24 libexec_SCRIPTS = chg-manual chg-multi chg-mtx \
25 chg-rth chg-chs chg-chio \
26 chg-zd-mtx chg-juke chg-rait \
27 chg-null chg-mcutil chg-disk \
30 CLEANFILES = $(libexec_SCRIPTS)
33 # Because libamanda includes routines (e.g. regex) provided by some system
34 # libraries, and because of the way libtool sets up the command line, we
35 # need to list libamanda twice here, first to override the system library
36 # routines, and second to pick up any references in the other libraries.
39 LDADD = ../common-src/libamanda.$(LIB_EXTENSION) \
40 ../server-src/libamserver.$(LIB_EXTENSION) \
41 ../tape-src/libamtape.$(LIB_EXTENSION) \
42 ../common-src/libamanda.$(LIB_EXTENSION) \
47 chg_scsi_CSRC = chg-scsi.c scsi-aix.c scsi-changer-driver.c \
48 scsi-hpux_new.c scsi-irix.c scsi-linux.c scsi-solaris.c \
49 scsi-bsd.c scsi-cam.c sense.c
50 chg_scsi_SOURCES = libscsi.h scsi-defs.h $(chg_scsi_CSRC)
52 chg_scsi_chio_CSRC = chg-scsi-chio.c scsi-hpux.c scsi-chio.c
53 chg_scsi_chio_SOURCES = libscsi.h $(chg_scsi_chio_CSRC)
55 EXTRA_DIST = scsi-proto.c
60 -test -z "$(PERL)" || $(PERL) -c $@
67 @list="$(sbin_PROGRAMS) $(sbin_SCRIPTS)"; \
69 pa=$(DESTDIR)$(sbindir)/`echo $$p|sed '$(transform)'`; \
70 echo chown $(BINARY_OWNER) $$pa; \
71 chown $(BINARY_OWNER) $$pa; \
72 echo chgrp $(SETUID_GROUP) $$pa; \
73 chgrp $(SETUID_GROUP) $$pa; \
75 @list="$(libexec_PROGRAMS) $(libexec_SCRIPTS)"; \
77 pa=$(DESTDIR)$(libexecdir)/`echo $$p|sed '$(transform)'`; \
78 echo chown $(BINARY_OWNER) $$pa; \
79 chown $(BINARY_OWNER) $$pa; \
80 echo chgrp $(SETUID_GROUP) $$pa; \
81 chgrp $(SETUID_GROUP) $$pa; \
85 @ for p in $(libexec_PROGRAMS) $(EXTRA_PROGRAMS); do \
86 f="$$p.c $(libamandad_la_SOURCES)"; \
87 (cd ../common-src; make listlibsrc); \
88 f="$$f "`cat ../common-src/listlibsrc.output`; \
89 (cd ../server-src; make listlibsrc); \
90 f="$$f "`cat ../server-src/listlibsrc.output`; \
91 (cd ../tape-src; make listlibsrc); \
92 f="$$f "`cat ../tape-src/listlibsrc.output`; \
94 $(LINT) $(LINTFLAGS) $(CPPFLAGS) $(DEFS) -I. -I../config \
96 if [ $$? -ne 0 ]; then \