--- a/modules/codec/Makefile.am
+++ b/modules/codec/Makefile.am
@@ -477,7 +477,7 @@
 	packetizer/hevc_nal.c packetizer/hevc_nal.h \
 	codec/omxil/qcom.c codec/omxil/qcom.h \
 	codec/omxil/omxil.c codec/omxil/omxil.h codec/omxil/omxil_core.c codec/omxil/omxil_core.h
-if HAVE_ANDROID
+if HAVE_ANDROID_NO_TERMUX
 libomxil_plugin_la_SOURCES += video_output/android/utils.c video_output/android/utils.h \
 	video_output/android/display.h
 endif
@@ -506,7 +506,7 @@
 libmediacodec_plugin_la_LIBADD = libchroma_copy.la 
 codec_LTLIBRARIES += $(LTLIBomxil) $(LTLIBomxil_vout)
 EXTRA_LTLIBRARIES += libomxil_plugin.la libomxil_vout_plugin.la
-if HAVE_ANDROID
+if HAVE_ANDROID_NO_TERMUX
 codec_LTLIBRARIES += libiomx_plugin.la libmediacodec_plugin.la
 endif
 
