forked from kokke/tiny-bignum-c
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
39 lines (26 loc) · 1.08 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
CC := gcc
MACROS :=
CFLAGS := -I. -Wundef -Wall -Wextra -O3 -mtune=native $(MACROS)
all: bn.o tests_golden tests_hand_picked tests_mul_perf tests_mul_std #tests_load_cmp tests_rsa
bn.o: bn.c bn.h
@$(CC) -c $(CFLAGS) bn.c
tests_golden: tests/golden.c bn.o
@$(CC) $(CFLAGS) bn.o tests/golden.c -o ./build/test_golden
tests_hand_picked: tests/hand_picked.c bn.o
@$(CC) $(CFLAGS) bn.o tests/hand_picked.c -o ./build/test_hand_picked
########################################################################
##### Performance tests
########################################################################
tests_mul_perf: tests/mul_perf.c bn.o
@$(CC) $(CFLAGS) bn.o tests/mul_perf.c -o ./build/test_mul_perf
tests_mul_std: tests/std_mul.c bn.o
@$(CC) $(CFLAGS) bn.o tests/std_mul.c -o ./build/test_std_mul
test: all
@echo
@echo ================================================================================
@./build/test_golden
@echo ================================================================================
@./build/test_hand_picked
clean:
@rm -f ./build/*
@rm bn.o