sbase

suckless unix tools
git clone git://git.2f30.org/sbase
Log | Files | Refs | README | LICENSE

commit 1e4a4e460de6bdf7a973d97c9b44c55c3fd427ef
parent b5ff71655de1de3877f051107eede51bb0a79f65
Author: Connor Lane Smith <cls@lubutu.com>
Date:   Wed,  8 Jun 2011 11:37:00 +0100

make (un)install
Diffstat:
MMakefile | 14++++++++++++++
Mconfig.mk | 6+++++-
2 files changed, 19 insertions(+), 1 deletion(-)

diff --git a/Makefile b/Makefile @@ -59,6 +59,20 @@ util.a: $(LIB) @echo AR -r $@ @$(AR) -r -c $@ $(LIB) +install: + @echo installing executables to $(DESTDIR)$(PREFIX)/bin + @mkdir -p $(DESTDIR)$(PREFIX)/bin + @cp -f $(BIN) $(DESTDIR)$(PREFIX)/bin + @cd $(DESTDIR)$(PREFIX)/bin && chmod 755 $(BIN) + @echo installing manual pages to $(DESTDIR)$(MANPREFIX)/man1 + @mkdir -p $(DESTDIR)$(MANPREFIX)/man1 + @cp -f $(MAN) $(DESTDIR)$(MANPREFIX)/man1 + @cd $(DESTDIR)$(MANPREFIX)/man1 && chmod 644 $(MAN) + +uninstall: + @cd $(DESTDIR)$(PREFIX)/bin && rm -f $(BIN) + @cd $(DESTDIR)$(MANPREFIX)/man1 && rm -f $(MAN) + dist: clean @echo creating dist tarball @mkdir -p sbase-$(VERSION) diff --git a/config.mk b/config.mk @@ -1,8 +1,12 @@ # sbase version VERSION = 0.0 +# paths +PREFIX = /usr/local +MANPREFIX = ${PREFIX}/share/man + #CC = gcc -CC = musl-gcc +#CC = musl-gcc LD = $(CC) CPPFLAGS = -D_POSIX_C_SOURCE=200112L CFLAGS = -Os -ansi -Wall -pedantic $(CPPFLAGS)