summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDevin Torres <devin@devintorr.es>2014-11-04 09:43:51 -0600
committerDevin Torres <devin@devintorr.es>2014-11-04 09:43:51 -0600
commit9fbd90c51b86a0281ab3a2d89f789abed51a4f12 (patch)
treeb61d0d6087e54e9d77ca18cf602f545e25f08f44
parent4898a1e494c24340992d77dab93245d9ec22cf83 (diff)
parent08910873cf0dfedf6cdf319f06c07ff7bd7d00f6 (diff)
downloadrust-hoedown-9fbd90c51b86a0281ab3a2d89f789abed51a4f12.tar.gz
Merge pull request #141 from jmendeth/simple-install
Simple install target
-rw-r--r--Makefile15
1 files changed, 15 insertions, 0 deletions
diff --git a/Makefile b/Makefile
index ae5f92c..8898042 100644
--- a/Makefile
+++ b/Makefile
@@ -1,4 +1,5 @@
CFLAGS = -g -O3 -ansi -pedantic -Wall -Wextra -Wno-unused-parameter -Isrc
+PREFIX = /usr/local
ifneq ($(OS),Windows_NT)
CFLAGS += -fPIC
@@ -59,6 +60,20 @@ clean:
$(RM) libhoedown.so libhoedown.so.1 libhoedown.a
$(RM) hoedown smartypants hoedown.exe smartypants.exe
+# Installing
+
+install:
+ install -m755 -d $(DESTDIR)$(PREFIX)/lib
+ install -m755 -d $(DESTDIR)$(PREFIX)/bin
+ install -m755 -d $(DESTDIR)$(PREFIX)/include
+
+ install -m644 libhoedown.* $(DESTDIR)$(PREFIX)/lib
+ install -m755 hoedown $(DESTDIR)$(PREFIX)/bin
+ install -m755 smartypants $(DESTDIR)$(PREFIX)/bin
+
+ install -m755 -d $(DESTDIR)$(PREFIX)/include/hoedown
+ install -m644 src/*.h $(DESTDIR)$(PREFIX)/include/hoedown
+
# Generic object compilations
%.o: %.c