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
45 winres.res: winres.rc bacula.ico winres.h idle.ico running.ico error.ico
46 windres $< -O coff -o $@
48 winmain.o: winmain.cpp winbacula.h
54 email.exe: email.o libmymapi32.a
55 $(CC) ${CFLAGS} -L. -o email email.o -luser32 -lgdi32 -lmymapi32
57 libmymapi32.a: mymapi32.def
58 dlltool --as=as -k --output-lib $@ --def $<
60 Makefile: $(srcdir)/Makefile.in $(topdir)/config.status
62 && CONFIG_FILES=$(thisdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
65 rm -f *.exe *.o *.res *.a 1 2 3
66 rm -f bin/bacula-fd.exe bin/smtp.exe
72 @mkdir -p $(sbindir) /tmp $(sbindir)/../working
73 @echo "Installing system binary files ..."
74 @strip ../bacula-fd.exe
75 @strip ../../lib/smtp.exe
76 @cp -f ../bacula-fd.exe bin/
77 @cp -f ../../lib/smtp.exe bin/
78 @cp -f bin/* $(sbindir)
80 # Make a Win32 binary release
84 @mkdir -p wr/$(prefix) wr/$(sbindir) wr/$(sbindir)/../working wr/$(sysconfdir) wr/tmp
85 @echo "Copying system binary files ..."
86 @cp bin/* wr/$(sbindir)
87 @strip ../bacula-fd.exe
88 @strip ../../lib/smtp.exe
89 @echo "Copying executables ..."
90 @cp -f ../bacula-fd.exe wr/$(sbindir)/bacula-fd.exe
91 @cp -f ../../lib/smtp.exe wr/$(sbindir)/smtp.exe
92 @echo "Copying bacula-fd.conf..."
93 @cp -f ../bacula-fd.conf wr/$(sysconfdir)/bacula-fd.conf
94 # the two dummy files are necessary to insure that WinZip
95 # actually creates the directories.
96 @echo "dummy" >wr/tmp/dummy.txt
97 @echo "dummy" >wr/$(sbindir)/../working/dummy.txt
98 @echo "Making tar file ..."
99 @tar cfz winbacula-${VERSION}.tar.gz -C wr bacula tmp
100 @mv -f winbacula-${VERSION}.tar.gz $(topdir)/..
103 echo "Tar file in: `pwd`/winbacula-${VERSION}.tar.gz")
108 $(CC) -c $(CFLAGS) $<
111 $(CC) -c $(CFLAGS) $<