summaryrefslogtreecommitdiff
path: root/GNUmakefile
diff options
context:
space:
mode:
authorJeffrey Walton <noloader@gmail.com>2021-05-24 19:40:36 -0400
committerJeffrey Walton <noloader@gmail.com>2021-05-24 19:40:36 -0400
commit41edd50bd1972fdd23b92a0c668025f633e1456f (patch)
treecf4f078895a44a1c58daf00a8e3731d2c30fc34c /GNUmakefile
parent01d374afd1514cf2d2898582ed5592a498096856 (diff)
downloadcryptopp-git-41edd50bd1972fdd23b92a0c668025f633e1456f.tar.gz
Fix makefiles to avoid spurious _XOPEN_SOURCE
Diffstat (limited to 'GNUmakefile')
-rw-r--r--GNUmakefile18
1 files changed, 8 insertions, 10 deletions
diff --git a/GNUmakefile b/GNUmakefile
index 5795cf77..a678b0ee 100644
--- a/GNUmakefile
+++ b/GNUmakefile
@@ -113,18 +113,16 @@ endif
# Strip out -Wall, -Wextra and friends for feature testing. FORTIFY_SOURCE is removed
# because it requires -O1 or higher, but we use -O0 to tame the optimizer.
-ifeq ($(DETECT_FEATURES),1)
- TCXXFLAGS := $(filter-out -D_FORTIFY_SOURCE=% -M -MM -Wall -Wextra -Werror% -Wunused -Wconversion -Wp%, $(CPPFLAGS) $(CXXFLAGS))
- ifneq ($(strip $(TCXXFLAGS)),)
- $(info Using testing flags: $(TCXXFLAGS))
- endif
- TCOMMAND = $(CXX) $(TCXXFLAGS) $(TEXTRA) $(ZOPT) $(TOPT) $(TPROG) -o $(TOUT)
- #TPROG = TestPrograms/test_cxx.cpp
- #TOPT =
- #$(info Testing compile... )
- #$(info $(shell $(TCOMMAND)))
+# Always print testing flags since some tests always happen, like 64-bit.
+TCXXFLAGS := $(filter-out -D_FORTIFY_SOURCE=% -M -MM -Wall -Wextra -Werror% -Wunused -Wconversion -Wp%, $(CPPFLAGS) $(CXXFLAGS))
+ifneq ($(strip $(TCXXFLAGS)),)
+ $(info Using testing flags: $(TCXXFLAGS))
endif
+# TCOMMAND is used for just about all tests. Make will lazy-evaluate
+# the variables when executed by $(shell $(TCOMMAND) ...).
+TCOMMAND = $(CXX) $(TCXXFLAGS) $(TEXTRA) $(ZOPT) $(TOPT) $(TPROG) -o $(TOUT)
+
# Fixup AIX
ifeq ($(IS_AIX),1)
TPROG = TestPrograms/test_64bit.cpp