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
15 MAINDIR := @WIN32MAINDIR@
17 # Build dir -- i.e. normally src/win32
18 BUILDDIR := @WIN32BUILDDIR@
20 # Dir above Bacula where we find depkgs
21 TOPDIR := @WIN32TOPDIR@
23 # where we find depkgs
24 DEPKGS := $(TOPDIR)/@WIN32DEPKGS@
25 DEPKGS32 := $(TOPDIR)/@WIN32DEPKGS32@
27 DOCDIR := $(TOPDIR)/docs
28 BINDIR := $(BUILDDIR)/release
29 LIBDIR := $(BUILDDIR)/release
32 MINGW_BIN := @WIN32BINDIR@
33 MINGW_INCLUDE := @WIN32INCDIR@
34 MINGW_DLLDIR := @WIN32DLLDIR@
36 CC = $(MINGW_BIN)/mingw32-g++ $(DEFINES) $(INCLUDES)
37 CXX = $(MINGW_BIN)/mingw32-g++ $(DEFINES) $(INCLUDES)
38 AR := $(MINGW_BIN)/mingw32-ar
39 RANLIB := $(MINGW_BIN)/mingw32-ranlib
40 WINDRES := $(MINGW_BIN)/mingw32-windres
41 DLLTOOL := $(MINGW_BIN)/mingw32-dlltool
42 OBJCPY := $(MINGW_BIN)/mingw32-objcopy
43 NSIS_DIR := $(DEPKGS32)/nsis
44 STAB2CV := $(DEPKGS32)/tools/bin/stab2cv
48 CFLAGS := -g -Wall -mno-cygwin -mthreads -O3 -fno-strict-aliasing -DHAVE_VSS64
49 LIBS_NETWORK := -lws2_32
52 CFLAGS := -g -Wall -mno-cygwin -m32 -mwin32 -mthreads -O3 -fno-strict-aliasing
53 LIBS_NETWORK := -lwsock32
57 LDFLAGS := -g -Wall -mno-cygwin -Wl,--disable-auto-import
59 INCLUDE_DDK := -I$(MINGW_INCLUDE)/ddk
60 INCLUDE_BACULA := -I$(MAINDIR)/src -I$(BUILDDIR)/compat
61 INCLUDE_PTHREADS := -I$(DEPKGS)/include/pthreads
62 INCLUDE_ZLIB := -I$(DEPKGS)/include
63 INCLUDE_VSS := -I$(DEPKGS)/vss
64 INCLUDE_ICONS := -I../libwin32
65 INCLUDE_OPENSSL := -I$(DEPKGS)/include
66 INCLUDE_WX := -I$(DEPKGS)/lib/wx_dll/msw -I$(DEPKGS)/include
67 INCLUDE_MYSQL := -I$(DEPKGS)/include/mysql
73 $(DEPKGS)/lib/libpthreadGCE.a
79 $(DEPKGS)/lib/libmysql.a
85 $(DEPKGS)/lib/libsqlite3.a
88 $(DEPKGS)/lib/libssl.dll.a
91 $(DEPKGS)/lib/libcrypto.dll.a
94 $(DEPKGS)/lib/wx_dll/libwxmsw28_core.a \
95 $(DEPKGS)/lib/wx_dll/libwxbase28.a
101 $(LIBDIR)/libbacula.a