commit 4a4d0825b1245e1c35746a9ae6b1bd9700408f4e
parent 84e7fbda246fba5754edd10b12b98e1bb4993785
Author: Hiltjo Posthuma <hiltjo@codemadness.org>
Date: Sat, 28 Feb 2015 13:23:15 +0100
make rule: sbase-box-install
rule to make sbase-box and setup symlinks for $BIN and /bin/[
some (maybe) interesting info:
$ make LDFLAGS="-s -static" CFLAGS="-Os" PREFIX=/ DESTDIR=`pwd`/static-normal install
$ make LDFLAGS="-s -static" CFLAGS="-Os" PREFIX=/ DESTDIR=`pwd`/static-box sbase-box-install
$ du -sk static-normal/ static-box
2728 static-normal/
572 static-box
Diffstat:
1 file changed, 10 insertions(+), 0 deletions(-)
diff --git a/Makefile b/Makefile
@@ -217,6 +217,16 @@ sbase-box: $(LIB) $(SRC)
$(LD) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -o $@ build/*.c $(LIB)
rm -r build
+sbase-box-install: sbase-box
+ mkdir -p $(DESTDIR)$(PREFIX)/bin
+ cp -f sbase-box $(DESTDIR)$(PREFIX)/bin
+ chmod 755 $(DESTDIR)$(PREFIX)/bin/sbase-box
+ for f in $(BIN); do ln -sf sbase-box $(DESTDIR)$(PREFIX)/bin/"$$f"; done
+ ln -sf sbase-box $(DESTDIR)$(PREFIX)/bin/[
+ mkdir -p $(DESTDIR)$(MANPREFIX)/man1
+ for m in $(MAN); do sed "s/^\.Os sbase/.Os sbase $(VERSION)/g" < "$$m" > $(DESTDIR)$(MANPREFIX)/man1/"$$m"; done
+ cd $(DESTDIR)$(MANPREFIX)/man1 && chmod 644 $(MAN)
+
clean:
rm -f $(BIN) $(OBJ) $(LIB) sbase-box sbase-$(VERSION).tar.gz