diff options
author | Yorhel <git@yorhel.nl> | 2021-07-31 07:13:50 +0200 |
---|---|---|
committer | Yorhel <git@yorhel.nl> | 2021-07-31 07:14:04 +0200 |
commit | 1de70064e7525d7c79e225cb1d4ca39d739f63e6 (patch) | |
tree | 484c319adceef6cd316414cb60696169d4a1a127 | |
parent | 5929bf57cca6f17c528bfe215f8bec0e55d65398 (diff) |
Version 2.0-beta2 + more convenient static binary generationv2.0-beta2
-rw-r--r-- | ChangeLog | 6 | ||||
-rw-r--r-- | Makefile | 43 | ||||
-rw-r--r-- | src/main.zig | 2 |
3 files changed, 33 insertions, 18 deletions
@@ -1,6 +1,12 @@ # SPDX-FileCopyrightText: 2021 Yoran Heling <projects@yorhel.nl> # SPDX-License-Identifier: MIT +2.0-beta2 - 2021-07-31 + - Requires Zig 0.8 + - Significantly reduce memory usage for hard links + - Slightly increase memory usage for directory entries + - Fix reporting of fatal errors in the -0 and -1 scanning UIs + 2.0-beta1 - 2021-07-22 - Full release announcement: https://dev.yorhel.nl/doc/ncdu2 - Requires Zig 0.8 @@ -55,34 +55,43 @@ dist: doc # ASSUMPTION: the ncurses source tree has been extracted into ncurses/ -static: - mkdir -p static-${TARGET}/nc static-${TARGET}/inst/pkg - cd static-${TARGET}/nc && ../../ncurses/configure --prefix="`pwd`/../inst"\ +static-%.tar.gz: + mkdir -p static-$*/nc static-$*/inst/pkg + cd static-$*/nc && ../../ncurses/configure --prefix="`pwd`/../inst"\ --with-pkg-config-libdir="`pwd`/../inst/pkg"\ --without-cxx --without-cxx-binding --without-ada --without-manpages --without-progs\ --without-tests --enable-pc-files --without-pkg-config --without-shared --without-debug\ --without-gpm --without-sysmouse --enable-widec --with-default-terminfo-dir=/usr/share/terminfo\ --with-terminfo-dirs=/usr/share/terminfo:/lib/terminfo:/usr/local/share/terminfo\ - --with-fallbacks="screen linux vt100 xterm xterm-256color" --host=${TARGET}\ - CC="zig cc --target=${TARGET}"\ - LD="zig cc --target=${TARGET}"\ + --with-fallbacks="screen linux vt100 xterm xterm-256color" --host=$*\ + CC="zig cc --target=$*"\ + LD="zig cc --target=$*"\ AR="zig ar" RANLIB="zig ranlib"\ CPPFLAGS=-D_GNU_SOURCE && make && make install.libs @# zig-build - cleaner approach but doesn't work, results in a dynamically linked binary. - @#cd static-${TARGET} && PKG_CONFIG_LIBDIR="`pwd`/inst/pkg" zig build -Dtarget=${TARGET} + @#cd static-$* && PKG_CONFIG_LIBDIR="`pwd`/inst/pkg" zig build -Dtarget=$* @# --build-file ../build.zig --search-prefix inst/ --cache-dir zig -Drelease-fast=true @# Alternative approach, bypassing zig-build - cd static-${TARGET} && zig build-exe -target ${TARGET}\ + cd static-$* && zig build-exe -target $*\ -Iinst/include -Iinst/include/ncursesw -lc inst/lib/libncursesw.a\ --cache-dir zig-cache -static --strip -O ReleaseFast ../src/main.zig ../src/ncurses_refs.c - cd static-${TARGET} && mv main ncdu && tar -czf ../ncdu-${NCDU_VERSION}-$(shell echo ${TARGET} | sed s/-musl//).tar.gz ncdu - rm -rf static-${TARGET} + cd static-$* && mv main ncdu && tar -czf ../static-$*.tar.gz ncdu + rm -rf static-$* -static-target-%: - $(MAKE) static TARGET=$* +static-linux-x86_64: static-x86_64-linux-musl.tar.gz + mv $< ncdu-${NCDU_VERSION}-linux-x86_64.tar.gz -static-all:\ - static-target-x86_64-linux-musl \ - static-target-aarch64-linux-musl \ - static-target-i386-linux-musl \ - static-target-arm-linux-musleabi +static-linux-i386: static-i386-linux-musl.tar.gz + mv $< ncdu-${NCDU_VERSION}-linux-i386.tar.gz + +static-linux-aarch64: static-aarch64-linux-musl.tar.gz + mv $< ncdu-${NCDU_VERSION}-linux-aarch64.tar.gz + +static-linux-arm: static-arm-linux-musleabi.tar.gz + mv $< ncdu-${NCDU_VERSION}-linux-arm.tar.gz + +static:\ + static-linux-x86_64 \ + static-linux-i386 \ + static-linux-aarch64 \ + static-linux-arm diff --git a/src/main.zig b/src/main.zig index e12ffbe..3e14f7e 100644 --- a/src/main.zig +++ b/src/main.zig @@ -1,7 +1,7 @@ // SPDX-FileCopyrightText: 2021 Yoran Heling <projects@yorhel.nl> // SPDX-License-Identifier: MIT -pub const program_version = "2.0-beta1"; +pub const program_version = "2.0-beta2"; const std = @import("std"); const model = @import("model.zig"); |