]> git.sur5r.net Git - bacula/bacula/blob - bacula/src/dird/Makefile.in
Fix distclean to wipe CVS
[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 first_rule: all
22 dummy:
23
24 #
25 SVRSRCS = dird.c authenticate.c autoprune.c \
26           backup.c \
27           catreq.c dird_conf.c \
28           fd_cmds.c getmsg.c job.c \
29           mountreq.c msgchan.c newvol.c \
30           recycle.c restore.c run_conf.c \
31           scheduler.c sql_cmds.c \
32           ua_cmds.c ua_dotcmds.c \
33           ua_db_query.c ua_retention.c \
34           ua_input.c ua_output.c ua_prune.c \
35           ua_purge.c ua_restore.c ua_run.c \
36           ua_select.c ua_server.c \
37           ua_status.c verify.c
38 SVROBJS = dird.o authenticate.o autoprune.o \
39           backup.o \
40           catreq.o dird_conf.o \
41           fd_cmds.o getmsg.o job.o \
42           mountreq.o msgchan.o newvol.o \
43           recycle.o restore.o run_conf.o \
44           scheduler.o sql_cmds.o \
45           ua_cmds.o ua_dotcmds.o \
46           ua_db_query.o ua_retention.o \
47           ua_input.o ua_output.o ua_prune.o \
48           ua_purge.o ua_restore.o ua_run.o \
49           ua_select.o ua_server.o \
50           ua_status.o verify.o
51
52 # these are the objects that are changed by the .configure process
53 EXTRAOBJS = @OBJLIST@
54
55 .SUFFIXES:      .c .o
56 .PHONY:
57 .DONTCARE:
58
59 # inference rules
60 .c.o:
61         $(CXX) $(DEFS) $(DEBUG) -c $(CPPFLAGS) -I$(srcdir) -I$(basedir) $(DINCLUDE) $(CFLAGS) $<
62 #-------------------------------------------------------------------------
63 all: Makefile bacula-dir
64         @echo "==== Make of dird is good ===="
65         @echo " "
66
67 bacula-dir:  $(SVROBJS) ../lib/libbac.a ../cats/libsql.a ../findlib/libfind.a
68         $(CXX) $(LDFLAGS) $(DIR_LDFLAGS) -L../lib -L../cats -L../findlib -o $@ $(SVROBJS) \
69               -lsql -lbac -lfind -lm $(LIBS) $(DLIB) $(DB_LIBS)
70
71 static-bacula-dir:  $(SVROBJS) ../lib/libbac.a ../cats/libsql.a ../findlib/libfind.a
72         $(CXX) $(LDFLAGS) $(DIR_LDFLAGS) -L../lib -L../cats -L../findlib -o $@ $(SVROBJS) \
73               -lsql -lbac -lfind -lm $(LIBS) $(DLIB) $(DB_LIBS)
74         strip $@
75
76
77 Makefile: $(srcdir)/Makefile.in $(topdir)/config.status
78         cd $(topdir) \
79           && CONFIG_FILES=$(thisdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
80
81 clean:
82         @$(RMF) dird bacula-dir core core.* a.out *.o *.bak *~ *.intpro *.extpro 1 2 3
83
84 realclean: clean
85         @$(RMF) tags bacula-dir.conf
86
87 distclean: realclean
88         if test $(srcdir) = .; then $(MAKE) realclean; fi
89         (cd $(srcdir); $(RMF) Makefile; $(RMF) -r CVS)
90
91 install: all
92         $(INSTALL_PROGRAM) bacula-dir $(DESTDIR)$(sbindir)/bacula-dir
93         @srcconf=bacula-dir.conf; \
94         if  test -f ${DESTDIR}${sysconfdir}/$$srcconf; then \
95            destconf=$$srcconf.new; \
96            echo "  ==> Found existing $$srcconf, installing new conf file as $$destconf"; \
97         else \
98            destconf=$$srcconf; \
99         fi; \
100         echo "${INSTALL_DATA} $$srcconf ${DESTDIR}${sysconfdir}/$$destconf"; \
101         ${INSTALL_DATA} $$srcconf ${DESTDIR}${sysconfdir}/$$destconf
102         if  test -f ${DESTDIR}${sysconfdir}/query.sql; then \
103            $(MV) -f ${DESTDIR}${sysconfdir}/query.sql ${DESTDIR}${sysconfdir}/query.sql.save; \
104         fi 
105         ${INSTALL_DATA} query.sql ${DESTDIR}${sysconfdir}/query.sql
106
107
108 uninstall:
109         (cd $(DESTDIR)$(sbindir); $(RMF) bacula-dir)
110         (cd $(DESTDIR)$(sysconfdir); $(RMF) bacula-dir.conf)
111         (cd $(DESTDIR)$(sysconfdir); $(RMF) query.sql)
112
113
114
115 # Semi-automatic generation of dependencies:
116 # Use gcc -MM because X11 `makedepend' doesn't work on all systems
117 # and it also includes system headers.
118 # `semi'-automatic since dependencies are generated at distribution time.
119
120 depend:
121         @$(MV) Makefile Makefile.bak
122         @$(SED) "/^# DO NOT DELETE:/,$$ d" Makefile.bak > Makefile
123         @$(ECHO) "# DO NOT DELETE: nice dependency list follows" >> Makefile
124         @$(CC) -S -M $(CPPFLAGS) $(XINC) -I$(srcdir) -I$(basedir) $(SQL_INC) *.c >> Makefile
125         @if test -f Makefile ; then \
126             $(RMF) Makefile.bak; \
127         else \
128            $(MV) Makefile.bak Makefile; \
129            echo -e "Something went wrong\n\a"; \
130         fi
131
132 # -----------------------------------------------------------------------
133 # DO NOT DELETE: nice dependency list follows