display: Clean up makefiles

* Move common includes and shared libraries to
a common location

* Clean up Makefile copyrights

Change-Id: I0427f0f98b4c039a691be0ef6f3deead2b4bfa02
This commit is contained in:
Naseer Ahmed 2012-07-11 23:43:42 -07:00
parent 6f012b4384
commit ee72cb0233
8 changed files with 109 additions and 156 deletions

30
common.mk Normal file
View File

@ -0,0 +1,30 @@
#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/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 := -DUSE_ION -DDEBUG_CALC_FPS -Wno-missing-field-initializers
ifeq ($(ARCH_ARM_HAVE_NEON),true)
common_flags += -D__ARM_HAVE_NEON
endif
common_deps :=
kernel_includes :=
#Kernel includes
ifeq ($(call is-vendor-board-platform,QCOM),true)
common_deps += $(TARGET_OUT_INTERMEDIATES)/KERNEL_OBJ/usr
kernel_includes += $(TARGET_OUT_INTERMEDIATES)/KERNEL_OBJ/usr/include
endif

View File

@ -1,59 +1,24 @@
# Copyright (C) 2008 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)
# 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
LOCAL_SRC_FILES := software_converter.cpp copybit.cpp
include $(BUILD_SHARED_LIBRARY)
endif
endif

View File

@ -1,14 +1,13 @@
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_ADDITIONAL_DEPENDENCIES := $(common_deps)
LOCAL_SRC_FILES := genlock.cpp
include $(BUILD_SHARED_LIBRARY)

View File

@ -1,58 +1,25 @@
# Copyright (C) 2008 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.
#gralloc module
LOCAL_PATH := $(call my-dir)
# HAL module implemenation, not prelinked and stored in
# hw/<OVERLAY_HARDWARE_MODULE_ID>.<ro.product.board>.so
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_ADDITIONAL_DEPENDENCIES := $(common_deps)
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 := ionalloc.cpp alloc_controller.cpp
LOCAL_CFLAGS:= -DLOG_TAG=\"memalloc\"
LOCAL_CFLAGS += -DUSE_ION
LOCAL_MODULE := libmemalloc
LOCAL_MODULE_TAGS := optional
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 := ionalloc.cpp alloc_controller.cpp
include $(BUILD_SHARED_LIBRARY)

View File

@ -1,18 +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
LOCAL_SHARED_LIBRARIES += libEGL liboverlay libgenlock libqdutils
LOCAL_SRC_FILES := hwc.cpp \
hwc_overlay.cpp \
hwc_utils.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/libqdutils
LOCAL_CFLAGS:= -DLOG_TAG=\"$(TARGET_BOARD_PLATFORM).hwcomposer\"
LOCAL_MODULE := hwcomposer.$(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) libEGL liboverlay libgenlock \
libqdutils
LOCAL_CFLAGS := $(common_flags) -DLOG_TAG=\"hwcomposer\"
LOCAL_ADDITIONAL_DEPENDENCIES := $(common_deps)
LOCAL_SRC_FILES := hwc.cpp hwc_overlay.cpp hwc_utils.cpp
LOCAL_MODULE_TAGS := optional
include $(BUILD_SHARED_LIBRARY)

View File

@ -1,11 +1,13 @@
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) $(kernel_includes)
LOCAL_SHARED_LIBRARIES := $(common_libs) libmemalloc
LOCAL_CFLAGS := $(common_flags) -DLOG_TAG=\"overlay\"
LOCAL_ADDITIONAL_DEPENDENCIES := $(common_deps)
LOCAL_SRC_FILES := \
overlay.cpp \
overlayCtrl.cpp \
@ -14,7 +16,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 File

@ -1,11 +1,12 @@
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) $(kernel_includes)
LOCAL_CFLAGS := $(common_flags)
LOCAL_ADDITIONAL_DEPENDENCIES := $(common_deps)
LOCAL_SRC_FILES := profiler.cpp mdp_version.cpp
include $(BUILD_SHARED_LIBRARY)

View File

@ -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/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_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