Commit 90c0c55e by Merck Hung

Explicitly include Android.mk for only OpenGL

Replace all-makefiles-under makefile-macro with explicitly including Android.mk(s) from subdirectories that are related to OpenGL and are only needed by Android builds. The change are mainly made to the top-level Android.mk and the src/Android.mk. The other three sub-Android.mk(s) are deprecated and deleted. Soong compile-time is expected to shorten with no use of all-makefiles-under macros. Since the project co-existed with both Android.bp and Android.mk. The test was performed in absence of Android.bp on oc-mr1-dev branch against aosp_arm-eng and aosp_arm64-eng targets. NOTE: Android Pie uses Android.bp only. Bug: b/29023322 Test: oc-mr1-dev branch, aosp_arm-eng (LLVM3) & aosp_arm64-eng (LLVM7) targets Change-Id: I05ac46213f849747621c7084bca2549a22513881 Reviewed-on: https://swiftshader-review.googlesource.com/21068Reviewed-by: 's avatarNicolas Capens <nicolascapens@google.com> Tested-by: 's avatarMerck Hung <merckhung@google.com>
parent 56eacf05
......@@ -15,6 +15,7 @@
#
LOCAL_PATH := $(call my-dir)
swiftshader_root := $(LOCAL_PATH)
# LLVM version for SwiftShader
SWIFTSHADER_LLVM_VERSION ?= 3
......@@ -60,6 +61,12 @@ endif
endif
ifndef swiftshader_unsupported_build
include $(call all-makefiles-under,$(LOCAL_PATH))
ifneq ($(swiftshader_unsupported_build),true)
include $(swiftshader_root)/src/Android.mk
include $(swiftshader_root)/tests/unittests/Android.mk
ifeq ($(SWIFTSHADER_LLVM_VERSION),3)
include $(swiftshader_root)/third_party/LLVM/Android.mk
else
include $(swiftshader_root)/third_party/llvm-7.0/Android.mk
endif
endif
LOCAL_PATH:= $(call my-dir)
LOCAL_PATH := $(call my-dir)
swiftshader_src_root := $(LOCAL_PATH)
COMMON_C_INCLUDES += \
bionic \
......@@ -186,4 +187,8 @@ LOCAL_HEADER_LIBRARIES := $(COMMON_HEADER_LIBRARIES)
LOCAL_STATIC_LIBRARIES := $(COMMON_STATIC_LIBRARIES)
include $(BUILD_STATIC_LIBRARY)
include $(call all-makefiles-under,$(LOCAL_PATH))
include $(swiftshader_src_root)/Reactor/Android.mk
include $(swiftshader_src_root)/OpenGL/libGLESv2/Android.mk
include $(swiftshader_src_root)/OpenGL/libGLES_CM/Android.mk
include $(swiftshader_src_root)/OpenGL/libEGL/Android.mk
include $(swiftshader_src_root)/OpenGL/compiler/Android.mk
#
# Copyright 2015 The Android Open-Source Project
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
LOCAL_PATH:= $(call my-dir)
include $(call all-makefiles-under,$(LOCAL_PATH))
#
# Copyright 2018 The Android Open-Source Project
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
LOCAL_PATH:= $(call my-dir)
include $(call all-makefiles-under,$(LOCAL_PATH))
#
# Copyright 2015 The Android Open-Source Project
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
LOCAL_PATH:= $(call my-dir)
ifeq ($(SWIFTSHADER_LLVM_VERSION),3)
include $(LOCAL_PATH)/LLVM/Android.mk
else
include $(LOCAL_PATH)/llvm-7.0/Android.mk
endif
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment