forked from cubefs/cubefs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
60 lines (42 loc) · 1.31 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
# ChubaoFS Makefile
#
BIN_PATH := build/bin
BIN_SERVER := $(BIN_PATH)/cfs-server
BIN_CLIENT := $(BIN_PATH)/cfs-client
BIN_CLIENT2 := $(BIN_PATH)/cfs-client2
BIN_AUTHTOOL := $(BIN_PATH)/cfs-authtool
COMMON_SRC := build/build.sh Makefile
COMMON_SRC += $(wildcard storage/*.go util/*/*.go util/*.go repl/*.go raftstore/*.go proto/*.go)
SERVER_SRC := $(wildcard cmd/*.go authnode/*.go datanode/*.go master/*.go metanode/*.go)
CLIENT_SRC := $(wildcard client/*.go client/fs/*.go sdk/*.go)
CLIENT2_SRC := $(wildcard clientv2/*.go clientv2/fs/*.go sdk/*.go)
AUTHTOOL_SRC := $(wildcard authtool/*.go)
RM := $(shell [ -x /bin/rm ] && echo "/bin/rm -rf" || echo "/usr/bin/rm -rf" )
default: all
phony := all
all: build
phony += build server authtool client client2
build: server authtool client
server: $(BIN_SERVER)
client: $(BIN_CLIENT)
client2: $(BIN_CLIENT2)
authtool: $(BIN_AUTHTOOL)
$(BIN_SERVER): $(COMMON_SRC) ${SERVER_SRC}
@build/build.sh server
$(BIN_CLIENT): $(COMMON_SRC) $(CLIENT_SRC)
@build/build.sh client
$(BIN_CLIENT2): $(COMMON_SRC) $(CLIENT2_SRC)
@build/build.sh client2
$(BIN_AUTHTOOL): $(COMMON_SRC) $(AUTHTOOL_SRC)
@build/build.sh authtool
phony += clean
clean:
@$(RM) build/bin
phony += dist_clean
dist-clean:
@$(RM) build/bin
@$(RM) build/out
phony += test
test:
@build/build.sh test
.PHONY: $(phony)