crhash: do madvise(MADV_SEQUENTIAL)
[crhash.git] / Makefile
blob4b88b24627771e764c3baffbffaaab3d29d120a4
1 PHONY :=
3 OBJS :=
4 OBJS += hash-md5.o
5 OBJS += hash-whirlpool.o
6 OBJS += main.o
8 CFLAGS ?= -march=native -O2
9 CFLAGS += -pipe
10 CFLAGS += -std=c99 -pedantic-errors
11 CFLAGS += -fno-strict-aliasing
12 CFLAGS += -Wall
14 CFLAGS += -D_BSD_SOURCE
16 LDFLAGS ?= -Wl,-O1
18 CFLAGS += -ggdb
19 LDFLAGS += -ggdb
21 CFLAGS += -Wp,-MD,$(@D)/.$(@F).d
23 PHONY += all
24 all: crhash
26 crhash: $(OBJS)
27 $(CC) $(LDFLAGS) -o $@ $(OBJS)
29 -include $(wildcard .*.d)
31 PHONY += test
32 test: all
33 @./test.sh
35 PHONY += clean
36 clean:
37 $(RM) crhash $(OBJS)
38 @find . -type f -name '.*.d' -exec $(RM) {} \;
40 .PHONY: $(PHONY)