mirror of
https://code.blicky.net/yorhel/ncdu.git
synced 2026-01-13 01:08:41 -09:00
Makefile: Honor ZIG variable + fix static build for x86
This commit is contained in:
parent
ab6dc5be75
commit
83d3630ca7
1 changed files with 7 additions and 7 deletions
14
Makefile
14
Makefile
|
|
@ -70,15 +70,15 @@ static-%.tar.gz:
|
||||||
--without-gpm --without-sysmouse --enable-widec --with-default-terminfo-dir=/usr/share/terminfo\
|
--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-terminfo-dirs=/usr/share/terminfo:/lib/terminfo:/usr/local/share/terminfo\
|
||||||
--with-fallbacks="screen linux vt100 xterm xterm-256color" --host=$*\
|
--with-fallbacks="screen linux vt100 xterm xterm-256color" --host=$*\
|
||||||
CC="zig cc --target=$*"\
|
CC="${ZIG} cc --target=$*"\
|
||||||
LD="zig cc --target=$*"\
|
LD="${ZIG} cc --target=$*"\
|
||||||
AR="zig ar" RANLIB="zig ranlib"\
|
AR="${ZIG} ar" RANLIB="${ZIG} ranlib"\
|
||||||
CPPFLAGS=-D_GNU_SOURCE && make && make install.libs
|
CPPFLAGS=-D_GNU_SOURCE && make && make install.libs
|
||||||
@# zig-build - cleaner approach but doesn't work, results in a dynamically linked binary.
|
@# zig-build - cleaner approach but doesn't work, results in a dynamically linked binary.
|
||||||
@#cd static-$* && PKG_CONFIG_LIBDIR="`pwd`/inst/pkg" zig build -Dtarget=$*
|
@#cd static-$* && PKG_CONFIG_LIBDIR="`pwd`/inst/pkg" zig build -Dtarget=$*
|
||||||
@# --build-file ../build.zig --search-prefix inst/ --cache-dir zig -Drelease-fast=true
|
@# --build-file ../build.zig --search-prefix inst/ --cache-dir zig -Drelease-fast=true
|
||||||
@# Alternative approach, bypassing zig-build
|
@# Alternative approach, bypassing zig-build
|
||||||
cd static-$* && zig build-exe -target $*\
|
cd static-$* && ${ZIG} build-exe -target $*\
|
||||||
-Iinst/include -Iinst/include/ncursesw -lc inst/lib/libncursesw.a\
|
-Iinst/include -Iinst/include/ncursesw -lc inst/lib/libncursesw.a\
|
||||||
--cache-dir zig-cache -static -fstrip -O ReleaseFast ../src/main.zig ../src/ncurses_refs.c
|
--cache-dir zig-cache -static -fstrip -O ReleaseFast ../src/main.zig ../src/ncurses_refs.c
|
||||||
cd static-$* && mv main ncdu && tar -czf ../static-$*.tar.gz ncdu
|
cd static-$* && mv main ncdu && tar -czf ../static-$*.tar.gz ncdu
|
||||||
|
|
@ -87,8 +87,8 @@ static-%.tar.gz:
|
||||||
static-linux-x86_64: static-x86_64-linux-musl.tar.gz
|
static-linux-x86_64: static-x86_64-linux-musl.tar.gz
|
||||||
mv $< ncdu-${NCDU_VERSION}-linux-x86_64.tar.gz
|
mv $< ncdu-${NCDU_VERSION}-linux-x86_64.tar.gz
|
||||||
|
|
||||||
static-linux-i386: static-i386-linux-musl.tar.gz
|
static-linux-x86: static-x86-linux-musl.tar.gz
|
||||||
mv $< ncdu-${NCDU_VERSION}-linux-i386.tar.gz
|
mv $< ncdu-${NCDU_VERSION}-linux-x86.tar.gz
|
||||||
|
|
||||||
static-linux-aarch64: static-aarch64-linux-musl.tar.gz
|
static-linux-aarch64: static-aarch64-linux-musl.tar.gz
|
||||||
mv $< ncdu-${NCDU_VERSION}-linux-aarch64.tar.gz
|
mv $< ncdu-${NCDU_VERSION}-linux-aarch64.tar.gz
|
||||||
|
|
@ -98,6 +98,6 @@ static-linux-arm: static-arm-linux-musleabi.tar.gz
|
||||||
|
|
||||||
static:\
|
static:\
|
||||||
static-linux-x86_64 \
|
static-linux-x86_64 \
|
||||||
static-linux-i386 \
|
static-linux-x86 \
|
||||||
static-linux-aarch64 \
|
static-linux-aarch64 \
|
||||||
static-linux-arm
|
static-linux-arm
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue