Skip to content

Commit

Permalink
Change default CONFIG to none
Browse files Browse the repository at this point in the history
- Use default value of `CXX` instead of forcing override to `clang++`.
- Add base `CXXFLAGS` and `ABCMKARGS` in else condition of `ifeq ($(CONFIG),..)`
  block and output the value of `CXX`.
- Change readme to mention `CXX` envvar and that using `make config-clang` etc
  will ignore `CXX`.
  • Loading branch information
KrystalDelusion committed Mar 7, 2024
1 parent e9cd6ca commit 8b8280e
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
7 changes: 6 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@

CONFIG := clang
CONFIG := none
# CONFIG := clang
# CONFIG := gcc
# CONFIG := afl-gcc
# CONFIG := emcc
Expand Down Expand Up @@ -362,6 +363,10 @@ EXE = .exe

else ifneq ($(CONFIG),none)
$(error Invalid CONFIG setting '$(CONFIG)'. Valid values: clang, gcc, emcc, mxe, msys2-32, msys2-64)
else
$(info Using provided C++ compiler, '$(CXX)'.)
CXXFLAGS += -std=$(CXXSTD) -Os
ABCMKARGS += ARCHFLAGS="-DABC_USE_STDINT_H $(ABC_ARCHFLAGS)"
endif

ifeq ($(ENABLE_LIBYOSYS),1)
Expand Down
8 changes: 7 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -105,11 +105,17 @@ For Cygwin use the following command to install all prerequisites, or select the

setup-x86_64.exe -q --packages=bison,flex,gcc-core,gcc-g++,git,libffi-devel,libreadline-devel,make,pkg-config,python3,tcl-devel,boost-build,zlib-devel

To configure the build system to use a specific compiler, use one of
The environment variable `CXX` can be used to control the C++ compiler used, or
run one of the following:

$ make config-clang
$ make config-gcc

Note that these will result in `make` ignoring the `CXX` environment variable,
unless `CXX` is assigned in the call to make, e.g.

$ make CXX=$CXX

For other compilers and build configurations it might be
necessary to make some changes to the config section of the
Makefile.
Expand Down

0 comments on commit 8b8280e

Please sign in to comment.