From cc8beb0a8b6b83b884b2f310b766700816cf3680 Mon Sep 17 00:00:00 2001 From: Jon Santmyer Date: Sun, 12 Dec 2021 17:33:14 -0500 Subject: add perf test suite; fix warnings --- Makefile | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index b8de4df..ceed6eb 100644 --- a/Makefile +++ b/Makefile @@ -9,7 +9,7 @@ AR ?= ar WARNS ?= -Wall -Wextra -Wduplicated-cond -Wduplicated-branches -Wlogical-op -Wrestrict -Wnull-dereference -Wdouble-promotion -Wshadow -Wcast-align CFLAGS ?= $(WARNS) -L$(shell pwd) -OUT := libmoditheap +OUT := libdiheap .PHONY: all all: $(OFILES) @@ -19,6 +19,10 @@ endif ifeq ($(STATIC),1) $(AR) rcs $(OUT).a $^ endif +ifeq ($(TEST),1) + $(CC) -I$(shell pwd) -L. -l:$(OUT).so -o testprg test/main.c -g + export LD_LIBRARY_PATH=$$LD_LIBRARY_PATH:$(shell pwd) ; perf stat -B ./testprg +endif %.o:%.c $(CC) -c -o $@ $< -- cgit v1.2.1