summaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
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 $@ $<