hexer: fix cross.

This commit is contained in:
maxice8 2018-06-20 08:05:43 -03:00
parent be269cdd88
commit 336a349aff
2 changed files with 23 additions and 0 deletions

View file

@ -0,0 +1,22 @@
--- Makefile
+++ Makefile
@@ -29,8 +29,8 @@ CPPFLAGS_STD ?= -D_POSIX_C_SOURCE=200809L -D_XOPEN_SOURCE=700 \
CPPFLAGS += $(CPPFLAGS_STD) -DHEXER_VERSION=\"1.0.4\"
# -- Which compiler? --
-CC ?= cc
-CC_FOR_BUILD ?= $(CC)
+CC := cc
+CC_FOR_BUILD := $(CC)
CFLAGS ?= -O
LDFLAGS ?=
LDLIBS = $(LTERMCAP) -lm
@@ -72,7 +72,7 @@ $(MYC): calc.c config.h
$(CC) $(LDFLAGS) $(CPPFLAGS) $(CFLAGS) -DMYCALC=1 -o $@ calc.c -lm
bin2c: bin2c.c
- $(CC_FOR_BUILD) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) -o $@ bin2c.c
+ $(CC_FOR_BUILD) $(HOSTCPPFLAGS) $(HOSTCFLAGS) $(HOSTLDFLAGS) -o $@ bin2c.c
helptext.c: help.txt bin2c
./bin2c -n helptext -o $@ help.txt

View file

@ -3,6 +3,7 @@ pkgname=hexer
version=1.0.4
revision=1
build_style=gnu-makefile
make_build_args="CC_FOR_BUILD=cc"
make_install_args="MANDIR=/usr/share/man/man1"
hostmakedepends="xxd"
makedepends="ncurses-devel"