aboutsummaryrefslogtreecommitdiff
path: root/makefile
diff options
context:
space:
mode:
authornee-san <47295761+nee-san@users.noreply.github.com>2019-03-12 22:52:17 +0300
committerArnold Robbins <arnold@skeeve.com>2019-03-12 21:52:17 +0200
commitc83d9438305b8b6e21a64add29743da522e60c2e (patch)
tree5160a79c26489abe1b26bfd44482cef9d5634316 /makefile
parent33ead6d2393268365253732a3ac566e3d3362b00 (diff)
downloadone-true-awk-c83d9438305b8b6e21a64add29743da522e60c2e.tar.gz
Fix cross-build (#34)
* Fix cross-build Fixes in make file to support cross-build because maketab is a host tool and should be compiled with host compiler * some
Diffstat (limited to 'makefile')
-rw-r--r--makefile5
1 files changed, 3 insertions, 2 deletions
diff --git a/makefile b/makefile
index a4f1b8a..290351e 100644
--- a/makefile
+++ b/makefile
@@ -30,7 +30,8 @@ CFLAGS = -O2
#CC = gcc -Wall -g -Wwrite-strings
#CC = gcc -O4 -Wall -pedantic -fno-strict-aliasing
#CC = gcc -fprofile-arcs -ftest-coverage # then gcov f1.c; cat f1.c.gcov
-CC = gcc -g -Wall -pedantic
+HOSTCC = gcc -g -Wall -pedantic
+CC ?= $(HOSTCC)
# yacc options. pick one; this varies a lot by system.
#YFLAGS = -d -S
@@ -70,7 +71,7 @@ proctab.c: maketab
./maketab ytab.h >proctab.c
maketab: ytab.h maketab.c
- $(CC) $(CFLAGS) maketab.c -o maketab
+ $(HOSTCC) $(CFLAGS) maketab.c -o maketab
bundle:
@cp ytab.h ytabh.bak