summaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorJon Santmyer <jon@jonsantmyer.com>2021-12-12 17:33:14 -0500
committerJon Santmyer <jon@jonsantmyer.com>2021-12-12 17:33:14 -0500
commitcc8beb0a8b6b83b884b2f310b766700816cf3680 (patch)
tree2fc8c4be59208dc88c59b40182ff7f4d2f9d65c1 /Makefile
parent2bc4d6b92189beb8969e2846a84a2f19e267ca53 (diff)
downloaddiheap-master.tar.gz
diheap-master.tar.bz2
diheap-master.zip
add perf test suite; fix warningsHEADv1.0master
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile6
1 files changed, 5 insertions, 1 deletions
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 $@ $<