ef881549e86f1f5033fc71e7359503e09b88f415
[debian/amanda] / application-src / Makefile.am
1 # Makefile for Amanda wrapper programs.
2
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
7
8 INCLUDES =      -I$(top_builddir)/common-src \
9                 -I$(top_srcdir)/common-src \
10                 -I$(top_srcdir)/client-src \
11                 -I$(top_srcdir)/amandad-src \
12                 -I$(top_srcdir)/gnulib
13
14 LINT=$(AMLINT)
15 LINTFLAGS=$(AMLINTFLAGS)
16
17 LIB_EXTENSION = la
18
19 AM_CFLAGS = $(AMANDA_WARNING_CFLAGS)
20 AM_LDFLAGS = $(AMANDA_STATIC_LDFLAGS)
21
22 CHECK_PERL = amgtar_perl \
23              script-email \
24              amlog-script \
25              amzfs-sendrecv \
26              amzfs-snapshot \
27              amsamba
28
29 SCRIPTS_PERL = $(CHECK_PERL)
30
31 SCRIPTS_SHELL = $(amlibexec_SCRIPTS)
32
33 amlibexec_PROGRAMS = teecount
34
35 #We use two variables, applicationdir applicationexecdir, to segregate the
36 #platform-independent (applicationdir) files installed by install-data from the
37 #platform-dependent files (applicationexecdir) installed by install-exec. 
38 #Automake recognizes the 'exec' substring in the variable name.  From the
39 #Automake manual: "Any variable using a user-defined directory prefix with
40 #‘exec’ in the name (e.g., myexecbin_PROGRAMS) is installed by install-exec.
41 #All other user-defined prefixes are installed by install-data." (section 12.2)
42 applicationexecdir = $(APPLICATION_DIR)
43 applicationdir = $(APPLICATION_DIR)
44 applicationexec_PROGRAMS = amgtar amstar
45 applicationexec_SCRIPTS = $(SCRIPTS_PERL)
46
47 LDADD = ../common-src/libamanda.$(LIB_EXTENSION) \
48         ../client-src/libamclient.$(LIB_EXTENSION) \
49         ../amandad-src/libamandad.$(LIB_EXTENSION) \
50         ../common-src/libamanda.$(LIB_EXTENSION) \
51         ../gnulib/libgnu.$(LIB_EXTENSION)
52
53 INSTALLPERMS_exec = dest=$(amlibexecdir) chown=amanda $(amlibexec_PROGRAMS) \
54                     dest=$(applicationdir) chown=amanda $(applicationexec_PROGRAMS) \
55                     dest=$(applicationdir) chown=amanda $(applicationexec_SCRIPTS)
56
57 INSTALLPERMS_data = dest=$(amlibexecdir) chown=amanda $(amlibexec_SCRIPTS)
58
59 if WANT_SETUID_CLIENT
60 INSTALLPERMS_exec += dest=$(applicationdir) chown=root chmod=04750 \
61                      amgtar amstar
62 endif