-
Notifications
You must be signed in to change notification settings - Fork 101
/
Makefile
66 lines (50 loc) · 1.99 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
## CentOS/Redhat:
# yum install openssl-devel
# yum install libcurl-devel
# yum install check # Only need if you want to run tests
## Ubuntu:
# apt install build-essential
# apt install libssl-dev
# apt install libpcre3-dev
# apt install libcurl4-openssl-dev
# apt install check # Only need if you want to run tests
## MacOS:
# brew install openssl@3
# brew install pcre
LIBS=-lpcre -lcrypto -lm -lpthread
CFLAGS=-ggdb -O3 -Wall -Wno-deprecated
# CFLAGS=-ggdb -Wall -Wno-deprecated -fsanitize=address
# CFLAGS=-ggdb -O3 -Wall -I /usr/local/cuda-10.2/include/
OBJS=vanitygen.o oclvanitygen.o oclvanityminer.o oclengine.o keyconv.o pattern.o util.o groestl.o sha3.o ed25519.o \
stellar.o base32.o crc16.o bech32.o segwit_addr.o
PROGS=vanitygen++ keyconv oclvanitygen++ oclvanityminer
PLATFORM=$(shell uname -s)
ifeq ($(PLATFORM),Darwin)
OPENCL_LIBS=-framework OpenCL
LIBS+=-L/opt/homebrew/opt/openssl/lib
CFLAGS+=-I/opt/homebrew/opt/openssl/include
LIBS+=-L/opt/homebrew/opt/pcre/lib
CFLAGS+=-I/opt/homebrew/opt/pcre/include
else ifeq ($(PLATFORM),NetBSD)
LIBS+=`pcre-config --libs`
CFLAGS+=`pcre-config --cflags`
else
OPENCL_LIBS=-lOpenCL
endif
most: vanitygen++ keyconv
all: $(PROGS)
vanitygen++: vanitygen.o pattern.o util.o groestl.o sha3.o ed25519.o stellar.o base32.o crc16.o simplevanitygen.o bech32.o segwit_addr.o
$(CC) $^ -o $@ $(CFLAGS) $(LIBS)
oclvanitygen++: oclvanitygen.o oclengine.o pattern.o util.o groestl.o sha3.o
$(CC) $^ -o $@ $(CFLAGS) $(LIBS) $(OPENCL_LIBS)
oclvanityminer: oclvanityminer.o oclengine.o pattern.o util.o groestl.o sha3.o
$(CC) $^ -o $@ $(CFLAGS) $(LIBS) $(OPENCL_LIBS) -lcurl
keyconv: keyconv.o util.o groestl.o sha3.o
$(CC) $^ -o $@ $(CFLAGS) $(LIBS)
run_tests.o: tests.h util_test.h segwit_addr_test.h pattern_test.h
run_tests: run_tests.o util.o groestl.o sha3.o bech32.o segwit_addr.o
$(CC) $^ -o $@ $(CFLAGS) $(LIBS) $(OPENCL_LIBS) -lcheck
test: run_tests
./run_tests
clean:
rm -f $(OBJS) $(PROGS) $(TESTS) *.oclbin run_tests