Fix build error on pre O-MR1 devices
libarect is available from O
libui_headers is available from O-MR1
Guard them properly.
Bug: 64704866
Test: Built aosp_x86 with "BOARD_VNDK_VERSION := current" and
"BOARD_VNDK_RUNTIME_DISABLE := true". Booted on x86 emulator
Change-Id: Ic0aa2dbba5611d8a8fb1cb9ea0d8a66ad26c4794
diff --git a/system/egl/Android.mk b/system/egl/Android.mk
index e525e64..9864e13 100644
--- a/system/egl/Android.mk
+++ b/system/egl/Android.mk
@@ -19,9 +19,13 @@
LOCAL_SHARED_LIBRARIES += libdl
endif
+ifdef IS_AT_LEAST_OPD1
LOCAL_STATIC_LIBRARIES += libarect
+endif
+ifdef IS_AT_LEAST_OPM1
LOCAL_HEADER_LIBRARIES += libui_headers
+endif
ifdef IS_AT_LEAST_OPD1
LOCAL_HEADER_LIBRARIES += libnativebase_headers