Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

display: Clean up makefiles

* Move common includes and shared libraries to
a common location

* Clean up Makefile copyrights

Change-Id: I0427f0f98b4c039a691be0ef6f3deead2b4bfa02

Conflicts:

	libgralloc/Android.mk
	libhwcomposer/Android.mk
  • Loading branch information...
commit 5b805bf94234d872fecba54815c02ba8ea2aa784 1 parent b7f59e3
Naseer Ahmed authored cyanogen committed
View
24 common.mk
@@ -0,0 +1,24 @@
+#Common headers
+common_includes := hardware/qcom/display/libgralloc
+common_includes += hardware/qcom/display/libgenlock
+common_includes += hardware/qcom/display/liboverlay
+common_includes += hardware/qcom/display/libcopybit
+common_includes += hardware/qcom/display/libqdutils
+
+ifeq ($(TARGET_USES_POST_PROCESSING),true)
+ common_flags += -DUSES_POST_PROCESSING
+ common_includes += $(TARGET_OUT_HEADERS)/pp/inc
+endif
+
+
+#Common libraries external to display HAL
+common_libs := liblog libutils libcutils libhardware
+
+#Common C flags
+common_flags := -DDEBUG_CALC_FPS -Wno-missing-field-initializers
+ifeq ($(TARGET_USES_ION),true)
+ common_flags += -DUSE_ION
+endif
+ifeq ($(ARCH_ARM_HAVE_NEON),true)
+ common_flags += -D__ARM_HAVE_NEON
+endif
View
53 libcopybit/Android.mk
@@ -12,49 +12,26 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-
LOCAL_PATH:= $(call my-dir)
-# HAL module implemenation, not prelinked and stored in
-# hw/<COPYPIX_HARDWARE_MODULE_ID>.<ro.board.platform>.so
+include $(LOCAL_PATH)/../common.mk
+include $(CLEAR_VARS)
+LOCAL_MODULE := copybit.$(TARGET_BOARD_PLATFORM)
+LOCAL_MODULE_PATH := $(TARGET_OUT_SHARED_LIBRARIES)/hw
+LOCAL_MODULE_TAGS := optional
+LOCAL_C_INCLUDES := $(common_includes) $(kernel_includes)
+LOCAL_SHARED_LIBRARIES := $(common_libs) libdl libmemalloc
+LOCAL_CFLAGS := $(common_flags)
+LOCAL_ADDITIONAL_DEPENDENCIES := $(common_deps)
+
ifeq ($(TARGET_USES_C2D_COMPOSITION),true)
- include $(CLEAR_VARS)
- LOCAL_PRELINK_MODULE := false
- LOCAL_MODULE_PATH := $(TARGET_OUT_SHARED_LIBRARIES)/hw
- LOCAL_SHARED_LIBRARIES := liblog libdl libcutils libmemalloc libutils
- LOCAL_SRC_FILES := copybit_c2d.cpp software_converter.cpp
- LOCAL_MODULE := copybit.$(TARGET_BOARD_PLATFORM)
- LOCAL_C_INCLUDES += hardware/qcom/display/libgralloc
LOCAL_CFLAGS += -DCOPYBIT_Z180=1 -DC2D_SUPPORT_DISPLAY=1
- LOCAL_MODULE_TAGS := optional
+ LOCAL_SRC_FILES := copybit_c2d.cpp software_converter.cpp
include $(BUILD_SHARED_LIBRARY)
else
- ifneq ($(call is-chipset-in-board-platform,msm7630),true)
- ifeq ($(call is-board-platform-in-list,$(MSM7K_BOARD_PLATFORMS)),true)
- include $(CLEAR_VARS)
- ifeq ($(ARCH_ARM_HAVE_NEON),true)
- LOCAL_CFLAGS += -D__ARM_HAVE_NEON
- endif
- ifeq ($(call is-board-platform,msm7627a),true)
- LOCAL_CFLAGS += -DTARGET_7x27A
- endif
- ifeq ($(TARGET_GRALLOC_USES_ASHMEM),true)
- LOCAL_CFLAGS += -DUSE_ASHMEM
- ifeq ($(call is-chipset-prefix-in-board-platform,msm7627),true)
- LOCAL_CFLAGS += -DTARGET_7x27
- endif
- endif
-
- LOCAL_PRELINK_MODULE := false
- LOCAL_MODULE_PATH := $(TARGET_OUT_SHARED_LIBRARIES)/hw
- LOCAL_SHARED_LIBRARIES := liblog libmemalloc
- LOCAL_SRC_FILES := software_converter.cpp copybit.cpp
- LOCAL_MODULE := copybit.$(TARGET_BOARD_PLATFORM)
- LOCAL_MODULE_TAGS := optional
- LOCAL_C_INCLUDES += hardware/qcom/display/libgralloc
- LOCAL_C_INCLUDES += $(TARGET_OUT_HEADERS)/qcom/display/libgralloc
- LOCAL_CFLAGS += -DCOPYBIT_MSM7K=1
- include $(BUILD_SHARED_LIBRARY)
- endif
+ ifneq ($(TARGET_BOARD_PLATFORM),msm7x30)
+ LOCAL_CFLAGS += -DCOPYBIT_MSM7K=1
+ LOCAL_SRC_FILES := software_converter.cpp copybit.cpp
+ include $(BUILD_SHARED_LIBRARY)
endif
endif
View
18 libgenlock/Android.mk
@@ -1,14 +1,12 @@
LOCAL_PATH := $(call my-dir)
-
+include $(LOCAL_PATH)/../common.mk
include $(CLEAR_VARS)
-LOCAL_PRELINK_MODULE := false
-LOCAL_MODULE_PATH := $(TARGET_OUT_SHARED_LIBRARIES)
-LOCAL_SHARED_LIBRARIES := liblog libcutils
-LOCAL_C_INCLUDES := hardware/qcom/display/libgralloc
-LOCAL_ADDITIONAL_DEPENDENCIES :=
-LOCAL_SRC_FILES := genlock.cpp
-LOCAL_CFLAGS:= -DLOG_TAG=\"libgenlock\"
-LOCAL_MODULE_TAGS := optional
-LOCAL_MODULE := libgenlock
+
+LOCAL_MODULE := libgenlock
+LOCAL_MODULE_TAGS := optional
+LOCAL_C_INCLUDES := $(common_includes)
+LOCAL_SHARED_LIBRARIES := liblog libcutils
+LOCAL_CFLAGS := $(common_flags) -DLOG_TAG=\"libgenlock\"
+LOCAL_SRC_FILES := genlock.cpp
include $(BUILD_SHARED_LIBRARY)
View
60 libgralloc/Android.mk
@@ -11,57 +11,35 @@
# 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)
-# HAL module implemenation, not prelinked and stored in
-# hw/<OVERLAY_HARDWARE_MODULE_ID>.<ro.product.board>.so
+#gralloc module
+LOCAL_PATH := $(call my-dir)
+include $(LOCAL_PATH)/../common.mk
include $(CLEAR_VARS)
-LOCAL_PRELINK_MODULE := false
-LOCAL_MODULE_PATH := $(TARGET_OUT_SHARED_LIBRARIES)/hw
-LOCAL_SHARED_LIBRARIES := liblog libcutils libutils libmemalloc
-LOCAL_SHARED_LIBRARIES += libgenlock libqdutils libGLESv1_CM
-LOCAL_C_INCLUDES := hardware/qcom/display/liboverlay/
-LOCAL_C_INCLUDES += hardware/qcom/display/libgenlock
-LOCAL_C_INCLUDES += hardware/qcom/display/libqdutils
-LOCAL_MODULE := gralloc.$(TARGET_BOARD_PLATFORM)
-LOCAL_MODULE_TAGS := optional
-LOCAL_CFLAGS := -DLOG_TAG=\"gralloc\" \
- -DDEBUG_CALC_FPS -Wno-missing-field-initializers
-LOCAL_SRC_FILES := gpu.cpp gralloc.cpp framebuffer.cpp mapper.cpp
-ifeq ($(TARGET_USES_POST_PROCESSING),true)
- LOCAL_CFLAGS += -DUSES_POST_PROCESSING
- LOCAL_C_INCLUDES += $(TARGET_OUT_HEADERS)/pp/inc
-endif
-
-ifeq ($(TARGET_USES_MDP3), true)
- LOCAL_CFLAGS += -DUSE_MDP3
-endif
-
-ifeq ($(TARGET_HAVE_HDMI_OUT),true)
- LOCAL_CFLAGS += -DHDMI_DUAL_DISPLAY
- LOCAL_SHARED_LIBRARIES += liboverlay
-endif
+LOCAL_MODULE := gralloc.$(TARGET_BOARD_PLATFORM)
+LOCAL_MODULE_PATH := $(TARGET_OUT_SHARED_LIBRARIES)/hw
+LOCAL_MODULE_TAGS := optional
+LOCAL_C_INCLUDES := $(common_includes)
+LOCAL_SHARED_LIBRARIES := $(common_libs) libmemalloc libgenlock
+LOCAL_SHARED_LIBRARIES += libqdutils libGLESv1_CM
+LOCAL_CFLAGS := $(common_flags) -DLOG_TAG=\"gralloc\"
+LOCAL_SRC_FILES := gpu.cpp gralloc.cpp framebuffer.cpp mapper.cpp
include $(BUILD_SHARED_LIBRARY)
#MemAlloc Library
include $(CLEAR_VARS)
-LOCAL_PRELINK_MODULE := false
-LOCAL_MODULE_PATH := $(TARGET_OUT_SHARED_LIBRARIES)
-LOCAL_C_INCLUDES := hardware/qcom/display/libqdutils
-LOCAL_SHARED_LIBRARIES := liblog libcutils libutils
-LOCAL_SRC_FILES := alloc_controller.cpp
-LOCAL_CFLAGS:= -DLOG_TAG=\"memalloc\"
-
+LOCAL_MODULE := libmemalloc
+LOCAL_MODULE_TAGS := optional
+LOCAL_C_INCLUDES := $(common_includes)
+LOCAL_SHARED_LIBRARIES := $(common_libs) libgenlock
+LOCAL_CFLAGS := $(common_flags) -DLOG_TAG=\"memalloc\"
+LOCAL_SRC_FILES := alloc_controller.cpp
ifeq ($(TARGET_USES_ION),true)
LOCAL_SRC_FILES += ionalloc.cpp
- LOCAL_CFLAGS += -DUSE_ION
else
LOCAL_SRC_FILES += ashmemalloc.cpp \
- pmemalloc.cpp \
- pmem_bestfit_alloc.cpp
+ pmemalloc.cpp \
+ pmem_bestfit_alloc.cpp
endif
-
-LOCAL_MODULE := libmemalloc
-LOCAL_MODULE_TAGS := optional
include $(BUILD_SHARED_LIBRARY)
View
31 libhwcomposer/Android.mk
@@ -1,23 +1,14 @@
LOCAL_PATH := $(call my-dir)
+include $(LOCAL_PATH)/../common.mk
include $(CLEAR_VARS)
-LOCAL_PRELINK_MODULE := false
-LOCAL_MODULE_PATH := $(TARGET_OUT_SHARED_LIBRARIES)/hw
-LOCAL_SHARED_LIBRARIES := liblog libcutils libhardware libutils libdl \
- libEGL liboverlay libgenlock libqdutils \
- libhardware_legacy libmemalloc
-LOCAL_SRC_FILES := hwc.cpp \
- hwc_video.cpp \
- hwc_utils.cpp \
- hwc_uimirror.cpp \
- hwc_ext_observer.cpp \
- hwc_copybit.cpp
-LOCAL_MODULE := hwcomposer.$(TARGET_BOARD_PLATFORM)
-LOCAL_C_INCLUDES := hardware/qcom/display/libgralloc
-LOCAL_C_INCLUDES += hardware/qcom/display/libgenlock
-LOCAL_C_INCLUDES += hardware/qcom/display/liboverlay
-LOCAL_C_INCLUDES += hardware/qcom/display/libcopybit
-LOCAL_C_INCLUDES += hardware/qcom/display/libqdutils
-LOCAL_CFLAGS:= -DLOG_TAG=\"$(TARGET_BOARD_PLATFORM).hwcomposer\"
-
-LOCAL_MODULE_TAGS := optional
+LOCAL_MODULE := hwcomposer.$(TARGET_BOARD_PLATFORM)
+LOCAL_MODULE_PATH := $(TARGET_OUT_SHARED_LIBRARIES)/hw
+LOCAL_MODULE_TAGS := optional
+LOCAL_C_INCLUDES := $(common_includes)
+LOCAL_SHARED_LIBRARIES := $(common_libs) libEGL liboverlay libgenlock \
+ libqdutils libhardware_legacy libdl libmemalloc
+LOCAL_CFLAGS := $(common_flags) -DLOG_TAG=\"hwcomposer\"
+LOCAL_SRC_FILES := hwc.cpp hwc_video.cpp hwc_utils.cpp \
+ hwc_uimirror.cpp hwc_ext_observer.cpp \
+ hwc_copybit.cpp
include $(BUILD_SHARED_LIBRARY)
View
16 liboverlay/Android.mk
@@ -1,11 +1,12 @@
LOCAL_PATH := $(call my-dir)
+include $(LOCAL_PATH)/../common.mk
include $(CLEAR_VARS)
-LOCAL_MODULE_PATH := $(TARGET_OUT_SHARED_LIBRARIES)
-LOCAL_SHARED_LIBRARIES := liblog
-LOCAL_SHARED_LIBRARIES += libcutils
-LOCAL_SHARED_LIBRARIES += libutils
-LOCAL_SHARED_LIBRARIES += libmemalloc
-LOCAL_C_INCLUDES := hardware/qcom/display/libgralloc
+LOCAL_MODULE := liboverlay
+LOCAL_MODULE_PATH := $(TARGET_OUT_SHARED_LIBRARIES)
+LOCAL_MODULE_TAGS := optional
+LOCAL_C_INCLUDES := $(common_includes)
+LOCAL_SHARED_LIBRARIES := $(common_libs) libmemalloc
+LOCAL_CFLAGS := $(common_flags) -DLOG_TAG=\"overlay\"
LOCAL_SRC_FILES := \
overlay.cpp \
overlayCtrl.cpp \
@@ -14,7 +15,4 @@ LOCAL_SRC_FILES := \
overlayRotator.cpp \
overlayTransitions.cpp
-LOCAL_CFLAGS:= -DLOG_TAG=\"overlay2\"
-LOCAL_MODULE := liboverlay
-LOCAL_MODULE_TAGS := optional
include $(BUILD_SHARED_LIBRARY)
View
14 libqdutils/Android.mk
@@ -1,11 +1,11 @@
LOCAL_PATH := $(call my-dir)
+include $(LOCAL_PATH)/../common.mk
include $(CLEAR_VARS)
-LOCAL_SRC_FILES := profiler.cpp mdp_version.cpp
-LOCAL_SHARED_LIBRARIES := libutils libcutils
-LOCAL_C_INCLUDES := hardware/qcom/display/libgralloc
-
-LOCAL_CFLAGS += -DDEBUG_CALC_FPS
-LOCAL_MODULE := libqdutils
-LOCAL_MODULE_TAGS := optional
+LOCAL_MODULE := libqdutils
+LOCAL_MODULE_TAGS := optional
+LOCAL_SHARED_LIBRARIES := $(common_libs)
+LOCAL_C_INCLUDES := $(common_includes)
+LOCAL_CFLAGS := $(common_flags)
+LOCAL_SRC_FILES := profiler.cpp mdp_version.cpp
include $(BUILD_SHARED_LIBRARY)
View
34 libtilerenderer/Android.mk
@@ -1,26 +1,22 @@
LOCAL_PATH := $(call my-dir)
+include $(LOCAL_PATH)/../common.mk
include $(CLEAR_VARS)
ifeq ($(USE_OPENGL_RENDERER),true)
-LOCAL_PRELINK_MODULE := false
-LOCAL_MODULE_PATH := $(TARGET_OUT_SHARED_LIBRARIES)
-LOCAL_SHARED_LIBRARIES := libutils libcutils libGLESv2 libhwui
+LOCAL_MODULE := libtilerenderer
+LOCAL_MODULE_TAGS := optional
+LOCAL_C_INCLUDES := \
+ frameworks/native/include/utils \
+ frameworks/base/libs/hwui \
+ external/skia/include/core \
+ external/skia/include/effects \
+ external/skia/include/images \
+ external/skia/src/ports \
+ external/skia/include/utils \
+ hardware/libhardware/include/hardware \
+ frameworks/native/opengl/include/GLES2
-LOCAL_C_INCLUDES += \
- frameworks/base/include/utils \
- frameworks/base/libs/hwui \
- external/skia/include/core \
- external/skia/include/effects \
- external/skia/include/images \
- external/skia/src/ports \
- external/skia/include/utils \
- hardware/libhardware/include/hardware \
- frameworks/base/opengl/include/GLES2
-
-LOCAL_SRC_FILES := \
- tilerenderer.cpp
-
-LOCAL_MODULE := libtilerenderer
-LOCAL_MODULE_TAGS := optional
+LOCAL_SHARED_LIBRARIES := $(common_libs) libGLESv2 libhwui
+LOCAL_SRC_FILES := tilerenderer.cpp
include $(BUILD_SHARED_LIBRARY)
endif
Please sign in to comment.
Something went wrong with that request. Please try again.