tools \
scripts
- INSTALLER=win32_installer newinstaller
+ INSTALLER=win32_installer
SPECIAL=
endif
DEPKGS32 := $(TOPDIR)/@WIN32DEPKGS32@
DOCDIR := $(TOPDIR)/docs
-BINDIR := $(BUILDDIR)/release
-LIBDIR := $(BUILDDIR)/release
-OBJDIR := .
MINGW_BIN := @WIN32BINDIR@
MINGW_INCLUDE := @WIN32INCDIR@
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
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
$(ECHO_CMD)$(WINDRES) -O coff $< -o $@
$(OBJDIR)/%.d: %.c
+ $(call checkdir, $@)
$(makedep)
$(OBJDIR)/%.d: %.cpp
+ $(call checkdir, $@)
$(makedep)
ifneq ($(ALL_OBJS),)
$(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
$(LIBS_CRYPTO) \
$(LIBS_PTHREADS) \
$(LIBS_ZLIB) \
- $(LIBS_NETWORK) \
+ $(LIBS_NETWORK) \
-lole32 \
-loleaut32 \
-luuid
@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
$(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
--- /dev/null
+#!/bin/sh
+# Build win32 Bacula
+make
+#
+# Build win64 Bacula
+make WIN64=yes
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 \
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
$(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
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 \
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
$(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
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 \
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
#$(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
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