Makefile: add install target

This commit is contained in:
Xavier Del Campo Romero 2023-08-12 02:20:32 +02:00
parent 653924ba87
commit f7293744ce
Signed by: xavi
GPG Key ID: 84FF3612A9BF43F2
3 changed files with 33 additions and 0 deletions

View File

@ -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

8
doc/Makefile Normal file
View File

@ -0,0 +1,8 @@
.POSIX:
PREFIX = /usr/local
all:
install: all
+cd man1 && $(MAKE) PREFIX=$(PREFIX) install

16
doc/man1/Makefile Normal file
View File

@ -0,0 +1,16 @@
.POSIX:
PREFIX = /usr/local
DST = $(PREFIX)/share/man/man1
OBJECTS = \
$(DST)/slcl.1 \
$(DST)/usergen.1
all:
install: $(OBJECTS)
$(DST)/%.1: %.1
mkdir -p $(DST)
cp $< $@
chmod 0644 $@