diff options
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 $@ $< |