]> git.sur5r.net Git - bacula/bacula/blob - bacula/src/filed/win32/Makefile.in
Initial revision
[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 rc $@ $(BACOBJS)
44         $(RANLIB) $@
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
68
69 distclean: clean
70         rm -f Makefile
71
72 install:
73         @mkdir -p $(sbindir) /tmp $(sbindir)/../working
74         @echo "Installing system binary files ..."
75         @strip ../bacula-fd.exe
76         @strip ../../lib/smtp.exe
77         @cp -f ../bacula-fd.exe bin/
78         @cp -f ../../lib/smtp.exe bin/
79         @cp -f bin/* $(sbindir)
80
81 # Make a Win32 binary release 
82 binary-release:
83         @rm -rf wr
84         @mkdir -p wr
85         @mkdir -p wr/$(prefix) wr/$(sbindir) wr/$(sbindir)/../working wr/$(sysconfdir) wr/tmp
86         @echo "Copying system binary files ..."
87         @cp bin/* wr/$(sbindir)
88         @strip ../bacula-fd.exe
89         @strip ../../lib/smtp.exe
90         @echo "Copying executables ..."
91         @cp -f ../bacula-fd.exe wr/$(sbindir)/bacula-fd.exe 
92         @cp -f ../../lib/smtp.exe wr/$(sbindir)/smtp.exe 
93         @echo "Copying bacula-fd.conf..."
94         @cp -f ../bacula-fd.conf wr/$(sysconfdir)/bacula-fd.conf
95 # the two dummy files are necessary to insure that WinZip
96 # actually creates the directories.
97         @echo "dummy" >wr/tmp/dummy.txt
98         @echo "dummy" >wr/$(sbindir)/../working/dummy.txt
99         @echo "Making tar file ..."
100         @tar cfz winbacula-${VERSION}.tar.gz -C wr bacula tmp
101         @mv -f winbacula-${VERSION}.tar.gz $(topdir)/..
102         @rm -rf wr
103         @(cd $(topdir)/..; \
104            echo "Tar file in: `pwd`/winbacula-${VERSION}.tar.gz")
105
106 dummy:
107
108 .c.o:
109         $(CC) -c $(CFLAGS) $<
110
111 .cpp.o:
112         $(CC) -c $(CFLAGS) $<