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