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 bin/testfind.exe
73 @mkdir -p $(sbindir) /tmp $(sbindir)/../working
74 @echo "Installing system binary files ..."
75 @strip ../bacula-fd.exe
76 @strip ../../tools/smtp.exe
77 @strip ../../tools/testfind.exe
78 @strip ../../console/console.exe
79 @cp -f ../bacula-fd.exe bin/
80 @cp -f ../../tools/smtp.exe bin/
81 @cp -f ../../tools/testfind.exe bin/
82 @cp -f ../../console/console.exe bin/
83 @cp -f bin/* $(sbindir)
84 @cp -f ../bacula-fd.conf $(sysconfdir)/bacula-fd.conf.new
85 @cp -f ../../console/console.conf $(sysconfdir)/console.conf.new
87 # Make a Win32 binary release
91 @mkdir -p wr/$(prefix) wr/$(sbindir) wr/$(sbindir)/../working wr/$(sysconfdir) wr/tmp
92 @echo "Copying system binary files ..."
93 @cp bin/* wr/$(sbindir)
94 @strip ../bacula-fd.exe
95 @strip ../../tools/smtp.exe
96 @strip ../../tools/testfind.exe
97 @strip ../../console/console.exe
98 @echo "Copying executables ..."
99 @cp -f ../bacula-fd.exe wr/$(sbindir)/bacula-fd.exe
100 @cp -f ../../tools/smtp.exe wr/$(sbindir)/smtp.exe
101 @cp -f ../../tools/testfind.exe wr/$(sbindir)/testfind.exe
102 @cp -f ../../console/console.exe wr/$(sbindir)/console.exe
103 @echo "Copying bacula-fd.conf..."
104 @cp -f ../bacula-fd.conf wr/$(sysconfdir)/bacula-fd.conf.new
105 @cp -f ../../console/console.conf wr/$(sysconfdir)/console.conf.new
106 # the two dummy files are necessary to insure that WinZip
107 # actually creates the directories.
108 @echo "dummy" >wr/tmp/dummy.txt
109 @echo "dummy" >wr/$(sbindir)/../working/dummy.txt
110 @echo "Making tar file ..."
111 @tar cfz winbacula-${VERSION}.tar.gz -C wr bacula tmp
112 @mv -f winbacula-${VERSION}.tar.gz $(topdir)/..
115 echo "Tar file in: `pwd`/winbacula-${VERSION}.tar.gz")
120 $(CC) -c $(CFLAGS) $<
123 $(CC) -c $(CFLAGS) $<