-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathmakefile
More file actions
32 lines (25 loc) · 697 Bytes
/
makefile
File metadata and controls
32 lines (25 loc) · 697 Bytes
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
.POSIX:
.SUFFIXES:
CC = gcc
CFLAGS = -pedantic -Wall -Wextra -Werror -fPIC
CFLAGS += -DFORTIFY_SOURCE=2 -fstack-protector-strong
LDFLAGS = -lcrypto -lm -shared -fPIC -Wl,-z,relro,-z,now
all: keygen.o rtrs.o echash.o sub.o bootle.o spend.o multisig.o verify.o
$(CC) -o librtrs.so $(CFLAGS) $^ $(LDFLAGS)
rtrs.o: rtrs.c
keygen.o: keygen.c
echash.o: echash.c
sub.o: sub.c
spend.o: spend.c
bootle.o: bootle.c
multisig.o: multisig.c
verify.o: verify.c
debug: CFLAGS += -DDEBUG -g3 -O0 -fsanitize=address
debug: all
test: debug test.c
$(CC) -o test -g $(CFLAGS) test.c -L. -lasan -lm -lrtrs -lcrypto && LD_LIBRARY_PATH=. ./test
clean:
rm *.o *.so
.SUFFIXES: .c .o
.c.o:
$(CC) -c $(CFLAGS) $<