2 # Makefile for win32 bacula executables
3 # Using MinGW cross-compiler on GNU/Linux
5 # Written by Robert Nelson, June 2006
7 # Absolute paths used in place of relative paths
8 # Kern Sibbald, October 2008
9 # Split Win32 and Win64 objects and binaries. However
10 # the clean is a significant kludge -- hard coded.
11 # The object directories are deleted during make clean,
12 # so don't point them to any source directory.
15 # Global Configuration
19 # Main Bacula source dir
20 MAINDIR := @WIN32MAINDIR@
22 # Build dir -- i.e. normally src/win32
23 BUILDDIR := @WIN32BUILDDIR@
25 # Dir above Bacula where we find depkgs
26 TOPDIR := @WIN32TOPDIR@
28 # where we find depkgs
29 DEPKGS := $(TOPDIR)/@WIN32DEPKGS@
30 DEPKGS32 := $(TOPDIR)/@WIN32DEPKGS32@
32 DOCDIR := $(TOPDIR)/docs
34 MINGW_BIN := @WIN32BINDIR@
35 MINGW_INCLUDE := @WIN32INCDIR@
36 MINGW_DLLDIR := @WIN32DLLDIR@
38 CC = $(MINGW_BIN)/mingw32-g++ $(DEFINES) $(INCLUDES)
39 CXX = $(MINGW_BIN)/mingw32-g++ $(DEFINES) $(INCLUDES)
40 AR := $(MINGW_BIN)/mingw32-ar
41 RANLIB := $(MINGW_BIN)/mingw32-ranlib
42 WINDRES := $(MINGW_BIN)/mingw32-windres
43 DLLTOOL := $(MINGW_BIN)/mingw32-dlltool
44 OBJCPY := $(MINGW_BIN)/mingw32-objcopy
45 NSIS_DIR := $(DEPKGS32)/nsis
46 STAB2CV := $(DEPKGS32)/tools/bin/stab2cv
51 CFLAGS := -g -Wall -mno-cygwin -mthreads -O3 -fno-strict-aliasing -DHAVE_VSS64
52 LIBS_NETWORK := -lws2_32
54 BINDIR := $(BUILDDIR)/release64
55 LIBDIR := $(BUILDDIR)/release64
58 CFLAGS := -g -Wall -mno-cygwin -m32 -mwin32 -mthreads -O3 -fno-strict-aliasing
59 LIBS_NETWORK := -lwsock32
61 BINDIR := $(BUILDDIR)/release32
62 LIBDIR := $(BUILDDIR)/release32
66 OBJDIRS := obj32 obj64
68 LDFLAGS := -g -Wall -mno-cygwin -Wl,--disable-auto-import
70 INCLUDE_DDK := -I$(MINGW_INCLUDE)/ddk
71 INCLUDE_BACULA := -I$(MAINDIR)/src -I$(BUILDDIR)/compat
72 INCLUDE_PTHREADS := -I$(DEPKGS)/include/pthreads
73 INCLUDE_ZLIB := -I$(DEPKGS)/include
74 INCLUDE_VSS := -I$(DEPKGS)/vss
75 INCLUDE_ICONS := -I../libwin32
76 INCLUDE_OPENSSL := -I$(DEPKGS)/include
77 INCLUDE_WX := -I$(DEPKGS)/lib/wx_dll/msw -I$(DEPKGS)/include
78 INCLUDE_MYSQL := -I$(DEPKGS)/include/mysql
84 $(DEPKGS)/lib/libpthreadGCE.a
90 $(DEPKGS)/lib/libmysql.a
96 $(DEPKGS)/lib/libsqlite3.a
99 $(DEPKGS)/lib/libssl.dll.a
102 $(DEPKGS)/lib/libcrypto.dll.a
105 $(DEPKGS)/lib/wx_dll/libwxmsw28_core.a \
106 $(DEPKGS)/lib/wx_dll/libwxbase28.a
112 $(LIBDIR)/libbacula.a