]> git.sur5r.net Git - bacula/bacula/commitdiff
Separate object/binaries in Win32 and Win64 builds. More to be done.
authorKern Sibbald <kern@sibbald.com>
Sat, 4 Apr 2009 13:09:49 +0000 (13:09 +0000)
committerKern Sibbald <kern@sibbald.com>
Sat, 4 Apr 2009 13:09:49 +0000 (13:09 +0000)
git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@8685 91ce42f0-d328-0410-95d8-f526ca767f89

bacula/src/win32/Makefile
bacula/src/win32/Makefile.inc.in
bacula/src/win32/Makefile.rules
bacula/src/win32/cats/Makefile
bacula/src/win32/lib/Makefile
bacula/src/win32/makeall [new file with mode: 0755]
bacula/src/win32/newinstaller/Makefile
bacula/src/win32/win32_installer/Makefile
bacula/src/win32/win64_installer/Makefile
bacula/technotes

index 61ca0b5cd7852f81f9e9146db64fd2dbb14272e9..3552224f4baeef0418e1bdebf3274c31721dc21c 100644 (file)
@@ -22,7 +22,7 @@ else
        tools \
        scripts 
 
-  INSTALLER=win32_installer newinstaller
+  INSTALLER=win32_installer
 
   SPECIAL=
 endif
index b335ca7ecd6b28fa148a13139dd413f732402abd..3cf3d1f2adf5ad98fe0ec83ac0613ad8f4b94f58 100644 (file)
@@ -25,9 +25,6 @@ DEPKGS := $(TOPDIR)/@WIN32DEPKGS@
 DEPKGS32 := $(TOPDIR)/@WIN32DEPKGS32@
 
 DOCDIR := $(TOPDIR)/docs
-BINDIR := $(BUILDDIR)/release
-LIBDIR := $(BUILDDIR)/release
-OBJDIR := .
 
 MINGW_BIN := @WIN32BINDIR@
 MINGW_INCLUDE := @WIN32INCDIR@
@@ -42,16 +39,23 @@ DLLTOOL := $(MINGW_BIN)/mingw32-dlltool
 OBJCPY := $(MINGW_BIN)/mingw32-objcopy
 NSIS_DIR := $(DEPKGS32)/nsis
 STAB2CV := $(DEPKGS32)/tools/bin/stab2cv
+
 WIN64=@WIN64@
 
 ifeq ($(WIN64),yes)
-        CFLAGS := -g -Wall -mno-cygwin -mthreads -O3 -fno-strict-aliasing -DHAVE_VSS64
-       LIBS_NETWORK := -lws2_32
-       WIN_VERSION := 64
+   CFLAGS := -g -Wall -mno-cygwin -mthreads -O3 -fno-strict-aliasing -DHAVE_VSS64
+   LIBS_NETWORK := -lws2_32
+   WIN_VERSION := 64
+   BINDIR := $(BUILDDIR)/release64
+   LIBDIR := $(BUILDDIR)/release64
+   OBJDIR := obj64
 else
-        CFLAGS := -g -Wall -mno-cygwin -m32 -mwin32 -mthreads -O3 -fno-strict-aliasing
-       LIBS_NETWORK := -lwsock32
-       WIN_VERSION := 32
+   CFLAGS := -g -Wall -mno-cygwin -m32 -mwin32 -mthreads -O3 -fno-strict-aliasing
+   LIBS_NETWORK := -lwsock32
+   WIN_VERSION := 32
+   BINDIR := $(BUILDDIR)/release32
+   LIBDIR := $(BUILDDIR)/release32
+   OBJDIR := obj32
 endif
 
 LDFLAGS := -g -Wall -mno-cygwin -Wl,--disable-auto-import
index 72c93c86ba9e512ca105ad70088f698fd878523d..9e2adc71c558404b98e1c49bcc7e0183479c55d1 100644 (file)
@@ -15,7 +15,7 @@ define clean_exe
 endef
 
 define checkdir
-       @if [ ! -e $(dir $(1)) ]; then mkdir $(dir $(1)); fi
+       @if [ ! -e $(dir $(1)) ]; then mkdir -p $(dir $(1)); fi
 endef
 
 define makedep
@@ -62,9 +62,11 @@ $(OBJDIR)/%.res: %.rc
        $(ECHO_CMD)$(WINDRES) -O coff $< -o $@
 
 $(OBJDIR)/%.d: %.c
