| Chris Mason | aa5d6be | 2007-02-28 16:35:06 -0500 | [diff] [blame] | 1 | CC=gcc | 
| Chris Mason | 0579da4 | 2007-03-07 16:15:30 -0500 | [diff] [blame] | 2 | CFLAGS = -g -Wall | 
| Chris Mason | a28ec19 | 2007-03-06 20:08:01 -0500 | [diff] [blame] | 3 | headers = radix-tree.h ctree.h disk-io.h kerncompat.h print-tree.h list.h | 
| Chris Mason | 3768f36 | 2007-03-13 16:47:54 -0400 | [diff] [blame] | 4 | objects = ctree.o disk-io.o radix-tree.o mkfs.o extent-tree.o print-tree.o \ | 
| Chris Mason | 1e1d270 | 2007-03-15 19:03:33 -0400 | [diff] [blame^] | 5 | 	  root-tree.o dir-item.o hash.o file-item.o inode-item.o | 
| Chris Mason | eb60cea | 2007-02-02 09:18:22 -0500 | [diff] [blame] | 6 |  | 
| Chris Mason | af86d07 | 2007-02-28 09:40:58 -0500 | [diff] [blame] | 7 | # if you don't have sparse installed, use ls instead | 
| Chris Mason | aa5d6be | 2007-02-28 16:35:06 -0500 | [diff] [blame] | 8 | CHECKFLAGS=-D__linux__ -Dlinux -D__STDC__ -Dunix -D__unix__ -Wbitwise \ | 
 | 9 | 		-Wcontext -Wcast-truncate -Wuninitialized -Wshadow -Wundef | 
 | 10 | check=sparse $(CHECKFLAGS) | 
| Chris Mason | af86d07 | 2007-02-28 09:40:58 -0500 | [diff] [blame] | 11 | #check=ls | 
 | 12 |  | 
 | 13 | .c.o: | 
 | 14 | 	$(check) $< | 
 | 15 | 	$(CC) $(CFLAGS) -c $< | 
| Chris Mason | eb60cea | 2007-02-02 09:18:22 -0500 | [diff] [blame] | 16 |  | 
| Chris Mason | 1d4f640 | 2007-03-15 15:18:43 -0400 | [diff] [blame] | 17 | all: tester debug-tree quick-test dir-test | 
| Chris Mason | fec577f | 2007-02-26 10:40:21 -0500 | [diff] [blame] | 18 |  | 
 | 19 | debug-tree: $(objects) debug-tree.o | 
 | 20 | 	gcc $(CFLAGS) -o debug-tree $(objects) debug-tree.o | 
 | 21 |  | 
 | 22 | tester: $(objects) random-test.o | 
 | 23 | 	gcc $(CFLAGS) -o tester $(objects) random-test.o | 
| Chris Mason | 4920c9a | 2007-01-26 16:38:42 -0500 | [diff] [blame] | 24 |  | 
| Chris Mason | 1d4f640 | 2007-03-15 15:18:43 -0400 | [diff] [blame] | 25 | dir-test: $(objects) dir-test.o | 
 | 26 | 	gcc $(CFLAGS) -o dir-test $(objects) dir-test.o | 
| Chris Mason | 79f95c8 | 2007-03-01 15:16:26 -0500 | [diff] [blame] | 27 | quick-test: $(objects) quick-test.o | 
 | 28 | 	gcc $(CFLAGS) -o quick-test $(objects) quick-test.o | 
 | 29 |  | 
| Chris Mason | 7518a23 | 2007-03-12 12:01:18 -0400 | [diff] [blame] | 30 | $(objects): $(headers) | 
| Chris Mason | 5de08d7 | 2007-02-24 06:24:44 -0500 | [diff] [blame] | 31 |  | 
 | 32 | clean : | 
| Chris Mason | 7cf7596 | 2007-02-26 10:55:01 -0500 | [diff] [blame] | 33 | 	rm debug-tree tester *.o | 
| Chris Mason | 4920c9a | 2007-01-26 16:38:42 -0500 | [diff] [blame] | 34 |  | 
| Chris Mason | fec577f | 2007-02-26 10:40:21 -0500 | [diff] [blame] | 35 |  |