aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorSean Whitton <spwhitton@spwhitton.name>2018-03-26 14:51:29 -0700
committerSean Whitton <spwhitton@spwhitton.name>2018-03-26 14:51:29 -0700
commit3fdbfee2c6b66a8b72514ed49bd350c11ef573fe (patch)
treea4bbd49bf521bf28515ff656d0c0439ffbc93b0d
parentce430260d197f80ce6f9c7364600fb1807e221db (diff)
downloadzxcvbn-c-3fdbfee2c6b66a8b72514ed49bd350c11ef573fe.tar.gz
use CXX_FOR_BUILD in makefile to build dictgen
This is to permit crossbuilding. Patch from Helmut Grohne.
-rw-r--r--makefile3
1 files changed, 2 insertions, 1 deletions
diff --git a/makefile b/makefile
index 3b1b519..0957b06 100644
--- a/makefile
+++ b/makefile
@@ -5,6 +5,7 @@ CXXFLAGS ?= -O2 -Wall -Wextra
CC ?= gcc
AR ?= ar
CXX ?= g++
+CXX_FOR_BUILD ?= $(CXX)
# need zxcvbn.h prior to package installation
CPPFLAGS += -I.
@@ -57,7 +58,7 @@ dict-crc.h: dictgen $(WORDS)
./dictgen -b -o zxcvbn.dict -h dict-crc.h $(WORDS)
dictgen: dict-generate.cpp makefile
- $(CXX) $(CPPFLAGS) -std=c++11 $(CXXFLAGS) \
+ $(CXX_FOR_BUILD) $(CPPFLAGS) -std=c++11 $(CXXFLAGS) \
-o dictgen dict-generate.cpp $(LDFLAGS)
test-c++inline: test.c zxcvbn-c++inline.o