+       $(call checkdir, $@)
        $(makedep)
 
 $(OBJDIR)/%.d: %.cpp
+       $(call checkdir, $@)
        $(makedep)
 
 ifneq ($(ALL_OBJS),)
index 1754813dd3f33a1d08382db88d853c1d9b05b989..a713de8516c54c81af21a1f4f532e27344fb149b 100644 (file)
@@ -56,6 +56,7 @@ clean:
        $(ECHO_CMD)rm -f $(OBJDIR)/libcats.exp $(LIBDIR)/libcats.a
 
 $(LIBDIR)/libcats.a $(OBJDIR)/libcats.exp: bacula_cats.def
+       $(call checkdir,$@)
        $(DLLTOOL) --dllname bacula_cats.dll --no-export-all-symbols --input-def bacula_cats.def --output-exp $(OBJDIR)/libcats.exp --output-lib $(LIBDIR)/libcats.a $^
 
 $(BINDIR)/cats_mysql.dll: $(addprefix $(OBJDIR)/cats_mysql/,mysql.o $(SQL_OBJS)) $(OBJDIR)/libcats.exp
index 0504d82fa2fcefcc751ae748e5a6057125c02e5b..15da369e93acec2ce72c7fa0b08b84bc8582f06c 100644 (file)
@@ -109,7 +109,7 @@ LIBS_DLL = \
        $(LIBS_CRYPTO) \
        $(LIBS_PTHREADS) \
        $(LIBS_ZLIB) \
-        $(LIBS_NETWORK) \
+       $(LIBS_NETWORK) \
        -lole32 \
        -loleaut32 \
        -luuid
@@ -126,7 +126,7 @@ clean:
        @echo "Cleaning `pwd`"
        $(call clean_obj,$(ALL_OBJS))
        $(call clean_exe,$(BINDIR)/bacula.dll)
-       $(ECHO_CMD)rm -f $(OBJDIR)/bacula.a $(LIBDIR)/libbacula.a bacula.def
+       $(ECHO_CMD)rm -f $(OBJDIR)/bacula.a $(LIBDIR)/libbacula.a
 
 #
 # Rules for generating from ../lib
@@ -142,14 +142,11 @@ $(LIBDIR)/libbacula.a: $(BINDIR)/bacula.dll $(STATIC_OBJS)
 
 $(BINDIR)/bacula.dll: DLL_DEFINE=BUILDING_DLL
 
-$(BINDIR)/bacula.dll: $(DLL_OBJS) bacula.def
+$(BINDIR)/bacula.dll: $(DLL_OBJS) bacula$(WIN_VERSION).def
        @echo "Linking $@"
        $(call checkdir,$@)
        $(ECHO_CMD)$(CXX) $(LDFLAGS) -mdll -mwindows -Wl,--out-implib,$(OBJDIR)/bacula.a $^ $(LIBS_DLL) -o $@
 
-bacula.def: bacula$(WIN_VERSION).def
-       $(ECHO_CMD)cp bacula$(WIN_VERSION).def bacula.def
-
 include ../Makefile.rules
 
 $(OBJDIR)/%.o: %.c
