1 # Makefile for Amanda client programs.
3 include $(top_srcdir)/config/automake/vars.am
4 include $(top_srcdir)/config/automake/scripts.am
5 include $(top_srcdir)/config/automake/installperms.am
6 include $(top_srcdir)/config/automake/precompile.am
8 INCLUDES = -I$(top_builddir)/common-src \
9 -I$(top_srcdir)/common-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 amlib_LTLIBRARIES = libamclient.la
21 amlibexec_PROGRAMS = noop calcsize killpgrp rundump runtar selfcheck sendbackup sendsize
23 amlibexec_SCRIPTS = patch-system
25 SCRIPTS_PERL = $(sbin_SCRIPTS)
26 SCRIPTS_SHELL = $(amlibexec_SCRIPTS)
28 libamclient_la_SOURCES= amandates.c getfsent.c \
29 unctime.c client_util.c
31 libamclient_la_SOURCES += findpass.c
34 libamclient_la_LDFLAGS = -release $(VERSION)
35 libamclient_la_LIBADD = ../common-src/libamanda.la
38 # Because libamanda includes routines (e.g. regex) provided by some system
39 # libraries, and because of the way libtool sets up the command line, we
40 # need to list libamanda twice here, first to override the system library
41 # routines, and second to pick up any references in the other libraries.
44 LDADD = ../common-src/libamanda.la \
46 ../amandad-src/libamandad.la \
47 ../common-src/libamanda.la \
50 # these are used for testing only:
53 EXTRA_PROGRAMS = $(TEST_PROGS)
55 CLEANFILES += *.test.c
58 sendbackup_SOURCES = sendbackup.c sendbackup.h \
59 sendbackup-dump.c sendbackup-gnutar.c
61 noinst_HEADERS = amandates.h getfsent.h \
62 findpass.h client_util.h
64 INSTALLPERMS_exec = chown=amanda \
65 dest=$(amlibexecdir) $(amlibexec_PROGRAMS)
67 INSTALLPERMS_data = chown=amanda \
68 dest=$(sbindir) $(sbin_SCRIPTS) \
69 dest=$(amlibexecdir) $(amlibexec_SCRIPTS)
72 INSTALLPERMS_exec += dest=$(amlibexecdir) chown=root chmod=04750 \
73 calcsize killpgrp rundump runtar
77 @ for p in $(amlibexec_PROGRAMS); do \
78 p=`basename $$p $(EXEEXT)`; \
79 f="$$p.c $(libamclient_la_SOURCES)"; \
80 (cd ../common-src; make listlibsrc); \
81 f="$$f "`cat ../common-src/listlibsrc.output`; \
83 $(LINT) $(LINTFLAGS) $(CPPFLAGS) $(DEFS) -I. -I$(top_builddir)/config \
85 if [ $$? -ne 0 ]; then \
91 getfsent_SOURCES = getfsent.test.c
93 %.test.c: $(srcdir)/%.c
94 echo '#define TEST' >$@
95 echo '#include "$<"' >>$@