]> git.sur5r.net Git - bacula/bacula/blob - bacula/src/win32/Makefile.inc.in
ebl Add debug message when checking database encoding
[bacula/bacula] / bacula / src / win32 / Makefile.inc.in
1 #
2 # Makefile for win32 bacula executables
3 # Using MinGW cross-compiler on GNU/Linux
4 #
5 #  Written by Robert Nelson, June 2006
6 #
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.
13 #
14
15 # Global Configuration
16
17 ECHO_CMD = @
18
19 # Main Bacula source dir
20 MAINDIR := @WIN32MAINDIR@
21 #
22 # Build dir -- i.e. normally  src/win32
23 BUILDDIR := @WIN32BUILDDIR@
24 #
25 # Dir above Bacula where we find depkgs
26 TOPDIR := @WIN32TOPDIR@
27 #
28 # where we find depkgs
29 DEPKGS := $(TOPDIR)/@WIN32DEPKGS@
30 DEPKGS32 := $(TOPDIR)/@WIN32DEPKGS32@
31
32 DOCDIR := $(TOPDIR)/docs
33
34 MINGW_BIN := @WIN32BINDIR@
35 MINGW_INCLUDE := @WIN32INCDIR@
36 MINGW_DLLDIR := @WIN32DLLDIR@
37
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
47
48 WIN64=@WIN64@
49
50 ifeq ($(WIN64),yes)
51    CFLAGS := -g -Wall -mno-cygwin -mthreads -O3 -fno-strict-aliasing -DHAVE_VSS64
52    LIBS_NETWORK := -lws2_32
53    WIN_VERSION := 64
54    BINDIR := $(BUILDDIR)/release64
55    LIBDIR := $(BUILDDIR)/release64
56    OBJDIR := obj64
57 else
58    CFLAGS := -g -Wall -mno-cygwin -m32 -mwin32 -mthreads -O3 -fno-strict-aliasing
59    LIBS_NETWORK := -lwsock32
60    WIN_VERSION := 32
61    BINDIR := $(BUILDDIR)/release32
62    LIBDIR := $(BUILDDIR)/release32
63    OBJDIR := obj32
64 endif
65
66 OBJDIRS := obj32 obj64
67
68 LDFLAGS := -g -Wall -mno-cygwin -Wl,--disable-auto-import
69
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
79
80 LIBS_DB := \
81         $(DEPKGS)/lib/libdb.a
82
83 LIBS_PTHREADS := \
84         $(DEPKGS)/lib/libpthreadGCE.a
85
86 LIBS_ZLIB := \
87         $(DEPKGS)/lib/libz.a
88
89 LIBS_MYSQL := \
90         $(DEPKGS)/lib/libmysql.a
91
92 LIBS_POSTGRESQL := \
93         $(DEPKGS)/lib/libpq.a
94
95 LIBS_SQLITE := \
96         $(DEPKGS)/lib/libsqlite3.a
97
98 LIBS_SSL := \
99         $(DEPKGS)/lib/libssl.dll.a
100
101 LIBS_CRYPTO := \
102         $(DEPKGS)/lib/libcrypto.dll.a
103
104 LIBS_WX := \
105         $(DEPKGS)/lib/wx_dll/libwxmsw28_core.a \
106         $(DEPKGS)/lib/wx_dll/libwxbase28.a
107
108 LIBS_CATS := \
109         $(LIBDIR)/libcats.a
110
111 LIBS_BACULA := \
112         $(LIBDIR)/libbacula.a
113
114 HAVES := \
115         -DHAVE_WIN32 \
116         -DHAVE_MINGW \
117         -DHAVE_ZLIB_H \
118         -DHAVE_LIBZ \
119         -DHAVE_CRYPTO \
120         -DHAVE_OPENSSL \
121         -DHAVE_TLS