]> git.sur5r.net Git - bacula/bacula/blob - bacula/src/win32/filed/Makefile
Restore win32 dir from Branch-5.2 and update it
[bacula/bacula] / bacula / src / win32 / filed / Makefile
1 #
2 # Makefile for win32 bacula executables
3 # Using MinGW cross-compiler on GNU/Linux
4 #
5 # Author: Robert Nelson
6 # License: BSD 2-Clause; see file LICENSE-FOSS
7 #
8 #  Written by Robert Nelson, June 2006
9 #
10
11 #
12 # Change the following depending on where this directory is located
13 #  in the Bacula tree.  It should point to the src/win32 directory.
14 BUILDDIR = ..
15
16
17 include $(BUILDDIR)/Makefile.inc
18
19 INCLUDES = \
20         -I. \
21         $(INCLUDE_PTHREADS) \
22         $(INCLUDE_BACULA) \
23         $(INCLUDE_ZLIB) \
24         $(INCLUDE_VSS) \
25         $(INCLUDE_OPENSSL) \
26         $(INCLUDE_ICONS)
27
28 DEFINES = \
29         -DUSING_DLL \
30         -DWIN32_VSS \
31         -DWINVER=0x500 \
32         $(HAVES)
33
34 #       -DHAVE_TRAY_MONITOR \
35
36
37 vpath %.c $(MAINDIR)/src/filed $(BUILDDIR)/libwin32
38 vpath %.cpp $(MAINDIR)/src/filed $(BUILDDIR)/libwin32
39
40 ##########################################################################
41
42 FILED_OBJS = \
43         $(OBJDIR)/accurate.o \
44         $(OBJDIR)/authenticate.o \
45         $(OBJDIR)/backup.o \
46         $(OBJDIR)/crypto.o \
47         $(OBJDIR)/win_efs.o \
48         $(OBJDIR)/estimate.o \
49         $(OBJDIR)/fd_plugins.o \
50         $(OBJDIR)/fd_snapshot.o \
51         $(OBJDIR)/filed.o \
52         $(OBJDIR)/filed_conf.o \
53         $(OBJDIR)/heartbeat.o \
54         $(OBJDIR)/hello.o \
55         $(OBJDIR)/job.o \
56         $(OBJDIR)/restore.o \
57         $(OBJDIR)/status.o \
58         $(OBJDIR)/verify.o \
59         $(OBJDIR)/verify_vol.o \
60         $(OBJDIR)/vss.o \
61         $(OBJDIR)/vss_XP.o \
62         $(OBJDIR)/vss_W2K3.o \
63         $(OBJDIR)/vss_Vista.o \
64         $(OBJDIR)/service.o \
65         $(OBJDIR)/main.o \
66         $(OBJDIR)/bacl.o \
67         $(OBJDIR)/bacl_linux.o \
68         $(OBJDIR)/bacl_solaris.o \
69         $(OBJDIR)/bxattr_freebsd.o \
70         $(OBJDIR)/bxattr_osx.o \
71         $(OBJDIR)/bacl_freebsd.o \
72         $(OBJDIR)/bacl_osx.o \
73         $(OBJDIR)/bxattr.o \
74         $(OBJDIR)/bxattr_linux.o \
75         $(OBJDIR)/bxattr_solaris.o \
76         $(OBJDIR)/bacula.res
77
78 #       $(OBJDIR)/trayMonitor.o \
79 #       $(OBJDIR)/aboutDialog.o \
80 #       $(OBJDIR)/statusDialog.o \
81
82
83 ALL_OBJS = $(FILED_OBJS)
84
85 FILED_LIBS = \
86         $(LIBS_PTHREADS) \
87         $(LIBS_ZLIB) \
88         $(LIBS_LZO) \
89         $(LIBS_NETWORK) \
90         -lole32 \
91         -loleaut32 \
92         -luuid \
93         -lcomctl32
94
95 ######################################################################
96
97 # Targets
98
99 .PHONY: all clean distclean
100
101 all: $(BINDIR)/bacula-fd.exe
102
103 distclean: clean
104
105 clean:
106         @echo "Cleaning `pwd`"
107         $(call clean_obj,$(ALL_OBJS))
108         $(call clean_exe,$(BINDIR)/bacula-fd.exe)
109         $(ECHO_CMD)rm -rf $(OBJDIRS)
110
111 #
112 # Rules
113 #
114
115 $(BINDIR)/bacula-fd.exe: $(FILED_OBJS) $(LIBS_BACULA)
116         $(call link_winapp,$(FILED_LIBS))
117
118 $(OBJDIR)/winres.res: $(BUILDDIR)/libwin32/winres.rc
119         @echo "Compiling $@"
120         $(call checkdir,$@)
121         $(ECHO_CMD)$(WINDRES) $(INCLUDE_ICONS) -DMINGW64 -O coff $< -o $@
122
123 include $(BUILDDIR)/Makefile.rules