-
Notifications
You must be signed in to change notification settings - Fork 208
/
Makefile
101 lines (74 loc) · 1.75 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
99
100
101
VERSION ?= 1.0.93
CHECK_CC = cgcc
CHECK_CC_FLAGS = '$(CHECK_CC) -Wbitwise -Wno-return-void -no-compile $(ARCH)'
# Define a common prefix where binaries and docs install
PREFIX ?= /usr
# Export VERSION and PREFIX so sub-make knows about them
export VERSION PREFIX
# Export the feature switches so sub-make knows about them
export ISCSI_RDMA
export CEPH_RBD
export GLFS_BD
export SD_NOTIFY
.PHONY: all
all: programs doc conf scripts
# Targets for the /usr/sbin utilities
.PHONY: programs install-programs clean-programs
programs:
$(MAKE) -C usr
install-programs:
$(MAKE) -C usr install
clean-programs:
$(MAKE) -C usr clean
# Targets for man pages and other documentation
.PHONY: doc install-doc clean-doc
doc:
$(MAKE) -C doc
install-doc:
$(MAKE) -C doc install
clean-doc:
$(MAKE) -C doc clean
# Targets for scripts
.PHONY: scripts install-scripts clean-scripts
scripts:
$(MAKE) -C scripts
install-scripts:
$(MAKE) -C scripts install
clean-scripts:
$(MAKE) -C scripts clean
# Targets for configuration stubs
.PHONY: conf install-conf clean-conf
conf:
$(MAKE) -C conf
install-conf:
$(MAKE) -C conf install
clean-conf:
$(MAKE) -C conf clean
.PHONY: install
install: install-programs install-doc install-conf install-scripts
.PHONY: rpm
rpm:
@./scripts/build-pkg.sh rpm
.PHONY: deb
deb:
@./scripts/build-pkg.sh deb
.PHONY: clean
clean-pkg:
rm -fr pkg
.PHONY: clean
clean: clean-programs clean-doc clean-conf clean-scripts clean-pkg
.PHONY:check
check: ARCH=$(shell sh scripts/checkarch.sh)
check:
CC=$(CHECK_CC_FLAGS) $(MAKE) all
.PHONY:check32
check32: override ARCH=-m32
check32:
CC=$(CHECK_CC_FLAGS) $(MAKE) all
.PHONY:check64
check64: override ARCH=-m64
check64:
CC=$(CHECK_CC_FLAGS) $(MAKE) all
cscope:
find -name '*.[ch]' > cscope.files
cscope -bq