forked from sysprog21/clz-tests
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
46 lines (36 loc) · 815 Bytes
/
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
45
46
CC ?= gcc
CFLAGS_common ?= -Wall -std=gnu99 -g -DDEBUG -O0
ifeq ($(strip $(PROFILE)),1)
CFLAGS_common += -Dcorrect
endif
ifeq ($(strip $(MP)),1)
CFLAGS_common += -fopenmp -DMP
endif
EXEC = \
iteration \
bitmask \
byte \
recursive \
harley
deps := $(EXEC:%=.%.o.d)
GIT_HOOKS := .git/hooks/pre-commit
.PHONY: all
all: $(GIT_HOOKS) $(EXEC)
$(GIT_HOOKS):
@scripts/install-git-hooks
@echo
SRCS_common = main.c
%: $(SRCS_common) %.c clz.h
$(CC) $(CFLAGS_common) -o $@ \
-MMD -MF .$@.d \
-D$(shell echo $(subst .o,,$@)) $(SRCS_common)
run: $(EXEC)
for method in $(EXEC); do\
taskset -c 1 ./$$method 67100000 67116384; \
done
plot: iteration.txt iteration.txt bitmask.txt byte.txt harley.txt
gnuplot scripts/runtime.gp
.PHONY: clean
clean:
$(RM) $(EXEC) *.o $(deps) *.txt *.png
-include $(deps)