2007-02-28 22:35:06 +01:00
|
|
|
CC=gcc
|
2007-03-16 21:20:31 +01:00
|
|
|
CFLAGS = -g -Wall -Werror
|
2007-03-20 14:13:49 +01:00
|
|
|
headers = radix-tree.h ctree.h disk-io.h kerncompat.h print-tree.h list.h \
|
|
|
|
transaction.h
|
2007-03-21 01:35:03 +01:00
|
|
|
objects = ctree.o disk-io.o radix-tree.o extent-tree.o print-tree.o \
|
2007-03-20 19:38:32 +01:00
|
|
|
root-tree.o dir-item.o hash.o file-item.o inode-item.o \
|
|
|
|
inode-map.o \
|
2007-04-05 20:29:12 +02:00
|
|
|
#
|
2007-02-28 15:40:58 +01:00
|
|
|
# if you don't have sparse installed, use ls instead
|
2007-02-28 22:35:06 +01:00
|
|
|
CHECKFLAGS=-D__linux__ -Dlinux -D__STDC__ -Dunix -D__unix__ -Wbitwise \
|
|
|
|
-Wcontext -Wcast-truncate -Wuninitialized -Wshadow -Wundef
|
|
|
|
check=sparse $(CHECKFLAGS)
|
2007-02-28 15:40:58 +01:00
|
|
|
#check=ls
|
|
|
|
|
|
|
|
.c.o:
|
|
|
|
$(check) $<
|
|
|
|
$(CC) $(CFLAGS) -c $<
|
2007-02-02 15:18:22 +01:00
|
|
|
|
2007-04-02 20:18:17 +02:00
|
|
|
all: bit-radix-test tester debug-tree quick-test dir-test tags mkfs.btrfs
|
2007-03-21 01:35:03 +01:00
|
|
|
|
|
|
|
mkfs.btrfs: $(objects) mkfs.o
|
2007-04-05 20:29:12 +02:00
|
|
|
gcc $(CFLAGS) -o mkfs.btrfs $(objects) mkfs.o -luuid
|
2007-02-26 16:40:21 +01:00
|
|
|
|
2007-04-02 20:18:17 +02:00
|
|
|
bit-radix-test: $(objects) bit-radix.o
|
|
|
|
gcc $(CFLAGS) -o bit-radix-test $(objects) bit-radix.o
|
|
|
|
|
2007-02-26 16:40:21 +01:00
|
|
|
debug-tree: $(objects) debug-tree.o
|
2007-04-05 20:29:12 +02:00
|
|
|
gcc $(CFLAGS) -o debug-tree $(objects) debug-tree.o -luuid
|
2007-02-26 16:40:21 +01:00
|
|
|
|
|
|
|
tester: $(objects) random-test.o
|
|
|
|
gcc $(CFLAGS) -o tester $(objects) random-test.o
|
2007-01-26 22:38:42 +01:00
|
|
|
|
2007-03-15 20:18:43 +01:00
|
|
|
dir-test: $(objects) dir-test.o
|
|
|
|
gcc $(CFLAGS) -o dir-test $(objects) dir-test.o
|
2007-03-01 21:16:26 +01:00
|
|
|
quick-test: $(objects) quick-test.o
|
|
|
|
gcc $(CFLAGS) -o quick-test $(objects) quick-test.o
|
|
|
|
|
2007-03-12 17:01:18 +01:00
|
|
|
$(objects): $(headers)
|
2007-02-24 12:24:44 +01:00
|
|
|
|
|
|
|
clean :
|
2007-02-26 16:55:01 +01:00
|
|
|
rm debug-tree tester *.o
|
2007-01-26 22:38:42 +01:00
|
|
|
|
2007-02-26 16:40:21 +01:00
|
|
|
|