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