Add makefile and restructure

This commit is contained in:
olemorud
2023-05-14 23:57:05 +02:00
parent 9c93b37557
commit 5e92c4eaea
8 changed files with 180 additions and 97 deletions

27
Makefile Normal file
View File

@@ -0,0 +1,27 @@
CC := gcc
CFLAGS := -ggdb -O0 -std=c99 -Wall -Wextra -Wpedantic
OBJS := obj/arena.o obj/alloc_backend.o
all : test/test_arena
test/test_arena : src/test_arena.c $(OBJS) | test
$(CC) -o $@ $(CFLAGS) $^
obj/%.o : src/%.c | obj
$(CC) -o $@ -c $(CFLAGS) $<
obj:
mkdir -p $@
bin:
mkdir -p $@
test:
mkdir -p $@
clean:
rm -rf obj bin test
.PHONY: clean obj test bin all