aboutsummaryrefslogtreecommitdiffstats
path: root/Makefile
blob: 0ba98c31fad2fd2904fb026db36fad0080a70deb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
all: lib/liballoc.a bin/liballoc_tests

bin/liballoc_tests: lib/liballoc.a build
	gcc -Iinclude tests/liballoc_tests.c -lcheck -pthread -lsubunit -lm lib/liballoc.a -o bin/liballoc_tests

lib/liballoc.a: build/alloc.o build/free_list.o build
	ar rcs lib/liballoc.a build/alloc.o build/free_list.o

build/alloc.o: build
	gcc -Iinclude -c src/alloc.c -o build/alloc.o

build/free_list.o: build
	gcc -Iinclude -c src/free_list.c -o build/free_list.o

.PHONY: build clean
build:
	-mkdir build bin lib

clean:
	-rm -r build bin lib