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 $(MAKE) -C tools clean
38 $(ECHO_CMD)-rm -rf release32 release64
41 (cd ../qt-console; ./make-win32)
44 @if test -f Makefile.inc; then \
45 if $(MAKE) -C $@ $(MAKECMDGOALS); then \
46 echo "\n===== Make of $@ succeeded =====\n\n" ; \
48 echo "\n!!!!! Make of $@ failed !!!!!\n\n" ; exit 1; \
53 @if test -f Makefile.inc; then \
54 if $(MAKE) -C $@ $(MAKECMDGOALS); then \
55 echo "\n===== Make of $@ succeeded =====\n\n" ; \
57 echo "\n!!!!! Make of $@ failed !!!!!\n\n" ; exit 1; \
62 @if test -f Makefile.inc; then \
63 if $(MAKE) -C $@ $(MAKECMDGOALS); then \
64 echo "\n===== Make of $@ succeeded =====\n\n" ; \
66 echo "\n!!!!! Make of $@ failed !!!!!\n\n" ; exit 1; \
72 @if test -f Makefile.inc; then \
73 if $(MAKE) -C $@ $(MAKECMDGOALS); then \
74 echo "\n===== Make of $@ succeeded =====\n\n" ; \
76 echo "\n!!!!! Make of $@ failed !!!!!\n\n" ; exit 1; \
81 @if test -f Makefile.inc; then \
82 if $(MAKE) -C tools bsmtp $(MAKECMDGOALS); then \
83 echo "\n===== Make of tools/bsmtp succeeded =====\n\n" ; \
85 echo "\n!!!!! Make of tools/bsmtp failed !!!!!\n\n" ; exit 1; \
93 $(ECHO_CMD)TOPDIR=`(cd ../../..;pwd)`; \
94 TOPDIR=$${DEPKGS:-$${TOPDIR}}; \
95 if test "$(win64)" = yes -a -e $${TOPDIR}/cross-tools/mingw-w64/bin/x86_64-pc-mingw32-gcc; then \
96 BINDIR=$${TOPDIR}/cross-tools/mingw-w64/bin; \
97 INCDIR=$${TOPDIR}/cross-tools/mingw-w64/x86_64-pc-mingw32/include; \
98 DLLDIR=$${TOPDIR}/cross-tools/mingw-w64/x86_64-pc-mingw32/bin; \
99 DEPKGSDIR=depkgs-mingw-w64; \
100 DEPKGSDIR32=depkgs-mingw32; \
101 elif test -e $${TOPDIR}/cross-tools/mingw32/bin/mingw32-gcc; then \
102 BINDIR=$${TOPDIR}/cross-tools/mingw32/bin; \
103 INCDIR=$${TOPDIR}/cross-tools/mingw32/mingw32/include; \
104 DLLDIR=$${TOPDIR}/cross-tools/mingw32/mingw32/bin; \
105 DEPKGSDIR=depkgs-mingw32; \
106 DEPKGSDIR32=depkgs-mingw32; \
108 echo "\nThe GCC cross compiler isn't installed."; \
109 echo "You must run build-win32-cross-tools and build-dependencies first.\n"; \
113 MAINDIR=`(cd ../..;pwd)`; \
115 -e "s^@WIN64@^$${win64}^" \
116 -e "s^@BAT@^$${bat}^" \
117 -e "s^@WIN32DEPKGS@^$${DEPKGSDIR}^" \
118 -e "s^@WIN32DEPKGS32@^$${DEPKGSDIR32}^" \
119 -e "s^@WIN32BUILDDIR@^$${BUILDDIR}^" \
120 -e "s^@WIN32MAINDIR@^$${MAINDIR}^" \
121 -e "s^@WIN32TOPDIR@^$${TOPDIR}^" \
122 -e "s^@WIN32BINDIR@^$${BINDIR}^" \
123 -e "s^@WIN32INCDIR@^$${INCDIR}^" \
124 -e "s^@WIN32DLLDIR@^$${DLLDIR}^" < Makefile.inc.in > $@