blob: 7953b41848c1bdcf6f2770304dccfc2df3bdca68 [file] [log] [blame]
Chris Masonaa5d6be2007-02-28 16:35:06 -05001CC=gcc
Chris Masone089f052007-03-16 16:20:31 -04002CFLAGS = -g -Wall -Werror
Chris Mason631d7d92007-03-20 09:13:49 -04003headers = radix-tree.h ctree.h disk-io.h kerncompat.h print-tree.h list.h \
4 transaction.h
Chris Mason3768f362007-03-13 16:47:54 -04005objects = ctree.o disk-io.o radix-tree.o mkfs.o extent-tree.o print-tree.o \
Chris Mason1e1d2702007-03-15 19:03:33 -04006 root-tree.o dir-item.o hash.o file-item.o inode-item.o
Chris Masoneb60cea2007-02-02 09:18:22 -05007
Chris Masonaf86d072007-02-28 09:40:58 -05008# if you don't have sparse installed, use ls instead
Chris Masonaa5d6be2007-02-28 16:35:06 -05009CHECKFLAGS=-D__linux__ -Dlinux -D__STDC__ -Dunix -D__unix__ -Wbitwise \
10 -Wcontext -Wcast-truncate -Wuninitialized -Wshadow -Wundef
11check=sparse $(CHECKFLAGS)
Chris Masonaf86d072007-02-28 09:40:58 -050012#check=ls
13
14.c.o:
15 $(check) $<
16 $(CC) $(CFLAGS) -c $<
Chris Masoneb60cea2007-02-02 09:18:22 -050017
Chris Masone089f052007-03-16 16:20:31 -040018all: tester debug-tree quick-test dir-test tags
Chris Masonfec577f2007-02-26 10:40:21 -050019
20debug-tree: $(objects) debug-tree.o
21 gcc $(CFLAGS) -o debug-tree $(objects) debug-tree.o
22
23tester: $(objects) random-test.o
24 gcc $(CFLAGS) -o tester $(objects) random-test.o
Chris Mason4920c9a2007-01-26 16:38:42 -050025
Chris Mason1d4f6402007-03-15 15:18:43 -040026dir-test: $(objects) dir-test.o
27 gcc $(CFLAGS) -o dir-test $(objects) dir-test.o
Chris Mason79f95c82007-03-01 15:16:26 -050028quick-test: $(objects) quick-test.o
29 gcc $(CFLAGS) -o quick-test $(objects) quick-test.o
30
Chris Mason7518a232007-03-12 12:01:18 -040031$(objects): $(headers)
Chris Mason5de08d72007-02-24 06:24:44 -050032
33clean :
Chris Mason7cf75962007-02-26 10:55:01 -050034 rm debug-tree tester *.o
Chris Mason4920c9a2007-01-26 16:38:42 -050035
Chris Masonfec577f2007-02-26 10:40:21 -050036