ECHO_CMD=@
-DIRS= lib \
+ifeq ($(WIN64),yes)
+ DIRS= lib \
+ filed \
+ filed/plugins \
+ scripts
+else
+ DIRS= lib \
cats \
filed \
filed/plugins \
console \
wx-console \
tools \
- scripts
+ scripts
+endif
.PHONY: $(DIRS) clean all Makefile.inc installer newinstaller
all: Makefile.inc $(DIRS) installer newinstaller
+
clean: $(DIRS) installer newinstaller
$(ECHO_CMD)-rm -rf release
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 ../../../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 ../../../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"; \
BUILDDIR=`(pwd)`; \
MAINDIR=`(cd ../..;pwd)`; \
sed \
+ -e "s^@WIN64@^$${WIN64}^" \
+ -e "s^@WIN32DEPKGS@^$${DEPKGSDIR}^" \
+ -e "s^@WIN32DEPKGS32@^$${DEPKGSDIR32}^" \
-e "s^@WIN32BUILDDIR@^$${BUILDDIR}^" \
-e "s^@WIN32MAINDIR@^$${MAINDIR}^" \
-e "s^@WIN32TOPDIR@^$${TOPDIR}^" \
TOPDIR := @WIN32TOPDIR@
#
# where we find depkgs
-DEPKGS := $(TOPDIR)/depkgs-mingw32
+DEPKGS := $(TOPDIR)/@WIN32DEPKGS@
+DEPKGS32 := $(TOPDIR)/@WIN32DEPKGS32@
DOCDIR := $(TOPDIR)/docs
BINDIR := $(BUILDDIR)/release
AR := $(MINGW_BIN)/mingw32-ar
RANLIB := $(MINGW_BIN)/mingw32-ranlib
WINDRES := $(MINGW_BIN)/mingw32-windres
-DLLTOOL := $(MINGW_BIN)/../mingw32/bin/dlltool
+DLLTOOL := $(MINGW_BIN)/mingw32-dlltool
OBJCPY := $(MINGW_BIN)/mingw32-objcopy
-NSIS_DIR := $(DEPKGS)/nsis
-STAB2CV := $(DEPKGS)/tools/bin/stab2cv
+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
+else
+ CFLAGS := -g -Wall -mno-cygwin -m32 -mwin32 -mthreads -O3 -fno-strict-aliasing
+ LIBS_NETWORK := -lwsock32
+ WIN_VERSION := 32
+endif
-CFLAGS := -g -Wall -mno-cygwin -m32 -mwin32 -mthreads -O3 -fno-strict-aliasing
LDFLAGS := -g -Wall -mno-cygwin -Wl,--disable-auto-import
INCLUDE_DDK := -I$(MINGW_INCLUDE)/ddk
LIBS_BACULA := \
$(LIBDIR)/libbacula.a
-LIBS_NETWORK := -lwsock32
-
HAVES := \
-DHAVE_WIN32 \
-DHAVE_MINGW \
cd .../bacula/src/win32/lib
make (to build the .o files, note the link will fail)
- ./make_def >bacula.def
+ ./make_def >bacula32.def # or >bacula64.def
This should rebuild the bacula.def file, but it uses relative paths
and assumes you have the directory structure noted above. If you
top of the make_def file to use an absolute path to the correct
directory.
-===== manual changing of bacula.def no longer necessary =====
+===== manual changing of bacula32.def or bacula64.def no longer necessary =====
If you want to do it manually, please see below:
Exporting a function requires a bit more work. You must determine the
C++ mangled name of the new function.
the new function. Remove the leading underscore and place the result
in the file
- .../bacula/src/win32/lib/bacula.def
-=== end manual changing of bacula.def ==========
+ .../bacula/src/win32/lib/bacula32.def
+=== end manual changing of bacula32.def or bacula64.def ==========
If you add a new file, you will need to specify its name in
@echo "Cleaning `pwd`"
$(call clean_obj,$(ALL_OBJS))
$(call clean_exe,$(BINDIR)/bacula.dll)
- $(ECHO_CMD)rm -f $(OBJDIR)/bacula.a $(LIBDIR)/libbacula.a
+ $(ECHO_CMD)rm -f $(OBJDIR)/bacula.a $(LIBDIR)/libbacula.a bacula.def
#
# Rules for generating from ../lib
$(call checkdir,$@)
$(ECHO_CMD)$(CXX) $(LDFLAGS) -mdll -mwindows -Wl,--out-implib,$(OBJDIR)/bacula.a $^ $(LIBS_DLL) -o $@
-bacula.def: bacula32.def
- $(ECHO_CMD)cp bacula32.def bacula.def
+bacula.def: bacula$(WIN_VERSION).def
+ $(ECHO_CMD)cp bacula$(WIN_VERSION).def bacula.def
include ../Makefile.rules
* About Dialog
*/
IDD_ABOUT DIALOG 0, 0, 250, 145
+#ifndef MINGW64
STYLE DS_SETFONT | DS_MODALFRAME | DS_CENTER | WS_POPUP | WS_CAPTION | WS_SYSMENU
+#endif
CAPTION "About Bacula"
FONT 8, "MS Sans Serif"
BEGIN
+#ifndef MINGW64
DEFPUSHBUTTON "OK",IDOK,190,120,50,15
+#endif
// CONTROL "\3", IDC_BACULABMP,"Static",SS_ICON | SS_CENTERIMAGE |
// SS_SUNKEN,7,5,73,65
-#ifndef HAVE_MINGW
+#if !defined(HAVE_MINGW) && !defined(MINGW64)
CONTROL IDB_BACULABMP,IDB_BACULABMP,"Static",SS_BITMAP|SS_SUNKEN,7,5,32,32
#endif
* Status Dialog
*/
IDD_STATUS DIALOGEX 0, 0, 411, 244
+#ifndef MINGW64
STYLE DS_SETFONT | DS_3DLOOK | DS_CENTER | WS_MINIMIZEBOX | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU | WS_THICKFRAME
+#endif
CAPTION "Bacula Status"
FONT 8, "Courier New"
BEGIN
+#ifndef MINGW64
DEFPUSHBUTTON "&OK",IDOK,355,5,51,15
EDITTEXT IDC_TEXTDISPLAY, 2, 2, 350, 240, WS_VSCROLL | WS_HSCROLL | WS_BORDER | ES_READONLY | ES_MULTILINE
+#endif
END