2 # makefile to build Windows specific pieces of the Bacula File daemon
10 # Program to install `make'.
11 INSTALL_PROGRAM = @INSTALL_PROGRAM@
12 # Program to install the man page.
13 INSTALL_DATA = @INSTALL_DATA@
14 # Generic install program.
24 # this dir relative to top dir
25 thisdir = src/filed/win32
27 # Common prefix for machine-independent installed files.
29 sysconfdir = @sysconfdir@
37 BACOBJS = winabout.o winevents.o winservice.o winstat.o wintray.o winmain.o
39 all: winlib.a winres.res
43 winlib.a: $(BACOBJS) winres.res
46 winres.res: winres.rc bacula.ico winres.h idle.ico running.ico error.ico
47 windres $< -O coff -o $@
49 winmain.o: winmain.cpp winbacula.h
55 email.exe: email.o libmymapi32.a
56 $(CC) ${CFLAGS} -L. -o email email.o -luser32 -lgdi32 -lmymapi32
58 libmymapi32.a: mymapi32.def
59 dlltool --as=as -k --output-lib $@ --def $<
61 Makefile: $(srcdir)/Makefile.in $(topdir)/config.status
63 && CONFIG_FILES=$(thisdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
66 rm -f *.exe *.o *.res *.a 1 2 3
67 rm -f bin/bacula-fd.exe bin/smtp.exe bin/testfind.exe
74 @mkdir -p $(sbindir) /tmp $(sbindir)/../working
75 @echo "Installing system binary files ..."
76 @strip ../bacula-fd.exe
77 @strip ../../tools/smtp.exe
78 @strip ../../tools/testfind.exe
79 @strip ../../console/console.exe
80 @cp -f ../bacula-fd.exe bin/
81 @cp -f ../../tools/smtp.exe bin/
82 @cp -f ../../tools/testfind.exe bin/
83 @cp -f ../../console/console.exe bin/
84 @cp -f bin/* $(sbindir)
85 @cp -f ../bacula-fd.conf $(sysconfdir)/bacula-fd.conf.new
86 @cp -f ../../console/console.conf $(sysconfdir)/console.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/smtp.exe
97 @strip ../../tools/testfind.exe
98 @strip ../../console/console.exe
99 @echo "Copying executables ..."
100 @cp -f ../bacula-fd.exe wr/$(sbindir)/bacula-fd.exe
101 @cp -f ../../tools/smtp.exe wr/$(sbindir)/smtp.exe
102 @cp -f ../../tools/testfind.exe wr/$(sbindir)/testfind.exe
103 @cp -f ../../console/console.exe wr/$(sbindir)/console.exe
104 @echo "Copying bacula-fd.conf..."
105 @cp -f ../bacula-fd.conf wr/$(sysconfdir)/bacula-fd.conf.new
106 @cp -f ../../console/console.conf wr/$(sysconfdir)/console.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 $(CFLAGS) $<
124 $(CXX) -c $(CFLAGS) $<