]> git.sur5r.net Git - bacula/bacula/blob - bacula/src/filed/win32/Makefile.in
Allow restore as non-root
[bacula/bacula] / bacula / src / filed / win32 / Makefile.in
1 #
2 # makefile to build Windows specific pieces of the Bacula File daemon
3 #
4 CFLAGS=@CFLAGS@
5 CC = @CC@
6 CXX = @CXX@
7 RANLIB = @RANLIB@
8 SHELL = /bin/sh
9
10 # Program to install `make'.
11 INSTALL_PROGRAM = @INSTALL_PROGRAM@
12 # Program to install the man page.
13 INSTALL_DATA = @INSTALL_DATA@
14 # Generic install program.
15 INSTALL = @INSTALL@
16
17 VERSION = @VERSION@
18
19
20 # this dir
21 srcdir = .
22 # main dir
23 topdir = ../../..
24 # this dir relative to top dir
25 thisdir = src/filed/win32
26
27 # Common prefix for machine-independent installed files.
28 prefix = @prefix@
29 sysconfdir = @sysconfdir@
30 sbindir = @sbindir@
31 piddir = @piddir@
32
33 SRCS =  shutdown.c
34
35 OBJS =  shutdown.o
36
37 BACOBJS = winabout.o winevents.o winservice.o winstat.o wintray.o winmain.o
38
39 all: winlib.a winres.res 
40
41 win32: winlib.a
42
43 winlib.a: $(BACOBJS) winres.res
44         ar rcs $@ $(BACOBJS)
45
46 winres.res: winres.rc bacula.ico winres.h idle.ico running.ico error.ico
47         windres $< -O coff -o $@
48
49 winmain.o: winmain.cpp winbacula.h
50         $(CC) -c $(CFLAGS) $<
51
52 email.o: email.c
53         $(CC) -c ${CFLAGS} $<
54
55 email.exe: email.o libmymapi32.a
56         $(CC) ${CFLAGS} -L. -o email email.o -luser32 -lgdi32 -lmymapi32
57
58 libmymapi32.a: mymapi32.def
59         dlltool --as=as -k --output-lib $@ --def $<
60
61 Makefile: $(srcdir)/Makefile.in $(topdir)/config.status
62         cd $(topdir) \
63           && CONFIG_FILES=$(thisdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
64
65 clean:
66         rm -f *.exe *.o *.res *.a 1 2 3
67         rm -f bin/bacula-fd.exe bin/smtp.exe bin/testfind.exe
68
69 distclean: clean
70         @rm -f Makefile
71         @rm -rf bin/CVS CVS
72
73 install:
74         @mkdir -p $(sbindir) /tmp $(sbindir)/../working
75         @echo "Installing system binary files ..."
76         @strip ../bacula-fd.exe
77         @strip ../../tools/smtp.exe
78         @strip ../../tools/testfind.exe
79         @strip ../../console/console.exe
80         @cp -f ../bacula-fd.exe bin/
81         @cp -f ../../tools/smtp.exe bin/
82         @cp -f ../../tools/testfind.exe bin/
83         @cp -f ../../console/console.exe bin/
84         @cp -f bin/* $(sbindir)
85         @cp -f ../bacula-fd.conf $(sysconfdir)/bacula-fd.conf.new
86         @cp -f ../../console/console.conf $(sysconfdir)/console.conf.new
87
88 # Make a Win32 binary release 
89 binary-release:
90         @rm -rf wr
91         @mkdir -p wr
92         @mkdir -p wr/$(prefix) wr/$(sbindir) wr/$(sbindir)/../working wr/$(sysconfdir) wr/tmp
93         @echo "Copying system binary files ..."
94         @cp bin/* wr/$(sbindir)
95         @strip ../bacula-fd.exe
96         @strip ../../tools/smtp.exe
97         @strip ../../tools/testfind.exe
98         @strip ../../console/console.exe
99         @echo "Copying executables ..."
100         @cp -f ../bacula-fd.exe wr/$(sbindir)/bacula-fd.exe 
101         @cp -f ../../tools/smtp.exe wr/$(sbindir)/smtp.exe 
102         @cp -f ../../tools/testfind.exe wr/$(sbindir)/testfind.exe 
103         @cp -f ../../console/console.exe wr/$(sbindir)/console.exe 
104         @echo "Copying bacula-fd.conf..."
105         @cp -f ../bacula-fd.conf wr/$(sysconfdir)/bacula-fd.conf.new
106         @cp -f ../../console/console.conf wr/$(sysconfdir)/console.conf.new
107 # the two dummy files are necessary to insure that WinZip
108 # actually creates the directories.
109         @echo "dummy" >wr/tmp/dummy.txt
110         @echo "dummy" >wr/$(sbindir)/../working/dummy.txt
111         @echo "Making tar file ..."
112         @tar cfz winbacula-${VERSION}.tar.gz -C wr bacula tmp
113         @mv -f winbacula-${VERSION}.tar.gz $(topdir)/..
114         @rm -rf wr
115         @(cd $(topdir)/..; \
116            echo "Tar file in: `pwd`/winbacula-${VERSION}.tar.gz")
117
118 dummy:
119
120 .c.o:
121         $(CC) -c $(CFLAGS) $<
122
123 .cpp.o:
124         $(CXX) -c $(CFLAGS) $<