From 46b240bf2133dc0345f32fcba2cb03c5fa5d2011 Mon Sep 17 00:00:00 2001 From: Andri Yngvason Date: Sat, 7 Sep 2019 16:40:14 +0000 Subject: [PATCH] Build zrle benchmark and run it --- Makefile | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/Makefile b/Makefile index ef30771..e2ff249 100644 --- a/Makefile +++ b/Makefile @@ -26,6 +26,21 @@ $(DSO): $(OBJECTS) $(BUILD_DIR)/%.o: src/%.c | $(BUILD_DIR) ; $(CC_OBJ) $(BUILD_DIR)/miniz.o: contrib/miniz/miniz.c | $(BUILD_DIR) ; $(CC_OBJ) +BENCH_DIR = $(BUILD_DIR)/bench + +$(BENCH_DIR)/%.o: bench/%.c | $(BENCH_DIR) + $(CC_OBJ) $(shell pkg-config --cflags libpng) + +$(BENCH_DIR): ; mkdir -p $@ +$(BENCH_DIR)/zrle-bench: +$(BENCH_DIR)/zrle-bench: $(OBJECTS) $(BUILD_DIR)/pngfb.o \ + $(BENCH_DIR)/zrle-bench.o + $(LINK_EXE) $(shell pkg-config --libs libpng) + +.PHONY: bench +bench: $(BENCH_DIR)/zrle-bench + ./$(BENCH_DIR)/zrle-bench + .PHONY: examples examples: $(DSO) make -C examples \