diff options
author | Jon Santmyer <jon@jonsantmyer.com> | 2021-12-12 17:33:14 -0500 |
---|---|---|
committer | Jon Santmyer <jon@jonsantmyer.com> | 2021-12-12 17:33:14 -0500 |
commit | cc8beb0a8b6b83b884b2f310b766700816cf3680 (patch) | |
tree | 2fc8c4be59208dc88c59b40182ff7f4d2f9d65c1 /Makefile | |
parent | 2bc4d6b92189beb8969e2846a84a2f19e267ca53 (diff) | |
download | diheap-cc8beb0a8b6b83b884b2f310b766700816cf3680.tar.gz diheap-cc8beb0a8b6b83b884b2f310b766700816cf3680.tar.bz2 diheap-cc8beb0a8b6b83b884b2f310b766700816cf3680.zip |
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -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 $@ $< |