Makefile 695 字节
Newer Older
1

C
Chris Mason 已提交
2
CC=gcc
C
Chris Mason 已提交
3 4 5
CFLAGS = -g -Wall
headers = radix-tree.h ctree.h disk-io.h kerncompat.h print-tree.h
objects = ctree.o disk-io.o radix-tree.o mkfs.o extent-tree.o print-tree.o
6

7
# if you don't have sparse installed, use ls instead
C
Chris Mason 已提交
8 9 10
CHECKFLAGS=-D__linux__ -Dlinux -D__STDC__ -Dunix -D__unix__ -Wbitwise \
		-Wcontext -Wcast-truncate -Wuninitialized -Wshadow -Wundef
check=sparse $(CHECKFLAGS)
11 12 13 14 15
#check=ls

.c.o:
	$(check) $<
	$(CC) $(CFLAGS) -c $<
16

17 18 19 20 21 22 23
all: tester debug-tree

debug-tree: $(objects) debug-tree.o
	gcc $(CFLAGS) -o debug-tree $(objects) debug-tree.o

tester: $(objects) random-test.o
	gcc $(CFLAGS) -o tester $(objects) random-test.o
24

C
Chris Mason 已提交
25 26 27
$(objects) : $(headers)

clean :
C
Chris Mason 已提交
28
	rm debug-tree tester *.o
29

30