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