ac4ee903decb687a7ee16a60874c2011a8c3c2ad
[debian/amanda] / restore-src / Makefile.am
1 # Makefile for Amanda restore programs.
2
3 INCLUDES =      -I$(top_builddir)/common-src \
4                 -I$(top_srcdir)/common-src   \
5                 -I$(top_srcdir)/tape-src     \
6                 -I$(top_srcdir)/server-src
7
8 lib_LTLIBRARIES =       librestore.la
9 LIB_EXTENSION = la
10
11 sbin_PROGRAMS =         amrestore amfetchdump
12
13 libexec_PROGRAMS =      amidxtaped
14
15 ###
16 # Because libamanda includes routines (e.g. regex) provided by some system
17 # libraries, and because of the way libtool sets up the command line, we
18 # need to list libamanda twice here, first to override the system library
19 # routines, and second to pick up any references in the other libraries.
20 ###
21
22 LDADD = librestore.$(LIB_EXTENSION) \
23         ../common-src/libamanda.$(LIB_EXTENSION)
24
25 amidxtaped_SOURCES =    amidxtaped.c
26
27 amfetchdump_SOURCES =   amfetchdump.c
28
29 librestore_la_SOURCES   =       restore.c
30 librestore_la_LDFLAGS   =       -release $(VERSION)
31 librestore_la_LIBADD    =       ../common-src/libamanda.$(LIB_EXTENSION) \
32                    ../tape-src/libamtape.$(LIB_EXTENSION) \
33                   ../server-src/libamserver.$(LIB_EXTENSION)
34
35 noinst_HEADERS = restore.h
36
37 install-exec-hook:
38         @list="$(sbin_PROGRAMS)"; \
39         for p in $$list; do \
40                 pa=$(DESTDIR)$(sbindir)/`echo $$p|sed '$(transform)'`; \
41                 echo chown $(BINARY_OWNER) $$pa; \
42                 chown $(BINARY_OWNER) $$pa; \
43                 echo chgrp $(SETUID_GROUP) $$pa; \
44                 chgrp $(SETUID_GROUP) $$pa; \
45         done
46         @list="$(libexec_PROGRAMS)"; \
47         for p in $$list; do \
48                 pa=$(DESTDIR)$(libexecdir)/`echo $$p|sed '$(transform)'`; \
49                 echo chown $(BINARY_OWNER) $$pa; \
50                 chown $(BINARY_OWNER) $$pa; \
51                 echo chgrp $(SETUID_GROUP) $$pa; \
52                 chgrp $(SETUID_GROUP) $$pa; \
53         done