2 # Makefile for Win32/Win64 Bacula File daemon
4 # If called make win64=yes the Win64 version will be built
5 # otherwise the Win32 version will be built.
7 # If called with bat=no, bat will not be built, otherwise it will be
13 WIN32_DIRS=lib filed filed/plugins console scripts
15 WIN64_DIRS=lib filed filed/plugins console scripts
19 INSTALLER=win64_installer
23 INSTALLER=win32_installer
31 .PHONY: $(DIRS) clean all Makefile.inc win32_installer full_win32_installer \
34 all: Makefile.inc $(DIRS) $(SPECIAL) $(INSTALLER)
36 clean: $(DIRS) win32_installer win64_installer
37 $(ECHO_CMD)-rm -rf release32 release64
40 (cd ../qt-console; ./make-win32)
43 @if test -f Makefile.inc; then \
44 if $(MAKE) -C $@ $(MAKECMDGOALS); then \
45 echo "\n===== Make of $@ succeeded =====\n\n" ; \
47 echo "\n!!!!! Make of $@ failed !!!!!\n\n" ; exit 1; \
52 @if test -f Makefile.inc; then \
53 if $(MAKE) -C $@ $(MAKECMDGOALS); then \
54 echo "\n===== Make of $@ succeeded =====\n\n" ; \
56 echo "\n!!!!! Make of $@ failed !!!!!\n\n" ; exit 1; \
61 @if test -f Makefile.inc; then \
62 if $(MAKE) -C $@ $(MAKECMDGOALS); then \
63 echo "\n===== Make of $@ succeeded =====\n\n" ; \
65 echo "\n!!!!! Make of $@ failed !!!!!\n\n" ; exit 1; \
71 @if test -f Makefile.inc; then \
72 if $(MAKE) -C $@ $(MAKECMDGOALS); then \
73 echo "\n===== Make of $@ succeeded =====\n\n" ; \
75 echo "\n!!!!! Make of $@ failed !!!!!\n\n" ; exit 1; \
80 @if test -f Makefile.inc; then \
81 if $(MAKE) -C tools bsmtp $(MAKECMDGOALS); then \
82 echo "\n===== Make of tools/bsmtp succeeded =====\n\n" ; \
84 echo "\n!!!!! Make of tools/bsmtp failed !!!!!\n\n" ; exit 1; \
92 $(ECHO_CMD)TOPDIR=`(cd ../../..;pwd)`; \
93 TOPDIR=$${DEPKGS:-$${TOPDIR}}; \
94 if test "$(WIN64)" = yes -a -e $${TOPDIR}/cross-tools/mingw-w64/bin/x86_64-pc-mingw32-gcc; then \
95 BINDIR=$${TOPDIR}/cross-tools/mingw-w64/bin; \
96 INCDIR=$${TOPDIR}/cross-tools/mingw-w64/x86_64-pc-mingw32/include; \
97 DLLDIR=$${TOPDIR}/cross-tools/mingw-w64/x86_64-pc-mingw32/bin; \
98 DEPKGSDIR=depkgs-mingw-w64; \
99 DEPKGSDIR32=depkgs-mingw32; \
100 elif test -e $${TOPDIR}/cross-tools/mingw32/bin/mingw32-gcc; then \
101 BINDIR=$${TOPDIR}/cross-tools/mingw32/bin; \
102 INCDIR=$${TOPDIR}/cross-tools/mingw32/mingw32/include; \
103 DLLDIR=$${TOPDIR}/cross-tools/mingw32/mingw32/bin; \
104 DEPKGSDIR=depkgs-mingw32; \
105 DEPKGSDIR32=depkgs-mingw32; \
107 echo "\nThe GCC cross compiler isn't installed."; \
108 echo "You must run build-win32-cross-tools and build-dependencies first.\n"; \
112 MAINDIR=`(cd ../..;pwd)`; \
114 -e "s^@WIN64@^$${win64}^" \
115 -e "s^@BAT@^$${bat}^" \
116 -e "s^@WIN32DEPKGS@^$${DEPKGSDIR}^" \
117 -e "s^@WIN32DEPKGS32@^$${DEPKGSDIR32}^" \
118 -e "s^@WIN32BUILDDIR@^$${BUILDDIR}^" \
119 -e "s^@WIN32MAINDIR@^$${MAINDIR}^" \
120 -e "s^@WIN32TOPDIR@^$${TOPDIR}^" \
121 -e "s^@WIN32BINDIR@^$${BINDIR}^" \
122 -e "s^@WIN32INCDIR@^$${INCDIR}^" \
123 -e "s^@WIN32DLLDIR@^$${DLLDIR}^" < Makefile.inc.in > $@