/
Makefile
80 lines (67 loc) · 2.54 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
#
# BAREOS® - Backup Archiving REcovery Open Sourced
#
# Copyright (C) 2014-2014 Bareos GmbH & Co. KG
#
# This program is Free Software; you can redistribute it and/or
# modify it under the terms of version three of the GNU Affero General Public
# License as published by the Free Software Foundation and included
# in the file LICENSE.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
# 02110-1301, USA.
#
VPATH = .:../../dird:../generic
include ../Makefile.inc
INCLUDES = -I. \
-I../.. \
-I../../include \
-I../include \
-I../compat/include
LDLIBS = ../lib/libbareos.a \
../lib/libbareos.dll \
../findlib/libbareosfind.dll \
../cats/libbareoscats.dll \
$(MINGW_LIB)/libpthreadGCE2.a \
$(WINSOCKLIB) -lole32 -loleaut32 -luuid -lcomctl32
SVRSRCS = admin.c authenticate.c autoprune.c backup.c bsr.c catreq.c \
dir_plugins.c dird_conf.c dird.c expand.c fd_cmds.c getmsg.c \
inc_conf.c job.c jobq.c migrate.c mountreq.c msgchan.c \
ndmp_dma.c newvol.c next_vol.c quota.c recycle.c restore.c \
run_conf.c sd_cmds.c scheduler.c stats.c ua_acl.c ua_audit.c \
ua_cmds.c ua_dotcmds.c ua_input.c ua_impexp.c ua_label.c \
ua_output.c ua_prune.c ua_purge.c ua_query.c ua_restore.c \
ua_run.c ua_select.c ua_server.c ua_status.c ua_tree.c \
ua_update.c vbackup.c verify.c service.c main.c
SVROBJS = $(SVRSRCS:.c=.o)
DBCHKSRCS = dbcheck.c dird_conf.c ua_acl.c ua_audit.c run_conf.c inc_conf.c
DBCHKOBJS = $(DBCHKSRCS:.c=.o)
WINDRESSRCS = dirdres.rc
WINDRESOBJS = $(WINDRESSRCS:.rc=.o)
DBCHKRESSRCS = dbcheckres.rc
DBCHKRESOBJS = $(DBCHKRESSRCS:.rc=.o)
all: bareos-dir.exe dbcheck.exe
bareos-dir.exe: DLL_USAGE = -DUSING_DLL
bareos-dir.exe: $(SVROBJS) $(WINDRESOBJS)
$(CXX) $(LDFLAGS_WINAPP) $(SVROBJS) $(WINDRESOBJS) $(LDLIBS) -o $@
dbcheck.exe: DLL_USAGE = -DUSING_DLL
dbcheck.exe: $(DBCHKOBJS) $(DBCHKRESOBJS)
$(CXX) $(LDFLAGS_CONS) $(DBCHKOBJS) $(LDLIBS) $(DBCHKRESOBJS) -o $@
clean:
rm -f *.o
distclean:: clean
rm -f bareos-dir.exe dbcheck.exe
# inference rules
.c.o:
@echo "Compiling $<"
$(CXX) $(DLL_USAGE) $(CXXFLAGS) -c -o $@ $<
%.o : %.rc
@echo "Ressource Compiling $^"
$(WINDRES) $^ -o $@