morpheus

suckless linux distro
git clone git://git.2f30.org/morpheus
Log | Files | Refs | Submodules | README | LICENSE

commit 036d41dc64104576bb5597c121df89e8d4ed253b
parent dc78d5d7c91bbab2fbf191e9a29e019546a7f1c4
Author: sin <sin@2f30.org>
Date:   Wed,  5 Mar 2014 13:34:16 +0000

Convert ubase to use inline building instructions

Diffstat:
Mconfig.mk | 3++-
Mpkgs/ubase | 30++++++++++++++++++++++++++----
2 files changed, 28 insertions(+), 5 deletions(-)

diff --git a/config.mk b/config.mk @@ -13,7 +13,8 @@ CC = ${arch}-linux-musl-gcc optldflags = -s -Wl,--gc-sections -Wl,-z,relro,-z,now optcflags = -fdata-sections -ffunction-sections -Os -g0 -fno-unwind-tables -fno-asynchronous-unwind-tables -Wa,--noexecstack -CFLAGS = -I${libcroot}/include -static # ${optcflags} +CPPFLAGS = -D_BSD_SOURCE -D_GNU_SOURCE +CFLAGS = -I${libcroot}/include -static ${CPPFLAGS} # ${optcflags} LDFLAGS = -L${libcroot}/lib -static # ${optldflags} PATH = ${root}/opt/cross/${arch}-linux-musl/bin:${PATH} diff --git a/pkgs/ubase b/pkgs/ubase @@ -1,8 +1,30 @@ git="git://git.2f30.org/ubase" build: crossmusl + set -x cd src/ubase - make clean - make -j$nprocs CC=$CC LDFLAGS="$LDFLAGS" - make PREFIX="$root" install - chmod 4755 "$root/bin/su" + cp config.def.h config.h + for f in util/*.c; do + $CC -c $f -o "${f%%.c}.o" $CFLAGS + done + for f in util/*.o; do + ar -r -c util.a $f + done + ranlib util.a + for f in *.c; do + $CC -c $f $CFLAGS + done + for f in *.o; do + $CC -o "${f%.*}" $f util.a $LDFLAGS + done + for f in *.o; do + cp "${f%.*}" "$root/bin" + done + mkdir -p "$root/share/man/man1" + for f in *.1; do + cp $f "$root/share/man/man1" + done + mkdir -p "$root/share/man/man8" + for f in *.8; do + cp $f "$root/share/man/man8" + done