Imported Upstream version 3.2.0
[debian/amanda] / oldrecover-src / Makefile.am
1 # Makefile for Amanda file recovery programs.
2
3 include $(top_srcdir)/config/automake/vars.am
4 include $(top_srcdir)/config/automake/installperms.am
5 include $(top_srcdir)/config/automake/precompile.am
6
7 INCLUDES =      -I$(top_builddir)/common-src \
8                 -I$(top_srcdir)/common-src   \
9                 -I$(top_srcdir)/client-src   \
10                 -I$(top_srcdir)/gnulib
11
12 AM_CFLAGS = $(AMANDA_WARNING_CFLAGS)
13 AM_LDFLAGS = $(AMANDA_STATIC_LDFLAGS)
14
15 LINT=$(AMLINT)
16 LINTFLAGS=$(AMLINTFLAGS)
17
18 sbin_PROGRAMS =         amoldrecover
19
20 ###
21 # Because libamanda includes routines (e.g. regex) provided by some system
22 # libraries, and because of the way libtool sets up the command line, we
23 # need to list libamanda twice here, first to override the system library
24 # routines, and second to pick up any references in the other libraries.
25 ###
26
27 LDADD = ../common-src/libamanda.la \
28         @LEXLIB@ \
29         $(READLINE_LIBS) \
30         ../client-src/libamclient.la \
31         ../common-src/libamanda.la
32
33 amoldrecover_CSRC =     amrecover.c                                     \
34                         display_commands.c              extract_list.c  \
35                         help.c                          set_commands.c
36
37 amoldrecover_SOURCES =  $(amoldrecover_CSRC)    uparse.y        uscan.l
38
39 noinst_HEADERS =        amrecover.h uparse.h
40
41 AM_YFLAGS =             -d
42
43 # so that uscan.c is never generated before uparse.h
44 # otherwise we might have makedepend problems
45 uscan.c: uparse.h
46
47 # these two commands are specially defined to omit $(AMANDA_WARNING_CFLAGS)
48 # since we don't want warnings for generated code
49 uscan.$(OBJEXT): uscan.c
50         $(CC) $(CFLAGS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(CPPFLAGS) -c $<
51
52 uparse.$(OBJEXT): uparse.c
53         $(CC) $(CFLAGS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(CPPFLAGS) -c $<
54
55
56 lint:
57         @ f="$(amoldrecover_CSRC)";                                             \
58         (cd ../common-src; make listlibsrc);                                    \
59         f="$$f "`cat ../common-src/listlibsrc.output`;                          \
60         (cd ../server-src; make listlibsrc);                                    \
61         f="$$f "`cat ../server-src/listlibsrc.output`;                          \
62         echo $(LINT) $$f;                                                       \
63         $(LINT) $(LINTFLAGS) $(CPPFLAGS) $(DEFS) -I. -I$(top_builddir)/config $(INCLUDES) $$f;\
64         if [ $$? -ne 0 ]; then                                                  \
65             exit 1;                                                             \
66         fi;                                                                     \
67         exit 0