forked from solana-labs/solana-perf-libs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
60 lines (50 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
OS := $(shell uname)
ifeq ($(OS),Darwin)
SO=dylib
else
SO=so
all: cuda_crypt
endif
all: cpu_crypt jerasure
MAKE_ARGS:=V=release
.PHONY:cuda_crypt
cuda_crypt:
$(MAKE) $(MAKE_ARGS) -C src
.PHONY:cpu_crypt
cpu_crypt:
$(MAKE) $(MAKE_ARGS) -C src/cpu-crypt
DESTDIR ?= dist
install:
mkdir -p $(DESTDIR)
cp -f \
src/gf-complete/src/.libs/libgf_complete.$(SO) \
src/jerasure/src/.libs/libJerasure.$(SO) \
src/cpu-crypt/release/libcpu-crypt.a \
$(DESTDIR)
ifneq ($(OS),Darwin)
cp -f src/release/libcuda-crypt.a $(DESTDIR)
ln -sfT libJerasure.so $(DESTDIR)/libJerasure.so.2
ln -sfT libJerasure.so $(DESTDIR)/libJerasure.so.2.0.0
ln -sfT libgf_complete.so $(DESTDIR)/libgf_complete.so.1.0.0
ln -sfT libgf_complete.so $(DESTDIR)/libgf_complete.so.1
endif
ls -lh $(DESTDIR)
GFP_PATH=$(PWD)/src/gf-complete
JERASURE_PATH=$(PWD)/src/jerasure
.PHONY: jerasure gf_complete
jerasure: gf_complete
cd $(JERASURE_PATH) && \
autoreconf --force --install && \
./configure LDFLAGS=-L$(GFP_PATH)/src/.libs/ CPPFLAGS=-I$(GFP_PATH)/include && \
$(MAKE)
gf_complete:
cd $(GFP_PATH) && \
./autogen.sh && \
./configure && \
$(MAKE) && export GFP_PATH=$(shell pwd)
.PHONY:clean
clean:
$(MAKE) $(MAKE_ARGS) -C src clean
$(MAKE) $(MAKE_ARGS) -C src/cpu-crypt clean
$(MAKE) -C $(JERASURE_PATH) clean
$(MAKE) -C $(GFP_PATH) clean