PageRenderTime 248ms CodeModel.GetById 70ms app.highlight 95ms RepoModel.GetById 80ms app.codeStats 1ms

/amanda/tags/amanda260p2/restore-src/Makefile.am

#
Makefile | 75 lines | 51 code | 17 blank | 7 comment | 2 complexity | f4756f6864032aafc7a6c9eb583ccc61 MD5 | raw file
 1# Makefile for Amanda restore programs.
 2
 3include $(top_srcdir)/config/automake/installperms.am
 4include $(top_srcdir)/config/automake/precompile.am
 5
 6INCLUDES =	-I$(top_builddir)/common-src \
 7		-I$(top_srcdir)/common-src   \
 8		-I$(top_srcdir)/device-src   \
 9		-I$(top_srcdir)/server-src   \
10		-I$(top_srcdir)/amandad-src  \
11		-I$(top_srcdir)/gnulib
12
13AM_CFLAGS = $(AMANDA_WARNING_CFLAGS)
14AM_LDFLAGS = $(AMANDA_STATIC_LDFLAGS)
15
16LINT=@AMLINT@
17LINTFLAGS=@AMLINTFLAGS@
18
19amlib_LTLIBRARIES =	librestore.la
20LIB_EXTENSION = la
21
22sbin_PROGRAMS = 	amrestore amfetchdump
23
24amlibexec_PROGRAMS = 	amidxtaped
25
26###
27# Because libamanda includes routines (e.g. regex) provided by some system
28# libraries, and because of the way libtool sets up the command line, we
29# need to list libamanda twice here, first to override the system library
30# routines, and second to pick up any references in the other libraries.
31###
32
33LDADD = librestore.$(LIB_EXTENSION)              \
34      ../common-src/libamanda.$(LIB_EXTENSION) \
35      ../gnulib/libgnu.$(LIB_EXTENSION) \
36      $(READLINE_LIBS)
37
38amidxtaped_LDADD = $(LDADD) \
39		   ../gnulib/libgnu.$(LIB_EXTENSION) \
40		   ../amandad-src/libamandad.$(LIB_EXTENSION)
41
42amidxtaped_SOURCES = 	amidxtaped.c
43
44amfetchdump_SOURCES = 	amfetchdump.c
45
46librestore_la_SOURCES	=	restore.c
47librestore_la_LDFLAGS	=	-release $(VERSION)
48librestore_la_LIBADD	=	../common-src/libamanda.$(LIB_EXTENSION) \
49				../server-src/libamserver.$(LIB_EXTENSION) \
50				../device-src/libamdevice.$(LIB_EXTENSION)
51
52noinst_HEADERS = restore.h
53
54INSTALLPERMS_exec = \
55	dest=$(sbindir) chown=amanda $(sbin_PROGRAMS) \
56	dest=$(amlibexecdir) chown=amanda $(amlibexec_PROGRAMS)
57
58lint:
59	@ for p in $(amlibexec_PROGRAMS) $(sbin_PROGRAMS); do			\
60		f="$$p.c $(librestore_la_SOURCES)";				\
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`;			\
65		(cd ../tape-src; make listlibsrc);				\
66		f="$$f "`cat ../tape-src/listlibsrc.output`;			\
67		echo $(LINT) $$f;						\
68		$(LINT) $(LINTFLAGS) $(CPPFLAGS) $(DEFS) -I. -I$(top_builddir)/config	\
69		    $(INCLUDES) $$f;						\
70		if [ $$? -ne 0 ]; then						\
71		    exit 1;							\
72		fi;								\
73	done;									\
74        exit 0
75