Add generation numbers to block pointers
[btrfs-progs-unstable/devel.git] / Makefile
blobb09d47beca5bc73a1faf17fea43826f75ffd5c76
1 CC=gcc
2 CFLAGS = -g -Wall -fno-strict-aliasing -Werror -D_FILE_OFFSET_BITS=64
3 objects = ctree.o disk-io.o radix-tree.o extent-tree.o print-tree.o \
4 root-tree.o dir-item.o hash.o file-item.o inode-item.o \
5 inode-map.o crc32c.o rbtree.o extent-cache.o \
7 CHECKFLAGS=-D__linux__ -Dlinux -D__STDC__ -Dunix -D__unix__ -Wbitwise \
8 -Wuninitialized -Wshadow -Wundef
9 DEPFLAGS = -Wp,-MMD,$(@D)/.$(@F).d,-MT,$@
11 INSTALL= install
12 prefix ?= /usr/local
13 bindir = $(prefix)/bin
15 progs = btrfsctl btrfsck mkfs.btrfs debug-tree
17 # make C=1 to enable sparse
18 ifdef C
19 check=sparse $(CHECKFLAGS)
20 else
21 check=ls
22 endif
24 .c.o:
25 $(check) $<
26 $(CC) $(DEPFLAGS) $(CFLAGS) -c $<
29 all: $(progs)
31 btrfsctl: btrfsctl.o
32 gcc $(CFLAGS) -o btrfsctl btrfsctl.o
34 btrfsck: $(objects) btrfsck.o bit-radix.o
35 gcc $(CFLAGS) -o btrfsck btrfsck.o $(objects) bit-radix.o
37 mkfs.btrfs: $(objects) mkfs.o
38 gcc $(CFLAGS) -o mkfs.btrfs $(objects) mkfs.o -luuid
40 debug-tree: $(objects) debug-tree.o
41 gcc $(CFLAGS) -o debug-tree $(objects) debug-tree.o -luuid
43 dir-test: $(objects) dir-test.o
44 gcc $(CFLAGS) -o dir-test $(objects) dir-test.o
46 quick-test: $(objects) quick-test.o
47 gcc $(CFLAGS) -o quick-test $(objects) quick-test.o
49 clean :
50 rm -f $(progs) cscope.out *.o .*.d
52 install: $(progs)
53 $(INSTALL) -m755 -d $(DESTDIR)$(bindir)
54 $(INSTALL) $(progs) $(DESTDIR)$(bindir)
56 -include .*.d