-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathMakefile
98 lines (67 loc) · 2.08 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
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
###############################################################################
###############################################################################
## Copyright (C) 2004 Red Hat, Inc. All rights reserved.
##
## This copyrighted material is made available to anyone wishing to use,
## modify, copy, or redistribute it subject to the terms and conditions
## of the GNU General Public License v.2.
##
###############################################################################
###############################################################################
include make/defines.mk
KERNEL=gnbd-kernel gfs-kernel
USERLAND=cman-lib ccs cman group dlm fence gfs gfs2 gnbd rgmanager
MODULES=${KERNEL} ${USERLAND}
KSUBDIRS=gnbd-kernel/src gfs-kernel/src/gfs
SUBDIRS=ccs cman group dlm/lib fence gfs gfs2 gnbd rgmanager
all: build
build: kernel-modules userland
# scripts details
scripts:
chmod 755 ${BUILDDIR}/scripts/*.pl
chmod 755 ${BUILDDIR}/scripts/define2var
# kernel stuff
kernel-modules: ${KERNEL}
gnbd-kernel:
${MAKE} -C gnbd-kernel/src all
gfs-kernel:
${MAKE} -C gfs-kernel/src/gfs
# userland stuff
# make all target can't be folded in a for loop otherwise make -j breaks
# because we can't express dependencies.
userland: scripts ${USERLAND}
cman-lib:
${MAKE} -C cman/lib all
ccs: cman-lib
${MAKE} -C ccs all
cman: ccs
${MAKE} -C cman all
group: ccs
${MAKE} -C group all
dlm:
${MAKE} -C dlm all
fence: group dlm
${MAKE} -C fence all
gfs:
${MAKE} -C gfs all
gfs2:
${MAKE} -C gfs2 all
gnbd: cman-lib
${MAKE} -C gnbd all
rgmanager: ccs dlm
${MAKE} -C rgmanager all
# end of build
clean:
set -e && for i in ${KSUBDIRS} ${SUBDIRS}; do ${MAKE} -C $$i $@; done
distclean: clean
rm -f make/defines.mk
rm -f *tar.gz
rm -rf build
kernel-install: kernel-modules
set -e && for i in ${KSUBDIRS}; do ${MAKE} -C $$i install; done
userland-install: userland
set -e && for i in ${SUBDIRS}; do ${MAKE} -C $$i install; done
install: kernel-install userland-install
uninstall:
set -e && for i in ${KSUBDIRS} ${SUBDIRS}; do ${MAKE} -C $$i $@; done
.PHONY: scripts ${MODULES}