summaryrefslogtreecommitdiff
path: root/config.mk
diff options
context:
space:
mode:
authorbryan <bryan@veltar.systems>2026-08-27 10:49:41 +0200
committerbryan <bryan@veltar.systems>2026-08-27 10:49:41 +0200
commita6a2ea7ff0f1d0ef47f4797b72c7faae65d0bb54 (patch)
treecaa636959e49cdf0fec7ebc75997224d59ce296a /config.mk
parent002742ad5b1fd76d539c2fb8736622e63e757f98 (diff)
downloadprtmib-a6a2ea7ff0f1d0ef47f4797b72c7faae65d0bb54.tar.gz
prtmib-a6a2ea7ff0f1d0ef47f4797b72c7faae65d0bb54.zip
Add make install for Windows and Linux.
Windows copies prtmib.exe to %USERPROFILE%\.local\bin. Linux installs to /usr/local/bin. PREFIX and DESTDIR work as usual.
Diffstat (limited to 'config.mk')
-rw-r--r--config.mk12
1 files changed, 12 insertions, 0 deletions
diff --git a/config.mk b/config.mk
index d701da0..f730759 100644
--- a/config.mk
+++ b/config.mk
@@ -1,5 +1,17 @@
# prtmib — site/toolchain knobs. Edit this, not the Makefile.
#
+# Install: make install
+# Windows: %USERPROFILE%\.local\bin
+# Linux: /usr/local/bin
+# Override: make PREFIX=... install
+
+ifeq ($(OS),Windows_NT)
+PREFIX ?= $(USERPROFILE)/.local
+else
+PREFIX ?= /usr/local
+endif
+BINDIR ?= $(PREFIX)/bin
+
# Windows (this machine): MinGW-w64 gcc. LLVM clang in PATH targets MSVC
# and needs the VS developer prompt; MinGW does not.
# as/ld live next to gcc; export PATH so the driver finds them.