diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2022-01-05 08:16:43 -0800 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2022-01-05 08:16:43 -0800 |
commit | f63a27e48932b496524024966e6e641ca244a3eb (patch) | |
tree | d433f0b6d7f6e85adab9b7e1199c7de718168a2a | |
parent | 02642867eb5591f6b73adb171ed9734c7f9d15dc (diff) | |
download | txr-f63a27e48932b496524024966e6e641ca244a3eb.tar.gz txr-f63a27e48932b496524024966e6e641ca244a3eb.tar.bz2 txr-f63a27e48932b496524024966e6e641ca244a3eb.zip |
build: support CPPFLAGS.
* Makefile (TXR_CFLAGS): Pull in $(CPPFLAGS) also. It seems
some distros like Gentoo are relying on programs to
interpolate CPPFLAGS, and use this variable for passing
preprocessor-level options like -Dfoo=bar. This is an
incredibly bad, unnecessary idea, but let's play along.
Now because we are merging this into TXR_CFLAGS, it means
that these preprocessor-only flags are used for linking,
when nothing is being preprocessed, which makes no sense.
However, GNU Make's built-in recipe for linking C code seems
to do the same thing.
-rw-r--r-- | Makefile | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -33,8 +33,8 @@ endif VERBOSE := TXR_CFLAGS := -iquote . $(if $(top_srcdir), -iquote $(top_srcdir)) \ - $(LANG_FLAGS) $(DIAG_FLAGS) \ - $(DBG_FLAGS) $(PLATFORM_CFLAGS) $(EXTRA_FLAGS) $(CFLAGS) + $(LANG_FLAGS) $(DIAG_FLAGS) $(DBG_FLAGS) $(PLATFORM_CFLAGS) \ + $(EXTRA_FLAGS) $(CFLAGS) $(CPPFLAGS) TXR_CFLAGS := $(filter-out $(REMOVE_FLAGS),$(TXR_CFLAGS)) TXR_LDFLAGS := $(CONF_LDFLAGS) $(PLATFORM_LDFLAGS) $(EXTRA_LDFLAGS) $(LDFLAGS) TXR_LDLIBS := -lm $(CONF_LDLIBS) $(PLAFORM_LDLIBS) $(EXTRA_LDLIBS) $(LDLIBS) |