]> git.sur5r.net Git - bacula/bacula/blob - bacula/src/filed/Makefile.in
Fix space in filename bug -- see kes11Jun02
[bacula/bacula] / bacula / src / filed / Makefile.in
1 @MCOMMON@
2
3 srcdir =        .
4 VPATH =         .
5 .PATH:          .
6
7 # one up
8 basedir = ..
9 # top dir
10 topdir = ../..
11 # this dir relative to top dir
12 thisdir = src/filed
13
14 DEBUG=@DEBUG@
15
16 first_rule: all
17 dummy:
18
19 #
20 SVRSRCS = filed.c authenticate.c backup.c estimate.c \
21           filed_conf.c job.c \
22           restore.c status.c verify.c
23 SVROBJS = filed.o authenticate.o backup.o estimate.o \
24           filed_conf.o job.o \
25           restore.o status.o verify.o
26
27 # these are the objects that are changed by the .configure process
28 EXTRAOBJS = @OBJLIST@
29
30 FDLIBS = @FDLIBS@                 # extra libs for File daemon
31
32 # extra items for linking on Win32
33 WIN32OBJS = win32/winmain.o win32/winlib.a win32/winres.res
34 win32 = $(WIN32OBJS) -luser32 -lgdi32
35
36 WIN32LIBS = $(@WIN32@)
37
38 .SUFFIXES:      .c .o
39 .PHONY:
40 .DONTCARE:
41
42 # inference rules
43 .c.o:
44         $(CXX) $(DEFS) $(DEBUG) -c $(CPPFLAGS) -I$(srcdir) -I$(basedir) $(DINCLUDE) $(CFLAGS) $<
45 #-------------------------------------------------------------------------
46 all: Makefile @WIN32@ bacula-fd       
47         @echo "==== Make of filed is good ===="
48         @echo " "
49
50 win32/winlib.a:
51         (cd win32; $(MAKE))
52         @rm -f bacula-fd.exe
53
54 win32/winmain.o:
55         (cd win32; $(MAKE))
56         @rm -f bacula-fd.exe
57
58 win32/winres.res:
59         (cd win32; $(MAKE))
60         @rm -f bacula-fd.exe
61
62 # win32 libraries if needed
63 win32:  $(WIN32OBJS)
64         (cd win32; $(MAKE))
65         @rm -f bacula-fd.exe
66
67 bacula-fd:  $(SVROBJS) ../findlib/libfind.a ../lib/libbac.a @WIN32@
68         $(CXX) $(LDFLAGS) -L../lib -L../findlib -o $@ $(SVROBJS) \
69           $(WIN32LIBS) $(FDLIBS) -lfind -lbac -lm $(LIBS) $(DLIB)
70
71 Makefile: $(srcdir)/Makefile.in $(topdir)/config.status
72         cd $(topdir) \
73           && CONFIG_FILES=$(thisdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
74
75 clean:
76         @$(RMF) bacula-fd filed core core.* a.out *.o *.bak *~ *.intpro *.extpro 1 2 3
77         if test -f win32/Makefile; then \
78            (cd win32; $(MAKE) clean); \
79         fi
80
81 realclean: clean
82         @$(RMF) tags bacula-fd.conf
83
84 distclean: realclean
85         if test $(srcdir) = .; then $(MAKE) realclean; fi
86         (cd $(srcdir); $(RMF) Makefile)
87         if test -f win32/Makefile; then \
88            (cd win32; $(MAKE) distclean); \
89         fi
90
91 install: all
92         $(INSTALL_PROGRAM) bacula-fd $(DESTDIR)$(sbindir)/bacula-fd 
93         @srcconf=bacula-fd.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
103 uninstall:
104         (cd $(DESTDIR)$(sbindir); $(RMF) bacula-fd)
105         (cd $(DESTDIR)$(sbindir); $(RMF) bacula-fd.conf)
106
107
108
109 # Semi-automatic generation of dependencies:
110 # Use gcc -MM because X11 `makedepend' doesn't work on all systems
111 # and it also includes system headers.
112 # `semi'-automatic since dependencies are generated at distribution time.
113
114 depend:
115         @$(MV) Makefile Makefile.bak
116         @$(SED) "/^# DO NOT DELETE:/,$$ d" Makefile.bak > Makefile
117         @$(ECHO) "# DO NOT DELETE: nice dependency list follows" >> Makefile
118         @$(CC) -S -M $(CPPFLAGS) $(XINC) -I$(srcdir) -I$(basedir) $(SQL_INC) *.c >> Makefile
119         @if test -f Makefile ; then \
120             $(RMF) Makefile.bak; \
121         else \
122            $(MV) Makefile.bak Makefile; \
123            echo -e "Something went wrong\n\a"; \
124         fi
125
126 # -----------------------------------------------------------------------
127 # DO NOT DELETE: nice dependency list follows