2 # Makefile for win32 bacula executables
3 # Using MinGW cross-compiler on GNU/Linux
5 # Written by Robert Nelson, June 2006
6 # Absolute paths used in place of relative paths
7 # Kern Sibbald, October 2008
10 # Global Configuration
14 # Main Bacula source dir
17 # Build dir -- i.e. normally src/win32
18 BUILDDIR := @BUILDDIR@
20 # Dir above Bacula where we find depkgs
23 # where we find depkgs
24 DEPKGS := $(TOPDIR)/depkgs-mingw32
26 DOCDIR := $(TOPDIR)/docs
27 BINDIR := $(BUILDDIR)/release
28 LIBDIR := $(BUILDDIR)/release
32 MINGW_INCLUDE := @INCDIR@
33 MINGW_DLLDIR := @DLLDIR@
35 CC = $(MINGW_BIN)/mingw32-g++ $(DEFINES) $(INCLUDES)
36 CXX = $(MINGW_BIN)/mingw32-g++ $(DEFINES) $(INCLUDES)
37 AR := $(MINGW_BIN)/mingw32-ar
38 RANLIB := $(MINGW_BIN)/mingw32-ranlib
39 WINDRES := $(MINGW_BIN)/mingw32-windres
40 DLLTOOL := $(MINGW_BIN)/../mingw32/bin/dlltool
41 OBJCPY := $(MINGW_BIN)/mingw32-objcopy
42 NSIS_DIR := $(DEPKGS)/nsis
43 STAB2CV := $(DEPKGS)/tools/bin/stab2cv
45 CFLAGS := -g -Wall -mno-cygwin -m32 -mwin32 -mthreads -O3 -fno-strict-aliasing
46 LDFLAGS := -g -Wall -mno-cygwin -Wl,--disable-auto-import
48 INCLUDE_DDK := -I$(MINGW_INCLUDE)/ddk
49 INCLUDE_BACULA := -I$(MAINDIR)/src -I$(BUILDDIR)/compat
50 INCLUDE_PTHREADS := -I$(DEPKGS)/include/pthreads
51 INCLUDE_ZLIB := -I$(DEPKGS)/include
52 INCLUDE_VSS := -I$(DEPKGS)/vss
53 INCLUDE_ICONS := -I../libwin32
54 INCLUDE_OPENSSL := -I$(DEPKGS)/include
55 INCLUDE_WX := -I$(DEPKGS)/lib/wx_dll/msw -I$(DEPKGS)/include
56 INCLUDE_MYSQL := -I$(DEPKGS)/include/mysql
62 $(DEPKGS)/lib/libpthreadGCE.a
68 $(DEPKGS)/lib/libmysql.a
74 $(DEPKGS)/lib/libsqlite3.a
77 $(DEPKGS)/lib/libssl.dll.a
80 $(DEPKGS)/lib/libcrypto.dll.a
83 $(DEPKGS)/lib/wx_dll/libwxmsw28_core.a \
84 $(DEPKGS)/lib/wx_dll/libwxbase28.a