Chris Mason | 4920c9a | 2007-01-26 16:38:42 -0500 | [diff] [blame] | 1 | |
Chris Mason | aa5d6be | 2007-02-28 16:35:06 -0500 | [diff] [blame] | 2 | CC=gcc |
Chris Mason | 0579da4 | 2007-03-07 16:15:30 -0500 | [diff] [blame] | 3 | CFLAGS = -g -Wall |
Chris Mason | a28ec19 | 2007-03-06 20:08:01 -0500 | [diff] [blame] | 4 | headers = radix-tree.h ctree.h disk-io.h kerncompat.h print-tree.h list.h |
Chris Mason | 5de08d7 | 2007-02-24 06:24:44 -0500 | [diff] [blame] | 5 | objects = ctree.o disk-io.o radix-tree.o mkfs.o extent-tree.o print-tree.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 | 79f95c8 | 2007-03-01 15:16:26 -0500 | [diff] [blame] | 17 | all: tester debug-tree quick-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 | 79f95c8 | 2007-03-01 15:16:26 -0500 | [diff] [blame] | 25 | quick-test: $(objects) quick-test.o |
| 26 | gcc $(CFLAGS) -o quick-test $(objects) quick-test.o |
| 27 | |
Chris Mason | 7518a23 | 2007-03-12 12:01:18 -0400 | [diff] [blame] | 28 | $(objects): $(headers) |
Chris Mason | 5de08d7 | 2007-02-24 06:24:44 -0500 | [diff] [blame] | 29 | |
| 30 | clean : |
Chris Mason | 7cf7596 | 2007-02-26 10:55:01 -0500 | [diff] [blame] | 31 | rm debug-tree tester *.o |
Chris Mason | 4920c9a | 2007-01-26 16:38:42 -0500 | [diff] [blame] | 32 | |
Chris Mason | fec577f | 2007-02-26 10:40:21 -0500 | [diff] [blame] | 33 | |