1 # Makefile for Amanda file recovery 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)/client-src \
10 -I$(top_srcdir)/amandad-src \
11 -I$(top_srcdir)/gnulib
13 AM_CFLAGS = $(AMANDA_WARNING_CFLAGS)
14 AM_LDFLAGS = $(AMANDA_STATIC_LDFLAGS)
17 LINTFLAGS=$(AMLINTFLAGS)
19 sbin_PROGRAMS = amrecover
22 # Because libamanda includes routines (e.g. regex) provided by some system
23 # libraries, and because of the way libtool sets up the command line, we
24 # need to list libamanda twice here, first to override the system library
25 # routines, and second to pick up any references in the other libraries.
28 LDADD = ../common-src/libamanda.la \
31 ../client-src/libamclient.la \
32 ../common-src/libamanda.la
34 amrecover_CSRC = amrecover.c \
35 display_commands.c extract_list.c \
38 amrecover_SOURCES = $(amrecover_CSRC) uparse.y uscan.l
40 noinst_HEADERS = amrecover.h uparse.h
44 # so that uscan.c is never generated before uparse.h
45 # otherwise we might have makedepend problems
48 # these two commands are specially defined to omit $(AMANDA_WARNING_CFLAGS)
49 # since we don't want warnings for generated code
50 uscan.$(OBJEXT): uscan.c ../common-src/amanda.h uparse.h
51 $(CC) $(CFLAGS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(CPPFLAGS) -c $<
53 uparse.$(OBJEXT): uparse.c ../common-src/amanda.h amrecover.h
54 $(CC) $(CFLAGS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(CPPFLAGS) -c $<
57 dest=$(sbindir) chown=amanda chmod=0750 $(sbin_PROGRAMS)
60 @f="$(amrecover_CSRC)"; \
61 (cd ../common-src; make listlibsrc); \
62 f="$$f "`cat ../common-src/listlibsrc.output`; \
63 (cd ../server-src; make listlibsrc); \
64 f="$$f "`cat ../server-src/listlibsrc.output`; \
66 $(LINT) $(LINTFLAGS) $(CPPFLAGS) $(DEFS) -I. -I$(top_builddir)/config $(INCLUDES) $$f;\
67 if [ $$? -ne 0 ]; then \