aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorXavier Del Campo Romero <xavi.dcr@tutanota.com>2023-08-12 02:20:32 +0200
committerXavier Del Campo Romero <xavi.dcr@tutanota.com>2023-09-27 22:08:23 +0200
commitf7293744cea7b2e3b5980676d86d4a33bfdeb5b8 (patch)
treeb4f2b3be0f13320743ccd3f711ba6fcdf1be1dfd /Makefile
parent653924ba87a1367194bc25554ba3fae780fd6a2f (diff)
downloadslcl-f7293744cea7b2e3b5980676d86d4a33bfdeb5b8.tar.gz
Makefile: add install target
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile9
1 files changed, 9 insertions, 0 deletions
diff --git a/Makefile b/Makefile
index 21756ac..7a87332 100644
--- a/Makefile
+++ b/Makefile
@@ -1,5 +1,7 @@
.POSIX:
+PREFIX = /usr/local
+DST = $(PREFIX)/bin
PROJECT = slcl
O = -Og
CDEFS = -D_FILE_OFFSET_BITS=64 # Required for large file support on 32-bit.
@@ -23,6 +25,13 @@ OBJECTS = \
all: $(PROJECT)
+install: all usergen
+ mkdir -p $(DST)
+ cp slcl usergen $(DST)
+ chmod 0755 $(DST)/slcl
+ chmod 0755 $(DST)/usergen
+ +cd doc && $(MAKE) PREFIX=$(PREFIX) install
+
clean:
rm -f $(OBJECTS) $(DEPS)
+cd slweb && $(MAKE) clean