aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorEmmanuel Gil Peyrot <linkmauve@linkmauve.fr>2016-09-21 18:08:05 +0100
committerRichard van der Hoff <richard@matrix.org>2016-09-23 12:17:44 +0100
commit7c9b2f6395d8a00a4cf0ffb2ad4d3c182a1f304e (patch)
treedd2b27170d18cc3ffd741226b5fc98fbb50ce6bf /Makefile
parent6ea9fb450ec1ef10b32d65ceb00a6042b927a95c (diff)
Add a Makefile rule to install the headers
Signed-off-by: Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile14
1 files changed, 8 insertions, 6 deletions
diff --git a/Makefile b/Makefile
index 9a84cf4..a12520b 100644
--- a/Makefile
+++ b/Makefile
@@ -149,17 +149,19 @@ $(JS_EXPORTED_FUNCTIONS): $(PUBLIC_HEADERS)
all: test js lib debug doc
.PHONY: all
-install-debug: debug
- test -d $(DESTDIR)$(PREFIX) || mkdir -p $(DESTDIR)$(PREFIX)
- test -d $(DESTDIR)$(PREFIX)/lib || mkdir $(DESTDIR)$(PREFIX)/lib
+install-headers: $(PUBLIC_HEADERS)
+ test -d $(DESTDIR)$(PREFIX)/include/olm || mkdir -p $(DESTDIR)$(PREFIX)/include/olm
+ install -Dm644 $(PUBLIC_HEADERS) $(DESTDIR)$(PREFIX)/include/olm/
+
+install-debug: debug install-headers
+ test -d $(DESTDIR)$(PREFIX)/lib || mkdir -p $(DESTDIR)$(PREFIX)/lib
install -Dm755 $(DEBUG_TARGET) $(DESTDIR)$(PREFIX)/lib/libolm_debug.so.$(VERSION)
ln -s libolm_debug.so.$(VERSION) $(DESTDIR)$(PREFIX)/lib/libolm_debug.so.$(MAJOR)
ln -s libolm_debug.so.$(VERSION) $(DESTDIR)$(PREFIX)/lib/libolm_debug.so
.PHONY: install-debug
-install: lib
- test -d $(DESTDIR)$(PREFIX) || mkdir -p $(DESTDIR)$(PREFIX)
- test -d $(DESTDIR)$(PREFIX)/lib || mkdir $(DESTDIR)$(PREFIX)/lib
+install: lib install-headers
+ test -d $(DESTDIR)$(PREFIX)/lib || mkdir -p $(DESTDIR)$(PREFIX)/lib
install -Dm755 $(RELEASE_TARGET) $(DESTDIR)$(PREFIX)/lib/libolm.so.$(VERSION)
ln -s libolm.so.$(VERSION) $(DESTDIR)$(PREFIX)/lib/libolm.so.$(MAJOR)
ln -s libolm.so.$(VERSION) $(DESTDIR)$(PREFIX)/lib/libolm.so