nnn

mirror of https://github.com/jarun/nnn
Log | Files | Refs | README | LICENSE

commit 0094d66ea855636ec73560b1d4b51f8440ac6113
parent afebc45f0861e01d39dca21f9141fa39c2c602bd
Author: NRK <nrk@disroot.org>
Date:   Thu, 11 Jun 2026 15:43:12 +0000

use HOST_{CC,CFLAGS} for icons generator

when cross compiling the icons generator need to be built and
run on the host machine and not the target one.

there isn't any widely agreed upon convention for this, but
linux kernel uses `HOSTCC` so adopt that here.

also drop LDFLAGS from generator, shouldn't really be needed.

Closes: https://github.com/jarun/nnn/pull/2142

Diffstat:
MMakefile | 6+++++-
1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/Makefile b/Makefile @@ -162,6 +162,10 @@ CFLAGS += $(CFLAGS_CURSES) LDLIBS += $(LDLIBS_CURSES) -lpthread +# For the icon hashtable generator +HOST_CC ?= $(CC) +HOST_CFLAGS ?= $(CFLAGS) + # static compilation needs libgpm development package ifeq ($(strip $(O_STATIC)),1) LDFLAGS += -static @@ -225,7 +229,7 @@ norl: $(BIN) nolc: $(BIN) src/$(ICONS_INCLUDE): src/icons-hash.c src/icons.h src/icons-in-terminal.h - $(CC) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) -DICONS_GENERATE -o src/icons-hash-gen src/icons-hash.c + $(HOST_CC) $(HOST_CFLAGS) $(CPPFLAGS) -DICONS_GENERATE -o src/icons-hash-gen src/icons-hash.c ./src/icons-hash-gen > $@ install-desktop: $(DESKTOPFILE)