[hackers] [sbase] make rule: sbase-box-install || Hiltjo Posthuma
commit 1c2166c4bbf47ed42dcdc07838615ec2069b55b0
Author: Hiltjo Posthuma <hiltjo_AT_codemadness.org>
Date: Sat Feb 28 13:23:15 2015 +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
diff --git a/Makefile b/Makefile
index ef57715..6efa7f0 100644
--- a/Makefile
+++ b/Makefile
_AT_@ -217,6 +217,16 @@ sbase-box: $(LIB) $(SRC)
$(LD) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -o $_AT_ 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
Received on Sat Feb 28 2015 - 15:42:53 CET
This archive was generated by hypermail 2.3.0
: Sat Feb 28 2015 - 15:48:11 CET