diff options
author | Jakob Kaivo <jkk@ung.org> | 2020-06-30 15:31:31 -0400 |
---|---|---|
committer | Jakob Kaivo <jkk@ung.org> | 2020-06-30 15:31:31 -0400 |
commit | f2a8df6171b3eae8c949c892e8a35d7acd51084c (patch) | |
tree | 5db460a79a28c85691f9ffb4a9f0cc1f65af0be3 /Makefile | |
parent | 62961fe31686bb1b4c071e128047a49f321492e9 (diff) |
add a test program that can be wrapped with LD_PRELOAD
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -21,7 +21,7 @@ all: $(LIBDIR)/libmapalloc.a $(LIBDIR)/libwrapalloc.so #$(LIBDIR)/libmapalloc.so -tests: $(TESTS) +tests: $(TESTS) $(BINDIR)/wrapper $(OBJDIR)/mapalloc.o: $(SRCDIR)/mapalloc.c $(INCDIR)/mapalloc.h @mkdir -p $(@D) @@ -51,6 +51,10 @@ $(BINDIR)/realloc: $(TESTDIR)/realloc.c $(BINDIR)/use-after-free: $(TESTDIR)/use-after-free.c $(BINDIR)/double-free: $(TESTDIR)/double-free.c +$(BINDIR)/wrapper: $(TESTDIR)/wrapper.c + @mkdir -p $(@D) + $(CC) -o $@ $(CFLAGS) $(TESTDIR)/$(@F).c + $(TESTS): @mkdir -p $(@D) $(CC) -o $@ $(CFLAGS) $(TESTDIR)/$(@F).c -L$(LIBDIR) -lmapalloc |