1 # Makefile for Amanda restore programs.
3 include $(top_srcdir)/config/automake/vars.am
4 include $(top_srcdir)/config/automake/installperms.am
5 include $(top_srcdir)/config/automake/precompile.am
7 INCLUDES = -I$(top_builddir)/common-src \
8 -I$(top_srcdir)/common-src \
9 -I$(top_srcdir)/device-src \
10 -I$(top_srcdir)/server-src \
11 -I$(top_srcdir)/amandad-src \
12 -I$(top_srcdir)/gnulib
14 AM_CFLAGS = $(AMANDA_WARNING_CFLAGS)
15 AM_LDFLAGS = $(AMANDA_STATIC_LDFLAGS)
18 LINTFLAGS=$(AMLINTFLAGS)
20 amlib_LTLIBRARIES = librestore.la
23 sbin_PROGRAMS = amrestore amfetchdump
25 amlibexec_PROGRAMS = amidxtaped
28 # Because libamanda includes routines (e.g. regex) provided by some system
29 # libraries, and because of the way libtool sets up the command line, we
30 # need to list libamanda twice here, first to override the system library
31 # routines, and second to pick up any references in the other libraries.
34 LDADD = librestore.$(LIB_EXTENSION) \
35 ../common-src/libamanda.$(LIB_EXTENSION) \
38 amidxtaped_LDADD = $(LDADD) \
39 ../gnulib/libgnu.$(LIB_EXTENSION) \
40 ../amandad-src/libamandad.$(LIB_EXTENSION)
42 amidxtaped_SOURCES = amidxtaped.c
44 amfetchdump_SOURCES = amfetchdump.c
46 librestore_la_SOURCES = restore.c
47 librestore_la_LDFLAGS = -release $(VERSION)
48 librestore_la_LIBADD = ../common-src/libamanda.$(LIB_EXTENSION) \
49 ../server-src/libamserver.$(LIB_EXTENSION) \
50 ../device-src/libamdevice.$(LIB_EXTENSION)
52 noinst_HEADERS = restore.h
55 dest=$(sbindir) chown=amanda $(sbin_PROGRAMS) \
56 dest=$(amlibexecdir) chown=amanda $(amlibexec_PROGRAMS)
59 @ for p in $(amlibexec_PROGRAMS) $(sbin_PROGRAMS); do \
60 p=`basename $$p $(EXEEXT)`; \
61 f="$$p.c $(librestore_la_SOURCES)"; \
62 (cd ../common-src; make listlibsrc); \
63 f="$$f "`cat ../common-src/listlibsrc.output`; \
64 (cd ../server-src; make listlibsrc); \
65 f="$$f "`cat ../server-src/listlibsrc.output`; \
67 $(LINT) $(LINTFLAGS) $(CPPFLAGS) $(DEFS) -I. -I$(top_builddir)/config \
69 if [ $$? -ne 0 ]; then \