Add makefile and restructure
This commit is contained in:
27
Makefile
Normal file
27
Makefile
Normal 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
|
||||
Reference in New Issue
Block a user