-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
39 lines (24 loc) · 713 Bytes
/
Copy pathMakefile
File metadata and controls
39 lines (24 loc) · 713 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
33
34
35
36
37
platform := $(shell uname)
OpenBSD_objs =
Linux_objs = posix_entropy.o
Darwin_objs = posix_entropy.o
objs = cryptorand.o aes.o error.o $($(platform)_objs)
tests = t_aesrand t_aesrand_bench t_arc4rand t_arc4rand_bench
Darwin_ldflags =
OpenBSD_ldflags = -lpthread
Linux_ldflags = -lpthread
CC = gcc
CFLAGS = -O3 -Wall -D__$(platform)__=1 -I.
LDFLAGS = $($(platform)_ldflags)
all: $(tests)
t_aesrand: t_aesrand.o $(objs)
$(CC) -o $@ $^ $(LDFLAGS)
t_aesrand_bench: t_aesrand_bench.o $(objs)
$(CC) -o $@ $^ $(LDFLAGS)
t_arc4rand: t_arc4rand.o $(objs)
$(CC) -o $@ $^ $(LDFLAGS)
t_arc4rand_bench: t_arc4rand_bench.o $(objs)
$(CC) -o $@ $^ $(LDFLAGS)
.PHONY: clean
clean:
-rm -f $(objs) *.o $(tests)