1.PHONY: all
2all: runtest
3
4$(shell mkdir -p out)
5
6CC := gcc
7CFLAGS := -g -Wall -Werror
8#CFLAGS += -O2
9
10out/main.o: main.c ../../HeapBitmap.h
11	$(CC) $(CFLAGS) -c $< -o $@ -I ../..
12
13out/HeapBitmap.o: ../../HeapBitmap.c ../../HeapBitmap.h include/cutils/ashmem.h include/Dalvik.h
14	$(CC) $(CFLAGS) -c $< -o $@ -I ../.. -I include
15
16out/hbtest: out/main.o out/HeapBitmap.o out/clz.o
17	$(CC) $^ -o $@
18
19.PHONY: runtest
20runtest: out/hbtest
21	out/hbtest
22
23.PHONY: clean
24clean:
25	rm -rf out
26