]> git.sur5r.net Git - bacula/bacula/blob - bacula/src/dird/Makefile.in
Alpha integration of Dir plugin
[bacula/bacula] / bacula / src / dird / Makefile.in
1 #
2 #  Bacula Director Makefile
3 #
4 #  Version $Id$
5 #  
6 @MCOMMON@
7
8 srcdir =        .
9 VPATH =         .
10 .PATH:          .
11
12 # one up
13 basedir = ..
14 # top dir
15 topdir = ../..
16 # this dir relative to top dir
17 thisdir = src/dird
18
19 DEBUG=@DEBUG@
20
21 GETTEXT_LIBS = @LIBINTL@
22
23 PYTHON_LIBS = @PYTHON_LIBS@
24 PYTHON_INC = @PYTHON_INCDIR@
25
26 first_rule: all
27 dummy:
28
29 #
30 SVRSRCS = dird.c admin.c authenticate.c \
31           autoprune.c backup.c bsr.c \
32           catreq.c dir-plugins.c dird_conf.c expand.c \
33           fd_cmds.c getmsg.c inc_conf.c job.c \
34           jobq.c migrate.c \
35           mountreq.c msgchan.c next_vol.c newvol.c \
36           pythondir.c \
37           recycle.c restore.c run_conf.c \
38           scheduler.c \
39           ua_acl.c ua_cmds.c ua_dotcmds.c \
40           ua_query.c \
41           ua_input.c ua_label.c ua_output.c ua_prune.c \
42           ua_purge.c ua_restore.c ua_run.c \
43           ua_select.c ua_server.c \
44           ua_status.c ua_tree.c ua_update.c verify.c
45 SVROBJS = dird.o admin.o authenticate.o \
46           autoprune.o backup.o bsr.o \
47           catreq.o dir-plugins.o dird_conf.o expand.o \
48           fd_cmds.o getmsg.o inc_conf.o job.o \
49           jobq.o migrate.o \
50           mountreq.o msgchan.o next_vol.o newvol.o \
51           pythondir.o \
52           recycle.o restore.o run_conf.o \
53           scheduler.o \
54           ua_acl.o ua_cmds.o ua_dotcmds.o \
55           ua_query.o \
56           ua_input.o ua_label.o ua_output.o ua_prune.o \
57           ua_purge.o ua_restore.o ua_run.o \
58           ua_select.o ua_server.o \
59           ua_status.o ua_tree.o ua_update.o verify.o
60
61 # these are the objects that are changed by the .configure process
62 EXTRAOBJS = @OBJLIST@
63
64 .SUFFIXES:      .c .o
65 .PHONY:
66 .DONTCARE:
67
68 # inference rules
69 .c.o:
70         @echo "Compiling $<"
71         $(NO_ECHO)$(CXX) $(DEFS) $(DEBUG) -c $(WCFLAGS) $(CPPFLAGS) $(PYTHON_INC) -I$(srcdir) -I$(basedir) $(DINCLUDE) $(CFLAGS) $<
72 #-------------------------------------------------------------------------
73 all: Makefile bacula-dir @STATIC_DIR@
74         @echo "==== Make of dird is good ===="
75         @echo " "
76
77 bacula-dir:  $(SVROBJS) ../lib/libbac.a ../cats/libsql.a ../findlib/libfind.a
78         @echo "Linking $@ ..."
79         $(CXX) $(WLDFLAGS) $(LDFLAGS) -L../lib -L../cats -L../findlib -o $@ $(SVROBJS) \
80               -lsql -lfind -lbac -lm $(PYTHON_LIBS) $(DLIB) $(DB_LIBS) $(LIBS) \
81               $(WRAPLIBS) $(GETTEXT_LIBS) $(OPENSSL_LIBS)
82
83
84 static-bacula-dir:  $(SVROBJS) ../lib/libbac.a ../cats/libsql.a ../findlib/libfind.a
85         $(CXX) $(WLDFLAGS) $(LDFLAGS) -static -L../lib -L../cats -L../findlib -o $@ $(SVROBJS) \
86               -lsql -lbac -lfind -lm $(PYTHON_LIBS) $(DLIB) $(DB_LIBS) $(LIBS) \
87               $(WRAPLIBS) $(GETTEXT_LIBS) $(OPENSSL_LIBS)
88         strip $@
89
90
91 Makefile: $(srcdir)/Makefile.in $(topdir)/config.status
92         cd $(topdir) \
93           && CONFIG_FILES=$(thisdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
94
95 clean:
96         @$(RMF) dird bacula-dir core core.* a.out *.o *.bak *~ *.intpro *.extpro 1 2 3
97         @$(RMF) static-bacula-dir
98
99 realclean: clean
100         @$(RMF) tags bacula-dir.conf
101
102 distclean: realclean
103         if test $(srcdir) = .; then $(MAKE) realclean; fi
104         (cd $(srcdir); $(RMF) Makefile)
105
106 devclean: realclean
107         if test $(srcdir) = .; then $(MAKE) realclean; fi
108         (cd $(srcdir); $(RMF) Makefile)
109
110 install: all
111         $(INSTALL_PROGRAM) bacula-dir $(DESTDIR)$(sbindir)/bacula-dir
112         @srcconf=bacula-dir.conf; \
113            if  test -f ${DESTDIR}${sysconfdir}/$$srcconf; then \
114               destconf=$$srcconf.new; \
115               echo "  ==> Found existing $$srcconf, installing new conf file as $$destconf"; \
116            else \
117               destconf=$$srcconf; \
118            fi; \
119            echo "${INSTALL_CONFIG} $$srcconf ${DESTDIR}${sysconfdir}/$$destconf"; \
120            ${INSTALL_CONFIG} $$srcconf ${DESTDIR}${sysconfdir}/$$destconf
121         @if  test -f ${DESTDIR}${scriptdir}/query.sql; then \
122            echo "  ==> Saving existing query.sql to query.sql.old"; \
123            $(MV) -f ${DESTDIR}${scriptdir}/query.sql ${DESTDIR}${scriptdir}/query.sql.old; \
124         fi 
125         ${INSTALL_DATA} query.sql ${DESTDIR}${scriptdir}/query.sql
126         @if test -f static-bacula-dir; then \
127            $(INSTALL_PROGRAM) static-bacula-dir $(DESTDIR)$(sbindir)/static-bacula-dir; \
128         fi
129
130
131 uninstall:
132         (cd $(DESTDIR)$(sbindir); $(RMF) bacula-dir)
133         (cd $(DESTDIR)$(sysconfdir); $(RMF) bacula-dir.conf bacula-dir.conf.new)
134         (cd $(DESTDIR)$(scriptdir); $(RMF) query.sql)
135
136
137
138 # Semi-automatic generation of dependencies:
139 # Use gcc -MM because X11 `makedepend' doesn't work on all systems
140 # and it also includes system headers.
141 # `semi'-automatic since dependencies are generated at distribution time.
142
143 depend:
144         @$(MV) Makefile Makefile.bak
145         @$(SED) "/^# DO NOT DELETE:/,$$ d" Makefile.bak > Makefile
146         @$(ECHO) "# DO NOT DELETE: nice dependency list follows" >> Makefile
147         @$(CXX) -S -M $(CPPFLAGS) $(XINC) $(PYTHON_INC) -I$(srcdir) -I$(basedir) $(SQL_INC) *.c >> Makefile
148         @if test -f Makefile ; then \
149             $(RMF) Makefile.bak; \
150         else \
151            $(MV) Makefile.bak Makefile; \
152            echo " ===== Something went wrong in make depend ====="; \
153         fi
154
155 # -----------------------------------------------------------------------
156 # DO NOT DELETE: nice dependency list follows