diff --git a/bacula/src/win32/makeall b/bacula/src/win32/makeall
new file mode 100755 (executable)
index 0000000..5986092
--- /dev/null
@@ -0,0 +1,6 @@
+#!/bin/sh
+# Build win32 Bacula
+make
+#
+# Build win64 Bacula
+make WIN64=yes
index a52659da1ef86b68ad46554fd987ca6a8802363c..2872474ac44a1e8604e938989788d0c7e569d5ff 100644 (file)
@@ -11,11 +11,11 @@ VERSION := $(shell sed -ne 's/.*[ \t]VERSION[ \t][ \t]*"\(.*\)"/\1/p' < ../../ve
 
 DEFINES := \
        -DVERSION=$(VERSION) \
-       -DOUT_DIR=..\\release \
-       -DSRC_DIR=release \
+       -DOUT_DIR=..\\release32 \
+       -DSRC_DIR=release32 \
        -DBUILD_TOOLS=MinGW \
 
-INSTALL_EXE := $(BUILDDIR)/release/winbacula-$(VERSION).exe
+INSTALL_EXE := $(BUILDDIR)/release32/winbacula-$(VERSION).exe
 
 BACULA_BINARIES := \
        bacula.dll \
@@ -130,27 +130,27 @@ installer:        $(INSTALL_EXE)
 clean:
        @echo "Cleaning `pwd`"
        $(CMD_ECHO)-rm -f $(INSTALL_EXE)
-       $(CMD_ECHO)-rm -rf release
+       $(CMD_ECHO)-rm -rf release32
 
 #
 # Rules
 #
 
 define Convert_Binary
-release/$$(notdir $(1)): $(1)
+release32/$$(notdir $(1)): $(1)
        $$(call checkdir,$$@)
        $(ECHO_CMD)cp -f $$^ $$@ ; \
        $(STAB2CV) $$@
 endef
 
 define Copy_Binary
-release/$$(notdir $(1)): $(1)
+release32/$$(notdir $(1)): $(1)
        $$(call checkdir,$$@)
        $(ECHO_CMD)cp -f $$^ $$@
 endef
 
 define Copy_Docs
-release/$(1): $(DOCDIR)/$(1)
+release32/$(1): $(DOCDIR)/$(1)
        $$(call checkdir,$$@)
        $(ECHO_CMD)cp -f $$^ $$(dir $$@)
 endef
@@ -175,7 +175,7 @@ $(foreach file,$(addprefix ../../dird/, $(DIRD_FILES)),$(eval $(call Copy_Binary
 
 $(foreach file,$(DOC_FILES),$(eval $(call Copy_Docs,$(file))))
 
-$(INSTALL_EXE): winbacula.nsi $(addprefix release/,$(BACULA_BINARIES) $(SCRIPT_FILES) $(CAT_FILES) $(DEPKGS_BINARIES) $(NONGCC_BINARIES) $(NONGCC_LIBRARIES) $(MINGW_BINARIES) $(SSL_FILES) $(DIRD_FILES) $(DOC_FILES))
+$(INSTALL_EXE): winbacula.nsi $(addprefix release32/,$(BACULA_BINARIES) $(SCRIPT_FILES) $(CAT_FILES) $(DEPKGS_BINARIES) $(NONGCC_BINARIES) $(NONGCC_LIBRARIES) $(MINGW_BINARIES) $(SSL_FILES) $(DIRD_FILES) $(DOC_FILES))
        NSISDIR=$(NSIS_DIR) \
        $(NSIS_DIR)/makensis -V3 $(DEFINES) winbacula.nsi
 
index a52659da1ef86b68ad46554fd987ca6a8802363c..2872474ac44a1e8604e938989788d0c7e569d5ff 100644 (file)
@@ -11,11 +11,11 @@ VERSION := $(shell sed -ne 's/.*[ \t]VERSION[ \t][ \t]*"\(.*\)"/\1/p' < ../../ve
 
 DEFINES := \
        -DVERSION=$(VERSION) \
-       -DOUT_DIR=..\\release \
-       -DSRC_DIR=release \
+       -DOUT_DIR=..\\release32 \
+       -DSRC_DIR=release32 \
        -DBUILD_TOOLS=MinGW \
 
-INSTALL_EXE := $(BUILDDIR)/release/winbacula-$(VERSION).exe
+INSTALL_EXE := $(BUILDDIR)/release32/winbacula-$(VERSION).exe
 
 BACULA_BINARIES := \
        bacula.dll \
@@ -130,27 +130,27 @@ installer:        $(INSTALL_EXE)
 clean:
        @echo "Cleaning `pwd`"
        $(CMD_ECHO)-rm -f $(INSTALL_EXE)
-       $(CMD_ECHO)-rm -rf release
+       $(CMD_ECHO)-rm -rf release32
 
 #
 # Rules
 #
 
 define Convert_Binary
-release/$$(notdir $(1)): $(1)
+release32/$$(notdir $(1)): $(1)
        $$(call checkdir,$$@)
        $(ECHO_CMD)cp -f $$^ $$@ ; \
        $(STAB2CV) $$@
 endef
 
 define Copy_Binary
-release/$$(notdir $(1)): $(1)
+release32/$$(notdir $(1)): $(1)
        $$(call checkdir,$$@)
        $(ECHO_CMD)cp -f $$^ $$@
 endef
 
 define Copy_Docs
-release/$(1): $(DOCDIR)/$(1)
+release32/$(1): $(DOCDIR)/$(1)
        $$(call checkdir,$$@)
        $(ECHO_CMD)cp -f $$^ $$(dir $$@)
 endef
@@ -175,7 +175,7 @@ $(foreach file,$(addprefix ../../dird/, $(DIRD_FILES)),$(eval $(call Copy_Binary
 
 $(foreach file,$(DOC_FILES),$(eval $(call Copy_Docs,$(file))))
 
-$(INSTALL_EXE): winbacula.nsi $(addprefix release/,$(BACULA_BINARIES) $(SCRIPT_FILES) $(CAT_FILES) $(DEPKGS_BINARIES) $(NONGCC_BINARIES) $(NONGCC_LIBRARIES) $(MINGW_BINARIES) $(SSL_FILES) $(DIRD_FILES) $(DOC_FILES))
+$(INSTALL_EXE): winbacula.nsi $(addprefix release32/,$(BACULA_BINARIES) $(SCRIPT_FILES) $(CAT_FILES) $(DEPKGS_BINARIES) $(NONGCC_BINARIES) $(NONGCC_LIBRARIES) $(MINGW_BINARIES) $(SSL_FILES) $(DIRD_FILES) $(DOC_FILES))
        NSISDIR=$(NSIS_DIR) \
        $(NSIS_DIR)/makensis -V3 $(DEFINES) winbacula.nsi
 
index 8ae5b1f147946fb78de376000f6d1ffdd2f824d5..40cb8724412b2a08106492d4f5459a3f0d6edecd 100644 (file)
@@ -12,12 +12,12 @@ VERSION := $(shell sed -ne 's/.*[ \t]VERSION[ \t][ \t]*"\(.*\)"/\1/p' < ../../ve
 
 DEFINES := \
        -DVERSION=$(VERSION) \
-       -DOUT_DIR=..\\release \
-       -DSRC_DIR=release \
+       -DOUT_DIR=..\\release64 \
+       -DSRC_DIR=release64 \
        -DWINVER=64 \
        -DBUILD_TOOLS=MinGW64 \
 
-INSTALL_EXE := $(BUILDDIR)/release/winbacula-$(VERSION).exe
+INSTALL_EXE := $(BUILDDIR)/release64/winbacula-$(VERSION).exe
 
 BACULA_BINARIES := \
        bacula.dll \
@@ -107,27 +107,27 @@ installer:        $(INSTALL_EXE)
 clean:
        @echo "Cleaning `pwd`"
        $(CMD_ECHO)-rm -f $(INSTALL_EXE)
-       $(CMD_ECHO)-rm -rf release
+       $(CMD_ECHO)-rm -rf release64
 
 #
 # Rules
 #
 
 define Convert_Binary
-release/$$(notdir $(1)): $(1)
+release64/$$(notdir $(1)): $(1)
        $$(call checkdir,$$@)
        $(ECHO_CMD)cp -f $$^ $$@ ; \
        $(STAB2CV) $$@
 endef
 
 define Copy_Binary
-release/$$(notdir $(1)): $(1)
+release64/$$(notdir $(1)): $(1)
        $$(call checkdir,$$@)
        $(ECHO_CMD)cp -f $$^ $$@
 endef
 
 define Copy_Docs
-release/$(1): $(DOCDIR)/$(1)
+release64/$(1): $(DOCDIR)/$(1)
        $$(call checkdir,$$@)
        $(ECHO_CMD)cp -f $$^ $$(dir $$@)
 endef
@@ -154,7 +154,7 @@ $(foreach file,$(addprefix $(DEPKGS32)/ssl/, $(SSL_FILES)),$(eval $(call Copy_Bi
 
 #$(foreach file,$(DOC_FILES),$(eval $(call Copy_Docs,$(file))))
 
-$(INSTALL_EXE): winbacula.nsi $(addprefix release/,$(BACULA_BINARIES) $(DEPKGS_BINARIES) $(DEPKGS32_BINARIES) $(SSL_FILES) )
+$(INSTALL_EXE): winbacula.nsi $(addprefix release64/,$(BACULA_BINARIES) $(DEPKGS_BINARIES) $(DEPKGS32_BINARIES) $(SSL_FILES) )
        NSISDIR=$(NSIS_DIR) \
        $(NSIS_DIR)/makensis -V3 $(DEFINES) winbacula.nsi
 
index 9e7789cf5e90211a539739f006848b6e1150769f..8063f4fc686a9e74651d7ecee6616ac7860c4d55 100644 (file)
@@ -3,6 +3,7 @@
 General:
 
 04Apr09
+kes  Separate object/binaries in Win32 and Win64 builds. More to be done.
 kes  Add bconsole to Win64 installer.
 03Apr09
 kes  Implement more automatic build of Win64 client. Note, there are still