summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile10
1 files changed, 9 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index 92caf10a..54b0f7d2 100644
--- a/Makefile
+++ b/Makefile
@@ -1,5 +1,5 @@
CC=gcc
-CFLAGS = -O2 -g -Wall -fno-strict-aliasing -Werror
+CFLAGS = -g -Wall -fno-strict-aliasing -Werror
objects = ctree.o disk-io.o radix-tree.o extent-tree.o print-tree.o \
root-tree.o dir-item.o hash.o file-item.o inode-item.o \
inode-map.o \
@@ -7,6 +7,10 @@ objects = ctree.o disk-io.o radix-tree.o extent-tree.o print-tree.o \
CHECKFLAGS=-D__linux__ -Dlinux -D__STDC__ -Dunix -D__unix__ -Wbitwise \
-Wuninitialized -Wshadow -Wundef
+INSTALL= install
+prefix = /usr/local
+bindir = $(prefix)/bin
+
progs = btrfsctl btrfsck mkfs.btrfs debug-tree
# make C=1 to enable sparse
@@ -49,6 +53,10 @@ quick-test: $(objects) quick-test.o
clean :
rm -f $(progs) cscope.out *.o .depend
+install: $(progs)
+ $(INSTALL) -m755 -d $(DESTDIR)$(bindir)
+ $(INSTALL) $(progs) $(DESTDIR)$(bindir)
+
ifneq ($(wildcard .depend),)
include .depend
endif