2 # makefile to build Windows specific pieces of the Bacula File daemon
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.
27 # this dir relative to top dir
28 thisdir = src/filed/win32
30 # Common prefix for machine-independent installed files.
32 sysconfdir = @sysconfdir@
40 BACOBJS = winabout.o winevents.o winservice.o winstat.o wintray.o winmain.o
42 all: winlib.a winres.res
46 winlib.a: $(BACOBJS) winres.res
49 winres.res: winres.rc bacula.ico winres.h idle.ico running.ico error.ico warn.ico
50 windres $< -O coff -o $@
52 winmain.o: winmain.cpp winbacula.h
53 $(CC) -c $(WCFLAGS) $(CFLAGS) $<
55 libmymapi32.a: mymapi32.def
56 dlltool --as=as -k --output-lib $@ --def $<
58 Makefile: $(srcdir)/Makefile.in $(topdir)/config.status
60 && CONFIG_FILES=$(thisdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
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
74 @mkdir -p $(DESTDIR)$(sbindir) $(DESTDIR)/tmp $(DESTDIR)$(sbindir)/../working
75 @echo "Installing system binary files ..."
76 @strip ../bacula-fd.exe
77 @strip ../../tools/bsmtp.exe
78 @strip ../../tools/testfind.exe
79 @strip ../../console/bconsole.exe
80 @cp -f ../bacula-fd.exe bin/
81 @cp -f ../../tools/bsmtp.exe bin/
82 @cp -f ../../tools/testfind.exe bin/
83 @cp -f ../../console/bconsole.exe bin/
84 @cp -f bin/* $(DESTDIR)$(sbindir)
85 @cp -f ../bacula-fd.conf $(DESTDIR)$(sysconfdir)/bacula-fd.conf.new
86 @cp -f ../../console/bconsole.conf $(DESTDIR)$(sysconfdir)/bconsole.conf.new
88 # Make a Win32 binary release
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/bsmtp.exe
97 @strip ../../tools/testfind.exe
98 @strip ../../console/bconsole.exe
99 @echo "Copying executables ..."
100 @cp -f ../bacula-fd.exe wr/$(sbindir)/bacula-fd.exe
101 @cp -f ../../tools/bsmtp.exe wr/$(sbindir)/bsmtp.exe
102 @cp -f ../../tools/testfind.exe wr/$(sbindir)/testfind.exe
103 @cp -f ../../console/bconsole.exe wr/$(sbindir)/bconsole.exe
104 @echo "Copying bacula-fd.conf..."
105 @cp -f ../bacula-fd.conf wr/$(sysconfdir)/bacula-fd.conf.new
106 @cp -f ../../console/bconsole.conf wr/$(sysconfdir)/bconsole.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)/..
116 echo "Tar file in: `pwd`/winbacula-${VERSION}.tar.gz")
121 $(CC) -c $(WCFLAGS) $(CFLAGS) $<
124 $(CXX) -c $(WCFLAGS) $(CFLAGS) $<