]> git.sur5r.net Git - bacula/bacula/blobdiff - bacula/src/win32/Makefile
Fix some trivial errors and implemented the restore of IRIX xattrs.
[bacula/bacula] / bacula / src / win32 / Makefile
index 171b5fe15c75f11175ac1a5b6bdd468b2daa3bfd..3bea6ece63999e3b23cb2a8c65ff5ea3597abe0a 100644 (file)
@@ -1,46 +1,51 @@
+#
+#  Makefile for Win32/Win64 Bacula File daemon
+#
+#  If called make win64=yes the Win64 version will be built
+#     otherwise the Win32 version will be built.
+#
+#  If called with bat=no, bat will not be built, otherwise it will be
+#     built.
+#
+
 ECHO_CMD=@
 
-ifeq ($(WIN64),yes)
- DIRS= lib \
-       filed \
-       filed/plugins \
-       console \
-       scripts
+WIN32_DIRS=lib filed filed/plugins console scripts
 
-  INSTALLER=win64_installer
+WIN64_DIRS=lib filed filed/plugins console scripts
 
-  SPECIAL=bsmtp
+ifeq ($(win64),yes)
+        DIRS=$(WIN64_DIRS)
+        INSTALLER=win64_installer
+        SPECIAL=bsmtp
 else
- DIRS= lib \
-       cats \
-       filed \
-       filed/plugins \
-       dird \
-       stored \
-       console \
-       wx-console \
-       tools \
-       scripts 
-
-  INSTALLER=win32_installer
-
-  SPECIAL=
+        DIRS=$(WIN32_DIRS)
+        INSTALLER=win32_installer
+        SPECIAL=bat bsmtp
 endif
 
-.PHONY: $(DIRS) clean all Makefile.inc win32_installer newinstaller \
+ifeq ($(bat),no)
+        SPECIAL=bsmtp
+endif       
+
+.PHONY: $(DIRS) clean all Makefile.inc win32_installer full_win32_installer \
         win64_installer bsmtp
 
 all: Makefile.inc $(DIRS) $(SPECIAL) $(INSTALLER)
 
-clean: $(DIRS) win32_installer newinstaller win64_installer
+clean: $(DIRS) win32_installer win64_installer
+       $(MAKE) -C tools clean
        $(ECHO_CMD)-rm -rf release32 release64
 
-newinstaller:
+bat:
+       (cd ../qt-console; ./make-win32)
+
+full_win32_installer:
        @if test -f Makefile.inc; then \
           if $(MAKE) -C $@ $(MAKECMDGOALS); then \
                echo "\n===== Make of $@ succeeded =====\n\n" ; \
           else  \
-               echo "\n!!!!! Make of $@ failed !!!!!\n\n" ; \
+               echo "\n!!!!! Make of $@ failed !!!!!\n\n" ; exit 1; \
           fi ; \
        fi
 
@@ -49,7 +54,7 @@ win32_installer:
           if $(MAKE) -C $@ $(MAKECMDGOALS); then \
                echo "\n===== Make of $@ succeeded =====\n\n" ; \
           else  \
-               echo "\n!!!!! Make of $@ failed !!!!!\n\n" ; \
+               echo "\n!!!!! Make of $@ failed !!!!!\n\n" ; exit 1; \
           fi ; \
        fi
 
@@ -58,7 +63,7 @@ win64_installer:
           if $(MAKE) -C $@ $(MAKECMDGOALS); then \
                echo "\n===== Make of $@ succeeded =====\n\n" ; \
           else  \
-               echo "\n!!!!! Make of $@ failed !!!!!\n\n" ; \
+               echo "\n!!!!! Make of $@ failed !!!!!\n\n" ; exit 1; \
           fi ; \
        fi
 
@@ -68,7 +73,7 @@ $(DIRS):
           if $(MAKE) -C $@ $(MAKECMDGOALS); then \
                echo "\n===== Make of $@ succeeded =====\n\n" ; \
           else  \
-               echo "\n!!!!! Make of $@ failed !!!!!\n\n" ; \
+               echo "\n!!!!! Make of $@ failed !!!!!\n\n" ; exit 1; \
           fi ; \
        fi
 
@@ -77,7 +82,7 @@ bsmtp:
           if $(MAKE) -C tools bsmtp $(MAKECMDGOALS); then \
                echo "\n===== Make of tools/bsmtp succeeded =====\n\n" ; \
           else  \
-               echo "\n!!!!! Make of tools/bsmtp failed !!!!!\n\n" ; \
+               echo "\n!!!!! Make of tools/bsmtp failed !!!!!\n\n" ; exit 1; \
           fi ; \
        fi
 
@@ -86,7 +91,8 @@ bsmtp:
 Makefile.inc:
        @echo Creating $@
        $(ECHO_CMD)TOPDIR=`(cd ../../..;pwd)`; \
-       if test "$(WIN64)" = yes -a -e $${TOPDIR}/cross-tools/mingw-w64/bin/x86_64-pc-mingw32-gcc; then \
+       TOPDIR=$${DEPKGS:-$${TOPDIR}}; \
+       if test "$(win64)" = yes -a -e $${TOPDIR}/cross-tools/mingw-w64/bin/x86_64-pc-mingw32-gcc; then \
                BINDIR=$${TOPDIR}/cross-tools/mingw-w64/bin; \
                INCDIR=$${TOPDIR}/cross-tools/mingw-w64/x86_64-pc-mingw32/include; \
                DLLDIR=$${TOPDIR}/cross-tools/mingw-w64/x86_64-pc-mingw32/bin; \
@@ -106,7 +112,8 @@ Makefile.inc:
        BUILDDIR=`(pwd)`; \
        MAINDIR=`(cd ../..;pwd)`; \
        sed \
-               -e "s^@WIN64@^$${WIN64}^" \
+               -e "s^@WIN64@^$${win64}^" \
+               -e "s^@BAT@^$${bat}^" \
                -e "s^@WIN32DEPKGS@^$${DEPKGSDIR}^" \
                -e "s^@WIN32DEPKGS32@^$${DEPKGSDIR32}^" \
                -e "s^@WIN32BUILDDIR@^$${BUILDDIR}^" \