1 # Makefile for Amanda file recovery programs.
3 INCLUDES = -I$(top_builddir)/common-src \
4 -I$(top_srcdir)/common-src \
5 -I$(top_srcdir)/client-src
8 LINTFLAGS=@AMLINTFLAGS@
12 sbin_PROGRAMS = amoldrecover
14 if WANT_RUNTIME_PSEUDO_RELOC
15 AM_LDFLAGS = -Wl,-enable-runtime-pseudo-reloc
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) \
27 ../client-src/libamclient.$(LIB_EXTENSION) \
29 ../common-src/libamanda.$(LIB_EXTENSION)
31 amoldrecover_CSRC = amrecover.c \
32 display_commands.c extract_list.c \
35 amoldrecover_SOURCES = $(amoldrecover_CSRC) uparse.y uscan.l
37 noinst_HEADERS = amrecover.h uparse.h
41 # so that uscan.c is never generated before uparse.h
42 # otherwise we might have makedepend problems
43 $(srcdir)/uscan.c: $(srcdir)/uparse.h
45 uscan.$(OBJEXT): $(srcdir)/uscan.c
46 $(CC) $(CFLAGS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(CPPFLAGS) -c $<
48 uparse.$(OBJEXT): $(srcdir)/uparse.c
49 $(CC) $(CFLAGS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(CPPFLAGS) -c $<
53 @list="$(sbin_PROGRAMS)"; \
55 pa=$(DESTDIR)$(sbindir)/`echo $$p|sed '$(transform)'`; \
56 echo chown $(BINARY_OWNER) $$pa; \
57 chown $(BINARY_OWNER) $$pa; \
58 echo chgrp $(SETUID_GROUP) $$pa; \
59 chgrp $(SETUID_GROUP) $$pa; \
60 echo chmod o-rwx $$pa; \
66 @ f="$(amoldrecover_CSRC)"; \
67 (cd ../common-src; make listlibsrc); \
68 f="$$f "`cat ../common-src/listlibsrc.output`; \
69 (cd ../server-src; make listlibsrc); \
70 f="$$f "`cat ../server-src/listlibsrc.output`; \
72 $(LINT) $(LINTFLAGS) $(CPPFLAGS) $(DEFS) -I. -I../config $(INCLUDES) $$f;\
73 if [ $$? -ne 0 ]; then \