blob: 13ed6313ac850f19bdcd5d549cd051d3241189f8 [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 Mason3768f362007-03-13 16:47:54 -04005objects = ctree.o disk-io.o radix-tree.o mkfs.o extent-tree.o print-tree.o \
6 root-tree.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 Mason79f95c82007-03-01 15:16:26 -050018all: tester debug-tree quick-test
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 Mason79f95c82007-03-01 15:16:26 -050026quick-test: $(objects) quick-test.o
27 gcc $(CFLAGS) -o quick-test $(objects) quick-test.o
28
Chris Mason7518a232007-03-12 12:01:18 -040029$(objects): $(headers)
Chris Mason5de08d72007-02-24 06:24:44 -050030
31clean :
Chris Mason7cf75962007-02-26 10:55:01 -050032 rm debug-tree tester *.o
Chris Mason4920c9a2007-01-26 16:38:42 -050033
Chris Masonfec577f2007-02-26 10:40:21 -050034