diff options
| author | Florian Fischer <florian.fl.fischer@fau.de> | 2019-08-19 18:23:40 +0200 |
|---|---|---|
| committer | Florian Fischer <florian.fl.fischer@fau.de> | 2019-08-22 16:07:58 +0200 |
| commit | 196fa608205bdbd4016200e47a55e9fb000f2b11 (patch) | |
| tree | 331ac7235f87e9b4ee1900613f5d302a0b9fd5be /src/Makefile | |
| parent | 3358e8204627bfba994abe989ea4119fe033fca9 (diff) | |
| download | allocbench-196fa608205bdbd4016200e47a55e9fb000f2b11.tar.gz allocbench-196fa608205bdbd4016200e47a55e9fb000f2b11.zip | |
readd chattymalloc
Diffstat (limited to 'src/Makefile')
| -rw-r--r-- | src/Makefile | 29 |
1 files changed, 15 insertions, 14 deletions
diff --git a/src/Makefile b/src/Makefile index 8d6d110..bd3b791 100644 --- a/src/Makefile +++ b/src/Makefile @@ -13,28 +13,29 @@ LDFLAGS ?= -pthread -static-libgcc MEMSIZE_KB=$(shell free -t | tail -1 | tr -s ' ' | cut -d ' ' -f 2) MEMSIZE=$(shell echo $(MEMSIZE_KB)"* 1024" | bc) +TOOLS = print_status_on_exit.so exec +ALLOCS = chattymalloc.so bumpptr_alloc.so +TARGETS = $(addprefix $(OBJDIR)/allocators/,$(ALLOCS)) $(addprefix $(OBJDIR)/,$(TOOLS)) + .PHONY: all clean -all: $(OBJDIR)/print_status_on_exit.so $(OBJDIR)/allocators/bumpptr_alloc.so $(OBJDIR)/exec +all: $(TARGETS) -$(OBJDIR)/allocators/bumpptr_alloc.so: bumpptr_alloc.c Makefile | $(OBJDIR)/allocators - @echo "Compiling $@..."; +$(OBJDIR)/allocators/bumpptr_alloc.so: bumpptr_alloc.c Makefile + @if test \( ! \( -d $(@D) \) \) ;then mkdir -p $(@D);fi $(CC) $(LDFLAGS) -shared -DMEMSIZE=$(MEMSIZE) $(CFLAGS) -o $@ $< - # $(CC) $(LDFLAGS) -shared $(CFLAGS) -o $@ $< -$(OBJDIR)/print_status_on_exit.so: print_status_on_exit.c Makefile | $(OBJDIR) - @echo "Compiling $@..."; +$(OBJDIR)/allocators/chattymalloc.so: chattymalloc.c Makefile + @if test \( ! \( -d $(@D) \) \) ;then mkdir -p $(@D);fi + $(CC) $(LDFLAGS) -shared $(CFLAGS) -o $@ $< -ldl + +$(OBJDIR)/print_status_on_exit.so: print_status_on_exit.c Makefile + @if test \( ! \( -d $(@D) \) \) ;then mkdir -p $(@D);fi $(CC) $(LDFLAGS) -shared $(CFLAGS) -o $@ $< -$(OBJDIR)/exec: exec.c Makefile | $(OBJDIR) - @echo "Compiling $@..."; +$(OBJDIR)/exec: exec.c Makefile + @if test \( ! \( -d $(@D) \) \) ;then mkdir -p $(@D);fi $(CC) $(LDFLAGS) $(CFLAGS) -o $@ $< -$(OBJDIR)/allocators: - mkdir -p $@ - -$(OBJDIR): - mkdir $@ - clean: rm -rf $(OBJDIR) |
