]> git.sur5r.net Git - bacula/bacula/blobdiff - bacula/src/win32/Makefile
Update Win32/64 table creation to have new DB version 11 format
[bacula/bacula] / bacula / src / win32 / Makefile
index 335114c8022aca4772bc6bbe9b480d7737103e0f..171b5fe15c75f11175ac1a5b6bdd468b2daa3bfd 100644 (file)
@@ -1,22 +1,67 @@
 ECHO_CMD=@
 
-DIRS=  dll \
+ifeq ($(WIN64),yes)
+ DIRS= lib \
+       filed \
+       filed/plugins \
+       console \
+       scripts
+
+  INSTALLER=win64_installer
+
+  SPECIAL=bsmtp
+else
+ DIRS= lib \
        cats \
        filed \
+       filed/plugins \
        dird \
        stored \
        console \
        wx-console \
        tools \
-       scripts \
-       installer
+       scripts 
+
+  INSTALLER=win32_installer
 
-.PHONY: $(DIRS) clean all
+  SPECIAL=
+endif
+
+.PHONY: $(DIRS) clean all Makefile.inc win32_installer newinstaller \
+        win64_installer bsmtp
+
+all: Makefile.inc $(DIRS) $(SPECIAL) $(INSTALLER)
+
+clean: $(DIRS) win32_installer newinstaller win64_installer
+       $(ECHO_CMD)-rm -rf release32 release64
+
+newinstaller:
+       @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" ; \
+          fi ; \
+       fi
+
+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" ; \
+          fi ; \
+       fi
 
-all: Makefile.inc $(DIRS)
+win64_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" ; \
+          fi ; \
+       fi
 
-clean: $(DIRS)
-       $(ECHO_CMD)-rm -rf release
 
 $(DIRS):
        @if test -f Makefile.inc; then \
@@ -27,26 +72,46 @@ $(DIRS):
           fi ; \
        fi
 
-Makefile.inc: Makefile.inc.in
+bsmtp:
+       @if test -f Makefile.inc; then \
+          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" ; \
+          fi ; \
+       fi
+
+
+
+Makefile.inc:
        @echo Creating $@
        $(ECHO_CMD)TOPDIR=`(cd ../../..;pwd)`; \
-       if test -e ../../../cross-tools/mingw32/bin/mingw32-gcc; then \
+       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; \
+               DEPKGSDIR=depkgs-mingw-w64; \
+               DEPKGSDIR32=depkgs-mingw32; \
+       elif test -e $${TOPDIR}/cross-tools/mingw32/bin/mingw32-gcc; then \
                BINDIR=$${TOPDIR}/cross-tools/mingw32/bin; \
                INCDIR=$${TOPDIR}/cross-tools/mingw32/mingw32/include; \
                DLLDIR=$${TOPDIR}/cross-tools/mingw32/mingw32/bin; \
-       elif test -e /mingw/bin/mingw32-gcc; then \
-               BINDIR=/mingw/bin; \
-               INCDIR=/mingw/include; \
-               DLLDIR=/mingw/bin; \
+               DEPKGSDIR=depkgs-mingw32; \
+               DEPKGSDIR32=depkgs-mingw32; \
        else \
                echo "\nThe GCC cross compiler isn't installed."; \
                echo "You must run build-win32-cross-tools and build-dependencies first.\n"; \
                exit 1; \
        fi ; \
-       $(ECHO_CMD)BUILDDIR=`(pwd)`; \
+       BUILDDIR=`(pwd)`; \
+       MAINDIR=`(cd ../..;pwd)`; \
        sed \
-               -e "s^@BUILDDIR@^$${BUILDDIR}^" \
-               -e "s^@TOPDIR@^$${TOPDIR}^" \
-               -e "s^@BINDIR@^$${BINDIR}^" \
-               -e "s^@INCDIR@^$${INCDIR}^" \
-               -e "s^@DLLDIR@^$${DLLDIR}^" < Makefile.inc.in > $@
+               -e "s^@WIN64@^$${WIN64}^" \
+               -e "s^@WIN32DEPKGS@^$${DEPKGSDIR}^" \
+               -e "s^@WIN32DEPKGS32@^$${DEPKGSDIR32}^" \
+               -e "s^@WIN32BUILDDIR@^$${BUILDDIR}^" \
+               -e "s^@WIN32MAINDIR@^$${MAINDIR}^" \
+               -e "s^@WIN32TOPDIR@^$${TOPDIR}^" \
+               -e "s^@WIN32BINDIR@^$${BINDIR}^" \
+               -e "s^@WIN32INCDIR@^$${INCDIR}^" \
+               -e "s^@WIN32DLLDIR@^$${DLLDIR}^" < Makefile.inc.in > $@