-
Notifications
You must be signed in to change notification settings - Fork 27
/
Makefile
44 lines (34 loc) · 1.12 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
CC = cc
CFLAGS = -std=c99 -Wall -Wextra -march=native -O3 -ggdb3 -fopenmp
LDFLAGS =
LDLIBS = -lm -ldl
compile: prospector genetic hillclimb hp16
prospector: prospector.c
$(CC) $(LDFLAGS) $(CFLAGS) -o $@ prospector.c $(LDLIBS)
genetic: genetic.c
$(CC) $(LDFLAGS) $(CFLAGS) -o $@ genetic.c $(LDLIBS)
hillclimb: hillclimb.c
$(CC) $(LDFLAGS) $(CFLAGS) -o $@ hillclimb.c $(LDLIBS)
hp16: hp16.c
$(CC) $(LDFLAGS) $(CFLAGS) -o $@ hp16.c $(LDLIBS)
tests/degski64.so: tests/degski64.c
tests/h2hash32.so: tests/h2hash32.c
tests/hash32shift.so: tests/hash32shift.c
tests/splitmix64.so: tests/splitmix64.c
hashes = \
tests/degski64.so \
tests/h2hash32.so \
tests/hash32shift.so \
tests/murmurhash3_finalizer32.so \
tests/splitmix64.so
check: prospector $(hashes)
./prospector -E -8 -l tests/degski64.so
./prospector -E -4 -l tests/h2hash32.so
./prospector -E -4 -l tests/hash32shift.so
./prospector -E -4 -l tests/murmurhash3_finalizer32.so
./prospector -E -8 -l tests/splitmix64.so
clean:
rm -f prospector genetic hillclimb hp16 $(hashes)
.SUFFIXES: .so .c
.c.so:
$(CC) -shared $(LDFLAGS) -fPIC $(CFLAGS) -o $@ $<