about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorlatex <latex@disroot.org>2023-02-06 17:31:43 +0100
committerlatex <latex@disroot.org>2023-02-06 17:31:43 +0100
commit5712693842c4271df63218f0aba5752e6cdfb940 (patch)
treeed7588bb8b371d36089964b8c016bcbc5967c28d
parent81dc020a82cb14bf0af8e8d9c0dc98ce7d17ec6c (diff)
downloaduv_link_t-5712693842c4271df63218f0aba5752e6cdfb940.tar.gz
make install more configurable HEAD master
-rw-r--r--Makefile11
-rw-r--r--config.mk2
2 files changed, 9 insertions, 4 deletions
diff --git a/Makefile b/Makefile
index 85fbc84..c9ddf66 100644
--- a/Makefile
+++ b/Makefile
@@ -28,13 +28,16 @@ $(BUILD_DIR)/%.c.o: %.c
 clean:
 	rm -rf $(SNAME) $(DNAME) $(BUILD_DIR)
 
-install-header:
-	install -m 644 $(H) $(DESTDIR)$(PREFIX)/include
+install-header: $(H)
+	install -d $(DESTDIR)$(INCLUDEDIR)
+	install -m 644 $^ $(DESTDIR)$(INCLUDEDIR)
 
 install-static: $(SNAME)
-	install -m 755 $(SNAME) $(DESTDIR)$(PREFIX)/lib64
+	install -d $(DESTDIR)$(LIBDIR)
+	install -m 755 $^ $(DESTDIR)$(LIBDIR)
 
 install-shared: $(DNAME)
-	install -m 755 $(DNAME) $(DESTDIR)$(PREFIX)/lib64
+	install -d $(DESTDIR)$(LIBDIR)
+	install -m 755 $^ $(DESTDIR)$(LIBDIR)
 
 install: install-header install-static install-shared
diff --git a/config.mk b/config.mk
index 0a60311..9c9c9b1 100644
--- a/config.mk
+++ b/config.mk
@@ -1,6 +1,8 @@
 ifeq ($(PREFIX),)
 PREFIX = /usr/local
 endif
+INCLUDEDIR = $(PREFIX)/include
+LIBDIR = $(PREFIX)/lib
 
 BUILD_DIR = build
 NAME = libuv_link_t