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