about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorlatex <latex@disroot.org>2023-02-06 17:22:26 +0100
committerlatex <latex@disroot.org>2023-02-06 17:22:26 +0100
commit79c59f93b7461082cf4aec3025257560fc788c69 (patch)
tree040e2923b479643fa6f8abad157d9a01fcec07ef
parent9df686fe72799f5ffc10b49027c37ebd1811eda8 (diff)
downloadlibumumble-79c59f93b7461082cf4aec3025257560fc788c69.tar.gz
make install more configurable
-rw-r--r--Makefile11
-rw-r--r--config.mk2
2 files changed, 9 insertions, 4 deletions
diff --git a/Makefile b/Makefile
index 65c0a9c..0e60318 100644
--- a/Makefile
+++ b/Makefile
@@ -38,13 +38,16 @@ clean:
 	rm -rf $(SNAME) $(DNAME) $(BUILD_DIR) src/*.pb.h src/*.pb.c
 	$(MAKE) -C tests clean
 
-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 18edba8..8a70d53 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 = libumumble
ef='#n169'>169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239