k9core

Coreutils for *nix operating systems
git clone git://bvnf.space/k9core.git
Log | Files | Refs | LICENSE

commit 5bfa244a31e3bec582cac76b20f5f2dfcf8fde03
parent 8f5a599f1870ebe30e583e179d1b0f2a6b540669
Author: aabacchus <ben@bvnf.space>
Date:   Sun, 22 Aug 2021 00:38:57 +0100

Makefile: add PREFIX, DESTDIR support; create bin/ if it doesn't exist

Diffstat:
Msrc/Makefile | 9++++++---
1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/src/Makefile b/src/Makefile @@ -1,8 +1,10 @@ # This makefile is BSD compatiable: You can run it without gmake on most systems CC = cc +PREFIX = /usr/local compile: + mkdir -p bin $(CC) -c *.c nouserland/*.c $(CC) -o bin/cat cat.o $(CC) -o bin/chmod chmod.o @@ -42,9 +44,10 @@ compile: $(CC) -o bin/uname uname.o clean: - rm *.o + rm -f *.o + rm -fr bin/ install: - mkdir /usr/local/k9core - mv bin/* /usr/local/k9core/ + mkdir -p $(DESTDIR)$(PREFIX)/k9core + cp bin/* /usr/local/k9core/ .PHONY: clean objclean compile