summaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2020-12-23 06:57:52 -0800
committerKaz Kylheku <kaz@kylheku.com>2020-12-23 06:57:52 -0800
commitae1e265eda80625c655ee46ab99a4af418e4cd96 (patch)
tree3cc4d441e387beebce243f26979b30463c219d8a /Makefile
parent09db18d3284157497652e048ac63aa69aca864eb (diff)
downloadtxr-ae1e265eda80625c655ee46ab99a4af418e4cd96.tar.gz
txr-ae1e265eda80625c655ee46ab99a4af418e4cd96.tar.bz2
txr-ae1e265eda80625c655ee46ab99a4af418e4cd96.zip
build: Android support.
* Makefile (conftest.android): New helper target for testing for Android toolchain, via presence of __ANDROID__ preprocessor symbol, similarly to how we detect Darwin. * configure: New test for Android. This is mutually exclusive agains Darwin. On Android, we add some necessary feature selection macros to the compiler command line.
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile6
1 files changed, 6 insertions, 0 deletions
diff --git a/Makefile b/Makefile
index dd7a2a11..6749a145 100644
--- a/Makefile
+++ b/Makefile
@@ -566,6 +566,12 @@ conftest.darwin:
echo yes ; \
fi
+.PHONY: conftest.android
+conftest.android:
+ $(V)if echo | $(CC) -dM -E - | grep -s __ANDROID__ > /dev/null 2>&1 ; then \
+ echo yes ; \
+ fi
+
.PHONY: conftest.clean
conftest.clean:
$(V)rm -f conftest$(EXE) conftest.[co] \