forked from lix-project/lix
Revert "autoconf: Allow overriding CFLAGS/CXXFLAGS from outside."
This reverts commit 717e821b99
. It's
much more convenient to do 'make OPTIMIZE=0'.
This commit is contained in:
parent
5ff4d77f55
commit
f5b7991e59
8
Makefile
8
Makefile
|
@ -17,6 +17,14 @@ makefiles = \
|
||||||
|
|
||||||
-include Makefile.config
|
-include Makefile.config
|
||||||
|
|
||||||
|
OPTIMIZE = 1
|
||||||
|
|
||||||
|
ifeq ($(OPTIMIZE), 1)
|
||||||
|
GLOBAL_CXXFLAGS += -O3
|
||||||
|
else
|
||||||
|
GLOBAL_CXXFLAGS += -O0
|
||||||
|
endif
|
||||||
|
|
||||||
include mk/lib.mk
|
include mk/lib.mk
|
||||||
|
|
||||||
GLOBAL_CXXFLAGS += -g -Wall -include config.h -std=c++17
|
GLOBAL_CXXFLAGS += -g -Wall -include config.h -std=c++17
|
||||||
|
|
|
@ -50,10 +50,8 @@ AC_DEFINE_UNQUOTED(SYSTEM, ["$system"], [platform identifier ('cpu-os')])
|
||||||
test "$localstatedir" = '${prefix}/var' && localstatedir=/nix/var
|
test "$localstatedir" = '${prefix}/var' && localstatedir=/nix/var
|
||||||
|
|
||||||
|
|
||||||
# Set default flags for nix (as per AC_PROG_CC/CXX docs),
|
CFLAGS=
|
||||||
# while still allowing the user to override them from the command line.
|
CXXFLAGS=
|
||||||
: ${CFLAGS="-O3"}
|
|
||||||
: ${CXXFLAGS="-O3"}
|
|
||||||
AC_PROG_CC
|
AC_PROG_CC
|
||||||
AC_PROG_CXX
|
AC_PROG_CXX
|
||||||
AC_PROG_CPP
|
AC_PROG_CPP
|
||||||
|
|
|
@ -4,4 +4,11 @@ GLOBAL_CXXFLAGS += -g -Wall
|
||||||
|
|
||||||
-include Makefile.config
|
-include Makefile.config
|
||||||
|
|
||||||
|
OPTIMIZE = 1
|
||||||
|
|
||||||
|
ifeq ($(OPTIMIZE), 1)
|
||||||
|
GLOBAL_CFLAGS += -O3
|
||||||
|
GLOBAL_CXXFLAGS += -O3
|
||||||
|
endif
|
||||||
|
|
||||||
include mk/lib.mk
|
include mk/lib.mk
|
||||||
|
|
|
@ -2,10 +2,8 @@ AC_INIT(nix-perl, m4_esyscmd([bash -c "echo -n $(cat ../.version)$VERSION_SUFFIX
|
||||||
AC_CONFIG_SRCDIR(MANIFEST)
|
AC_CONFIG_SRCDIR(MANIFEST)
|
||||||
AC_CONFIG_AUX_DIR(../config)
|
AC_CONFIG_AUX_DIR(../config)
|
||||||
|
|
||||||
# Set default flags for nix (as per AC_PROG_CC/CXX docs),
|
CFLAGS=
|
||||||
# while still allowing the user to override them from the command line.
|
CXXFLAGS=
|
||||||
: ${CFLAGS="-O3"}
|
|
||||||
: ${CXXFLAGS="-O3"}
|
|
||||||
AC_PROG_CC
|
AC_PROG_CC
|
||||||
AC_PROG_CXX
|
AC_PROG_CXX
|
||||||
AX_CXX_COMPILE_STDCXX_11
|
AX_CXX_COMPILE_STDCXX_11
|
||||||
|
|
Loading…
Reference in a new issue