mirror of
https://code.blicky.net/yorhel/ncdu.git
synced 2026-01-12 17:08:39 -09:00
Update Zig requirement in README + set preferred build mode
+ minor irrelevant build system changes.
This commit is contained in:
parent
5944b738d0
commit
29bbab64b3
3 changed files with 7 additions and 7 deletions
4
Makefile
4
Makefile
|
|
@ -9,7 +9,7 @@ ZIG ?= zig
|
|||
PREFIX ?= /usr/local
|
||||
BINDIR ?= ${PREFIX}/bin
|
||||
MANDIR ?= ${PREFIX}/share/man/man1
|
||||
ZIG_FLAGS ?= -Doptimize=ReleaseFast
|
||||
ZIG_FLAGS ?= --release
|
||||
|
||||
NCDU_VERSION=$(shell grep 'program_version = "' src/main.zig | sed -e 's/^.*"\(.\+\)".*$$/\1/')
|
||||
|
||||
|
|
@ -65,7 +65,7 @@ static-%.tar.gz:
|
|||
CC="${ZIG} cc --target=$*"\
|
||||
LD="${ZIG} cc --target=$*"\
|
||||
AR="${ZIG} ar" RANLIB="${ZIG} ranlib"\
|
||||
CPPFLAGS=-D_GNU_SOURCE && make && make install.libs
|
||||
CPPFLAGS=-D_GNU_SOURCE && make -j8 && make install.libs
|
||||
@# 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=$*
|
||||
@# --build-file ../build.zig --search-prefix inst/ --cache-dir zig -Drelease-fast=true
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@ C version (1.x).
|
|||
|
||||
## Requirements
|
||||
|
||||
- Zig 0.11.0
|
||||
- Zig 0.12.0
|
||||
- Some sort of POSIX-like OS
|
||||
- ncurses libraries and header files
|
||||
|
||||
|
|
|
|||
|
|
@ -5,9 +5,9 @@ const std = @import("std");
|
|||
|
||||
pub fn build(b: *std.Build) void {
|
||||
const target = b.standardTargetOptions(.{});
|
||||
const t = target.result;
|
||||
|
||||
const optimize = b.standardOptimizeOption(.{});
|
||||
const optimize = b.standardOptimizeOption(.{
|
||||
.preferred_optimize_mode = .ReleaseFast,
|
||||
});
|
||||
|
||||
const pie = b.option(bool, "pie", "Build with PIE support (by default false)") orelse false;
|
||||
|
||||
|
|
@ -22,7 +22,7 @@ pub fn build(b: *std.Build) void {
|
|||
exe.pie = pie;
|
||||
exe.root_module.linkSystemLibrary("ncursesw", .{});
|
||||
// https://github.com/ziglang/zig/blob/b52be973dfb7d1408218b8e75800a2da3dc69108/build.zig#L551-L554
|
||||
if (t.isDarwin()) {
|
||||
if (target.result.isDarwin()) {
|
||||
// useful for package maintainers
|
||||
exe.headerpad_max_install_names = true;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue