bench6/Makefile

37 lines
609 B
Makefile
Raw Normal View History

CC=clang
CFLAGS=-O3 -fompss-2 -pthread
LDFLAGS=-lm
#CFLAGS+=-g -fno-omit-frame-pointer -gdwarf-4
2023-03-14 14:16:55 +01:00
DESTDIR?=/usr
BENCHMARKS=\
sched_get \
sched_add \
2023-03-13 18:33:08 +01:00
register_deps \
readywave
BIN=$(addprefix bench6.,$(BENCHMARKS))
DATA=$(addsuffix .csv, $(addprefix data/,$(BENCHMARKS)))
PLOT=$(DATA:=.png)
2023-03-14 14:11:13 +01:00
all: $(BIN)
clean:
rm -f $(BIN)
2023-03-14 14:16:55 +01:00
install: $(BIN)
mkdir -p $(DESTDIR)/bin
cp bench6* $(DESTDIR)/bin
2023-03-14 14:11:13 +01:00
plot: $(BIN) $(DATA) $(PLOT)
bench6.%: src/%.c src/common.c
$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $^
data/%.csv.png: data/%.csv plot/%.R
Rscript plot/$(*F).R $<
data/%.csv: bench6.%
mkdir -p data
./$^ > $@