blob: f8532200e9ad7954c8a75adf8775ddaa4b9937ed [file] [log] [blame]
Chris Mason4920c9a2007-01-26 16:38:42 -05001
Chris Masonaa5d6be2007-02-28 16:35:06 -05002CC=gcc
Chris Mason0579da42007-03-07 16:15:30 -05003CFLAGS = -g -Wall
Chris Masona28ec192007-03-06 20:08:01 -05004headers = radix-tree.h ctree.h disk-io.h kerncompat.h print-tree.h list.h
Chris Mason5de08d72007-02-24 06:24:44 -05005objects = ctree.o disk-io.o radix-tree.o mkfs.o extent-tree.o print-tree.o
Chris Masoneb60cea2007-02-02 09:18:22 -05006
Chris Masonaf86d072007-02-28 09:40:58 -05007# if you don't have sparse installed, use ls instead
Chris Masonaa5d6be2007-02-28 16:35:06 -05008CHECKFLAGS=-D__linux__ -Dlinux -D__STDC__ -Dunix -D__unix__ -Wbitwise \
9 -Wcontext -Wcast-truncate -Wuninitialized -Wshadow -Wundef
10check=sparse $(CHECKFLAGS)
Chris Masonaf86d072007-02-28 09:40:58 -050011#check=ls
12
13.c.o:
14 $(check) $<
15 $(CC) $(CFLAGS) -c $<
Chris Masoneb60cea2007-02-02 09:18:22 -050016
Chris Mason79f95c82007-03-01 15:16:26 -050017all: tester debug-tree quick-test
Chris Masonfec577f2007-02-26 10:40:21 -050018
19debug-tree: $(objects) debug-tree.o
20 gcc $(CFLAGS) -o debug-tree $(objects) debug-tree.o
21
22tester: $(objects) random-test.o
23 gcc $(CFLAGS) -o tester $(objects) random-test.o
Chris Mason4920c9a2007-01-26 16:38:42 -050024
Chris Mason79f95c82007-03-01 15:16:26 -050025quick-test: $(objects) quick-test.o
26 gcc $(CFLAGS) -o quick-test $(objects) quick-test.o
27
Chris Mason7518a232007-03-12 12:01:18 -040028$(objects): $(headers)
Chris Mason5de08d72007-02-24 06:24:44 -050029
30clean :
Chris Mason7cf75962007-02-26 10:55:01 -050031 rm debug-tree tester *.o
Chris Mason4920c9a2007-01-26 16:38:42 -050032
Chris Masonfec577f2007-02-26 10:40:21 -050033