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
29 MINGW_BIN := @WIN32BINDIR@
30 MINGW_INCLUDE := @WIN32INCDIR@
31 MINGW_DLLDIR := @WIN32DLLDIR@
33 CC = $(MINGW_BIN)/mingw32-g++ $(DEFINES) $(INCLUDES)
34 CXX = $(MINGW_BIN)/mingw32-g++ $(DEFINES) $(INCLUDES)
35 AR := $(MINGW_BIN)/mingw32-ar
36 RANLIB := $(MINGW_BIN)/mingw32-ranlib
37 WINDRES := $(MINGW_BIN)/mingw32-windres
38 DLLTOOL := $(MINGW_BIN)/mingw32-dlltool
39 OBJCPY := $(MINGW_BIN)/mingw32-objcopy
40 NSIS_DIR := $(DEPKGS32)/nsis
41 STAB2CV := $(DEPKGS32)/tools/bin/stab2cv
46 CFLAGS := -g -Wall -mno-cygwin -mthreads -O3 -fno-strict-aliasing -DHAVE_VSS64
47 LIBS_NETWORK := -lws2_32
49 BINDIR := $(BUILDDIR)/release64
50 LIBDIR := $(BUILDDIR)/release64
53 CFLAGS := -g -Wall -mno-cygwin -m32 -mwin32 -mthreads -O3 -fno-strict-aliasing
54 LIBS_NETWORK := -lwsock32
56 BINDIR := $(BUILDDIR)/release32
57 LIBDIR := $(BUILDDIR)/release32
61 LDFLAGS := -g -Wall -mno-cygwin -Wl,--disable-auto-import
63 INCLUDE_DDK := -I$(MINGW_INCLUDE)/ddk
64 INCLUDE_BACULA := -I$(MAINDIR)/src -I$(BUILDDIR)/compat
65 INCLUDE_PTHREADS := -I$(DEPKGS)/include/pthreads
66 INCLUDE_ZLIB := -I$(DEPKGS)/include
67 INCLUDE_VSS := -I$(DEPKGS)/vss
68 INCLUDE_ICONS := -I../libwin32
69 INCLUDE_OPENSSL := -I$(DEPKGS)/include
70 INCLUDE_WX := -I$(DEPKGS)/lib/wx_dll/msw -I$(DEPKGS)/include
71 INCLUDE_MYSQL := -I$(DEPKGS)/include/mysql
77 $(DEPKGS)/lib/libpthreadGCE.a
83 $(DEPKGS)/lib/libmysql.a
89 $(DEPKGS)/lib/libsqlite3.a
92 $(DEPKGS)/lib/libssl.dll.a
95 $(DEPKGS)/lib/libcrypto.dll.a
98 $(DEPKGS)/lib/wx_dll/libwxmsw28_core.a \
99 $(DEPKGS)/lib/wx_dll/libwxbase28.a
105 $(LIBDIR)/libbacula.a