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