summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorAndreas Baumann <abaumann@yahoo.com>2012-04-20 14:59:54 +0200
committerAndreas Baumann <abaumann@yahoo.com>2012-04-20 14:59:54 +0200
commitc3d9180d29a2ef7972420c6e1a558715285682e4 (patch)
tree7fc706e6f72491d9bdeca2c0d27bc1398587f580 /Makefile
parentaa39632674616ab1530bec93e95bc6ab54643257 (diff)
downloadpgfuse-c3d9180d29a2ef7972420c6e1a558715285682e4.tar.gz
pgfuse-c3d9180d29a2ef7972420c6e1a558715285682e4.tar.bz2
fixed install
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile17
1 files changed, 16 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index 0dae7c0..431344e 100644
--- a/Makefile
+++ b/Makefile
@@ -1,8 +1,18 @@
all: pgfuse
+# name and version of package
PACKAGE_NAME = pgfuse
PACKAGE_VERSION = 0.0.1
+# installation dirs
+DESTDIR=
+prefix=/usr
+
+# standard directories following FHS
+execdir=$(DESTDIR)$(prefix)
+bindir=$(execdir)/bin
+datadir=$(execdir)/share
+
# for debugging
CFLAGS = -Wall -Werror -g -O0 -pthread
# for releasing
@@ -108,6 +118,12 @@ testpgsql: testpgsql.o
testpgsql.o: testpgsql.c
$(CC) -c $(CFLAGS) -o testpgsql.o testpgsql.c
+install: all
+ test -d "$(bindir)" || mkdir -p "$(bindir)"
+ cp pgfuse "$(bindir)"
+ test -d "$(datadir)/man/man1" || mkdir -p "$(datadir)/man/man1"
+ cp pgfuse.1 "$(datadir)/man/man1"
+
dist:
rm -rf /tmp/$(PACKAGE_NAME)-$(PACKAGE_VERSION)
mkdir /tmp/$(PACKAGE_NAME)-$(PACKAGE_VERSION)
@@ -123,4 +139,3 @@ dist:
dist-gz: dist
rm -f $(PACKAGE_NAME)-$(PACKAGE_VERSION).tar.gz
gzip $(PACKAGE_NAME)-$(PACKAGE_VERSION).tar
- \ No newline at end of file