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