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)
21 sbin_PROGRAMS = amrecover
24 # Because libamanda includes routines (e.g. regex) provided by some system
25 # libraries, and because of the way libtool sets up the command line, we
26 # need to list libamanda twice here, first to override the system library
27 # routines, and second to pick up any references in the other libraries.
30 LDADD = ../common-src/libamanda.$(LIB_EXTENSION) \
33 ../client-src/libamclient.$(LIB_EXTENSION) \
34 ../common-src/libamanda.$(LIB_EXTENSION)
36 amrecover_CSRC = amrecover.c \
37 display_commands.c extract_list.c \
40 amrecover_SOURCES = $(amrecover_CSRC) uparse.y uscan.l
42 noinst_HEADERS = amrecover.h uparse.h
46 # so that uscan.c is never generated before uparse.h
47 # otherwise we might have makedepend problems
50 # these two commands are specially defined to omit $(AMANDA_WARNING_CFLAGS)
51 # since we don't want warnings for generated code
52 uscan.$(OBJEXT): uscan.c
53 $(CC) $(CFLAGS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(CPPFLAGS) -c $<
55 uparse.$(OBJEXT): uparse.c
56 $(CC) $(CFLAGS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(CPPFLAGS) -c $<
59 dest=$(sbindir) chown=amanda chmod=0750 $(sbin_PROGRAMS)
62 @f="$(amrecover_CSRC)"; \
63 (cd ../common-src; make listlibsrc); \
64 f="$$f "`cat ../common-src/listlibsrc.output`; \
65 (cd ../server-src; make listlibsrc); \
66 f="$$f "`cat ../server-src/listlibsrc.output`; \
68 $(LINT) $(LINTFLAGS) $(CPPFLAGS) $(DEFS) -I. -I$(top_builddir)/config $(INCLUDES) $$f;\
69 if [ $$? -ne 0 ]; then \