1 # Makefile for Amanda tape library.
3 INCLUDES = -I$(top_srcdir)/common-src
5 lib_LTLIBRARIES = libamtape.la
8 sbin_PROGRAMS= ammt amdd amtapetype
10 libamtape_la_SOURCES = output-file.c \
16 libamtape_la_LDFLAGS = -release $(VERSION)
19 # Because libamanda includes routines (e.g. regex) provided by some system
20 # libraries, and because of the way libtool sets up the command line, we
21 # need to list libamanda twice here, first to override the system library
22 # routines, and second to pick up any references in the other libraries.
25 LDADD = ../common-src/libamanda.$(LIB_EXTENSION) \
26 libamtape.$(LIB_EXTENSION) \
27 ../common-src/libamanda.$(LIB_EXTENSION)
29 # used for testing only
33 EXTRA_PROGRAMS = $(TEST_PROGS)
37 amtapetype_SOURCES = tapetype.c
47 @list="$(sbin_PROGRAMS) $(sbin_SCRIPTS)"; \
49 pa=$(DESTDIR)$(sbindir)/`echo $$p|sed '$(transform)'`; \
50 echo chown $(BINARY_OWNER) $$pa; \
51 chown $(BINARY_OWNER) $$pa; \
52 echo chgrp $(SETUID_GROUP) $$pa; \
53 chgrp $(SETUID_GROUP) $$pa; \
55 @list="$(libexec_PROGRAMS) $(libexec_SCRIPTS)"; \
57 pa=$(DESTDIR)$(libexecdir)/`echo $$p|sed '$(transform)'`; \
58 echo chown $(BINARY_OWNER) $$pa; \
59 chown $(BINARY_OWNER) $$pa; \
60 echo chgrp $(SETUID_GROUP) $$pa; \
61 chgrp $(SETUID_GROUP) $$pa; \
64 amtapeio_SOURCES = amtapeio.test.c
65 amtapeio_LDADD = ../common-src/libamanda.$(LIB_EXTENSION) \
66 libamtape.$(LIB_EXTENSION) \
67 ../common-src/libamanda.$(LIB_EXTENSION)
69 amtapeio.test.c: $(srcdir)/tapeio.c
70 echo '#define TEST' >$@
71 echo '#include "$<"' >>$@
73 %.test.c: $(srcdir)/%.c
74 echo '#define TEST' >$@
75 echo '#include "$<"' >>$@
78 @echo "Use amtapetype instead"