2 # makefile to build Windows specific pieces of the Bacula File daemon
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.
23 # this dir relative to top dir
24 thisdir = src/filed/win32
26 # Common prefix for machine-independent installed files.
28 sysconfdir = @sysconfdir@
36 BACOBJS = winabout.o winevents.o winservice.o winstat.o wintray.o winmain.o
38 all: winlib.a winres.res
42 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
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)
81 # Make a Win32 binary release
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)/..
104 echo "Tar file in: `pwd`/winbacula-${VERSION}.tar.gz")
109 $(CC) -c $(CFLAGS) $<
112 $(CC) -c $(CFLAGS) $<