]> git.sur5r.net Git - bacula/bacula/blob - bacula/src/win32/Makefile.inc.in
ebl Add info to build win64 version
[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 #  Absolute paths used in place of relative paths
7 #      Kern Sibbald, October 2008
8 #
9
10 # Global Configuration
11
12 ECHO_CMD = @
13
14 # Main Bacula source dir
15 MAINDIR := @WIN32MAINDIR@
16 #
17 # Build dir -- i.e. normally  src/win32
18 BUILDDIR := @WIN32BUILDDIR@
19 #
20 # Dir above Bacula where we find depkgs
21 TOPDIR := @WIN32TOPDIR@
22 #
23 # where we find depkgs
24 DEPKGS := $(TOPDIR)/@WIN32DEPKGS@
25 DEPKGS32 := $(TOPDIR)/@WIN32DEPKGS32@
26
27 DOCDIR := $(TOPDIR)/docs
28 BINDIR := $(BUILDDIR)/release
29 LIBDIR := $(BUILDDIR)/release
30 OBJDIR := .
31
32 MINGW_BIN := @WIN32BINDIR@
33 MINGW_INCLUDE := @WIN32INCDIR@
34 MINGW_DLLDIR := @WIN32DLLDIR@
35
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
45 WIN64=@WIN64@
46
47 ifeq ($(WIN64),yes)
48         CFLAGS := -g -Wall -mno-cygwin -mthreads -O3 -fno-strict-aliasing -DHAVE_VSS64
49         LIBS_NETWORK := -lws2_32
50         WIN_VERSION := 64
51 else
52         CFLAGS := -g -Wall -mno-cygwin -m32 -mwin32 -mthreads -O3 -fno-strict-aliasing
53         LIBS_NETWORK := -lwsock32
54         WIN_VERSION := 32
55 endif
56
57 LDFLAGS := -g -Wall -mno-cygwin -Wl,--disable-auto-import
58
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
68
69 LIBS_DB := \
70         $(DEPKGS)/lib/libdb.a
71
72 LIBS_PTHREADS := \
73         $(DEPKGS)/lib/libpthreadGCE.a
74
75 LIBS_ZLIB := \
76         $(DEPKGS)/lib/libz.a
77
78 LIBS_MYSQL := \
79         $(DEPKGS)/lib/libmysql.a
80
81 LIBS_POSTGRESQL := \
82         $(DEPKGS)/lib/libpq.a
83
84 LIBS_SQLITE := \
85         $(DEPKGS)/lib/libsqlite3.a
86
87 LIBS_SSL := \
88         $(DEPKGS)/lib/libssl.dll.a
89
90 LIBS_CRYPTO := \
91         $(DEPKGS)/lib/libcrypto.dll.a
92
93 LIBS_WX := \
94         $(DEPKGS)/lib/wx_dll/libwxmsw28_core.a \
95         $(DEPKGS)/lib/wx_dll/libwxbase28.a
96
97 LIBS_CATS := \
98         $(LIBDIR)/libcats.a
99
100 LIBS_BACULA := \
101         $(LIBDIR)/libbacula.a
102
103 HAVES := \
104         -DHAVE_WIN32 \
105         -DHAVE_MINGW \
106         -DHAVE_ZLIB_H \
107         -DHAVE_LIBZ \
108         -DHAVE_CRYPTO \
109         -DHAVE_OPENSSL \
110         -DHAVE_TLS