From b4eddaced2b967e17815c9d96faa9fa222b6ef42 Mon Sep 17 00:00:00 2001 From: Andrea Pappacoda Date: Tue, 15 Feb 2022 15:07:15 +0100 Subject: build(make): honour CXXFLAGS, CPPFLAGS and LDFLAGS It is currently impossible to pass custom flags to the makefiles using environment variables, because they ignore the predefined macros CXXFLAGS, CPPFLAGS and LDFLAGS. Passing LDFLAGS is defined in the Posix standard (https://pubs.opengroup.org/onlinepubs/9699919799/utilities/make.html#tag_20_76_13_09), while the CXXFLAGS and CPPFLAGS variables are predefined in GNU Make (https://www.gnu.org/software/make/manual/html_node/Implicit-Variables.html#Implicit-Variables). --- test/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'test') diff --git a/test/Makefile b/test/Makefile index 1ada398..b9dd413 100644 --- a/test/Makefile +++ b/test/Makefile @@ -22,7 +22,7 @@ all: $(TARGET) CFLAGS_WARN=-Wall -Wextra -Wformat=2 -Wcast-qual -Wcast-align -Wwrite-strings -Wfloat-equal -Wpointer-arith -CFLAGS=-O2 -fomit-frame-pointer -Wall -fno-operator-names -I../ -I./ $(CFLAGS_WARN) #-std=c++0x +CFLAGS=-O2 -fomit-frame-pointer -Wall -fno-operator-names -I../ -I./ $(CFLAGS_WARN) $(CXXFLAGS) $(CPPFLAGS) $(LDFLAGS) #-std=c++0x make_nm: $(CXX) $(CFLAGS) make_nm.cpp -o $@ normalize_prefix: normalize_prefix.cpp ../xbyak/xbyak.h -- cgit v1.2.3