Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 4149a66f authored by Dan Willemsen's avatar Dan Willemsen Committed by android-build-merger
Browse files

Convert to Android.bp am: 3106c1c4

am: 2d4e12f1

Change-Id: Iaed7fa8aa07d9bbcf3614e6a0ec859d623997dbc
parents 57d2697a 2d4e12f1
Loading
Loading
Loading
Loading

libs/gui/Android.bp

0 → 100644
+111 −0
Original line number Diff line number Diff line
// Copyright 2010 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.

cc_library_shared {
    name: "libgui",

    clang: true,
    cppflags: [
        "-Weverything",
        "-Werror",

        // The static constructors and destructors in this library have not been noted to
        // introduce significant overheads
        "-Wno-exit-time-destructors",
        "-Wno-global-constructors",

        // We only care about compiling as C++14
        "-Wno-c++98-compat-pedantic",

        // We don't need to enumerate every case in a switch as long as a default case
        // is present
        "-Wno-switch-enum",

        // Allow calling variadic macros without a __VA_ARGS__ list
        "-Wno-gnu-zero-variadic-macro-arguments",

        // Don't warn about struct padding
        "-Wno-padded",

        // android/sensors.h uses nested anonymous unions and anonymous structs
        "-Wno-nested-anon-types",
        "-Wno-gnu-anonymous-struct",

        "-DDEBUG_ONLY_CODE=0",
    ],

    product_variables: {
        brillo: {
            cflags: ["-DHAVE_NO_SURFACE_FLINGER"],
        },
        debuggable: {
            cppflags: [
                "-UDEBUG_ONLY_CODE",
                "-DDEBUG_ONLY_CODE=1",
            ],
        },
    },

    srcs: [
        "IGraphicBufferConsumer.cpp",
        "IConsumerListener.cpp",
        "BitTube.cpp",
        "BufferItem.cpp",
        "BufferItemConsumer.cpp",
        "BufferQueue.cpp",
        "BufferQueueConsumer.cpp",
        "BufferQueueCore.cpp",
        "BufferQueueProducer.cpp",
        "BufferSlot.cpp",
        "ConsumerBase.cpp",
        "CpuConsumer.cpp",
        "DisplayEventReceiver.cpp",
        "GLConsumer.cpp",
        "GraphicBufferAlloc.cpp",
        "GuiConfig.cpp",
        "IDisplayEventConnection.cpp",
        "IGraphicBufferAlloc.cpp",
        "IGraphicBufferProducer.cpp",
        "IProducerListener.cpp",
        "ISensorEventConnection.cpp",
        "ISensorServer.cpp",
        "ISurfaceComposer.cpp",
        "ISurfaceComposerClient.cpp",
        "LayerState.cpp",
        "OccupancyTracker.cpp",
        "Sensor.cpp",
        "SensorEventQueue.cpp",
        "SensorManager.cpp",
        "StreamSplitter.cpp",
        "Surface.cpp",
        "SurfaceControl.cpp",
        "SurfaceComposerClient.cpp",
        "SyncFeatures.cpp",
    ],

    shared_libs: [
        "libbinder",
        "libcutils",
        "libEGL",
        "libGLESv2",
        "libsync",
        "libui",
        "libutils",
        "liblog",
    ],

    export_shared_lib_headers: ["libbinder"],
}

subdirs = ["tests"]

libs/gui/Android.mk

deleted100644 → 0
+0 −109
Original line number Diff line number Diff line
# Copyright 2010 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 $(CLEAR_VARS)

LOCAL_CLANG := true
LOCAL_CPPFLAGS := -Weverything -Werror

# The static constructors and destructors in this library have not been noted to
# introduce significant overheads
LOCAL_CPPFLAGS += -Wno-exit-time-destructors
LOCAL_CPPFLAGS += -Wno-global-constructors

# We only care about compiling as C++14
LOCAL_CPPFLAGS += -Wno-c++98-compat-pedantic

# We don't need to enumerate every case in a switch as long as a default case
# is present
LOCAL_CPPFLAGS += -Wno-switch-enum

# Allow calling variadic macros without a __VA_ARGS__ list
LOCAL_CPPFLAGS += -Wno-gnu-zero-variadic-macro-arguments

# Don't warn about struct padding
LOCAL_CPPFLAGS += -Wno-padded

# android/sensors.h uses nested anonymous unions and anonymous structs
LOCAL_CPPFLAGS += -Wno-nested-anon-types -Wno-gnu-anonymous-struct

LOCAL_CPPFLAGS += -DDEBUG_ONLY_CODE=$(if $(filter userdebug eng,$(TARGET_BUILD_VARIANT)),1,0)

LOCAL_SRC_FILES := \
	IGraphicBufferConsumer.cpp \
	IConsumerListener.cpp \
	BitTube.cpp \
	BufferItem.cpp \
	BufferItemConsumer.cpp \
	BufferQueue.cpp \
	BufferQueueConsumer.cpp \
	BufferQueueCore.cpp \
	BufferQueueProducer.cpp \
	BufferSlot.cpp \
	ConsumerBase.cpp \
	CpuConsumer.cpp \
	DisplayEventReceiver.cpp \
	GLConsumer.cpp \
	GraphicBufferAlloc.cpp \
	GuiConfig.cpp \
	IDisplayEventConnection.cpp \
	IGraphicBufferAlloc.cpp \
	IGraphicBufferProducer.cpp \
	IProducerListener.cpp \
	ISensorEventConnection.cpp \
	ISensorServer.cpp \
	ISurfaceComposer.cpp \
	ISurfaceComposerClient.cpp \
	LayerState.cpp \
	OccupancyTracker.cpp \
	Sensor.cpp \
	SensorEventQueue.cpp \
	SensorManager.cpp \
	StreamSplitter.cpp \
	Surface.cpp \
	SurfaceControl.cpp \
	SurfaceComposerClient.cpp \
	SyncFeatures.cpp \

LOCAL_SHARED_LIBRARIES := \
	libbinder \
	libcutils \
	libEGL \
	libGLESv2 \
	libsync \
	libui \
	libutils \
	liblog

LOCAL_EXPORT_SHARED_LIBRARY_HEADERS := libbinder

LOCAL_MODULE := libgui

ifeq ($(TARGET_BOARD_PLATFORM), tegra)
	LOCAL_CFLAGS += -DDONT_USE_FENCE_SYNC
endif
ifeq ($(TARGET_BOARD_PLATFORM), tegra3)
	LOCAL_CFLAGS += -DDONT_USE_FENCE_SYNC
endif

ifeq ($(TARGET_BOARD_HAS_NO_SURFACE_FLINGER), true)
	LOCAL_CFLAGS += -DHAVE_NO_SURFACE_FLINGER
endif

include $(BUILD_SHARED_LIBRARY)

ifeq (,$(ONE_SHOT_MAKEFILE))
include $(call first-makefiles-under,$(LOCAL_PATH))
endif
+42 −0
Original line number Diff line number Diff line
// Build the unit tests,

// Build the binary to $(TARGET_OUT_DATA_NATIVE_TESTS)/$(LOCAL_MODULE)
// to integrate with auto-test framework.
cc_test {
    name: "libgui_test",

    clang: true,

    srcs: [
        "BufferQueue_test.cpp",
        "CpuConsumer_test.cpp",
        "FillBuffer.cpp",
        "GLTest.cpp",
        "IGraphicBufferProducer_test.cpp",
        "MultiTextureConsumer_test.cpp",
        "Sensor_test.cpp",
        "SRGB_test.cpp",
        "StreamSplitter_test.cpp",
        "SurfaceTextureClient_test.cpp",
        "SurfaceTextureFBO_test.cpp",
        "SurfaceTextureGLThreadToGL_test.cpp",
        "SurfaceTextureGLToGL_test.cpp",
        "SurfaceTextureGL_test.cpp",
        "SurfaceTextureMultiContextGL_test.cpp",
        "Surface_test.cpp",
        "TextureRenderer.cpp",
    ],

    shared_libs: [
        "liblog",
        "libEGL",
        "libGLESv1_CM",
        "libGLESv2",
        "libbinder",
        "libcutils",
        "libgui",
        "libsync",
        "libui",
        "libutils",
    ],
}

libs/gui/tests/Android.mk

deleted100644 → 0
+0 −54
Original line number Diff line number Diff line
# Build the unit tests,
LOCAL_PATH:= $(call my-dir)
include $(CLEAR_VARS)
LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk

LOCAL_CLANG := true

LOCAL_MODULE := libgui_test

LOCAL_MODULE_TAGS := tests

LOCAL_SRC_FILES := \
    BufferQueue_test.cpp \
    CpuConsumer_test.cpp \
    FillBuffer.cpp \
    GLTest.cpp \
    IGraphicBufferProducer_test.cpp \
    MultiTextureConsumer_test.cpp \
    Sensor_test.cpp \
    SRGB_test.cpp \
    StreamSplitter_test.cpp \
    SurfaceTextureClient_test.cpp \
    SurfaceTextureFBO_test.cpp \
    SurfaceTextureGLThreadToGL_test.cpp \
    SurfaceTextureGLToGL_test.cpp \
    SurfaceTextureGL_test.cpp \
    SurfaceTextureMultiContextGL_test.cpp \
    Surface_test.cpp \
    TextureRenderer.cpp \

LOCAL_SHARED_LIBRARIES := \
	liblog \
	libEGL \
	libGLESv1_CM \
	libGLESv2 \
	libbinder \
	libcutils \
	libgui \
	libsync \
	libui \
	libutils \

# Build the binary to $(TARGET_OUT_DATA_NATIVE_TESTS)/$(LOCAL_MODULE)
# to integrate with auto-test framework.
include $(BUILD_NATIVE_TEST)

# Include subdirectory makefiles
# ============================================================

# If we're building with ONE_SHOT_MAKEFILE (mm, mmm), then what the framework
# team really wants is to build the stuff defined by this makefile.
ifeq (,$(ONE_SHOT_MAKEFILE))
include $(call first-makefiles-under,$(LOCAL_PATH))
endif
+113 −0
Original line number Diff line number Diff line
@@ -45,3 +45,116 @@ ndk_library {
    symbol_file: "libGLESv3.map.txt",
    first_version: "18",
}

cc_defaults {
    name: "gl_libs_defaults",
    cflags: [
        "-DGL_GLEXT_PROTOTYPES",
        "-DEGL_EGLEXT_PROTOTYPES",
        "-fvisibility=hidden",
    ],
    shared_libs: [
        "libcutils",
        "liblog",
        "libdl",
    ],

    // we need to access the private Bionic header <bionic_tls.h>
    include_dirs: ["bionic/libc/private"],
}

//##############################################################################
// Build META EGL library
//
cc_defaults {
    name: "egl_libs_defaults",
    defaults: ["gl_libs_defaults"],
    cflags: [
        "-DLOG_TAG=\"libEGL\"",
    ],
    shared_libs: [
        "libbinder",
        "libutils",
        "libui",
    ],
}

cc_library_static {
    name: "libEGL_getProcAddress",
    defaults: ["egl_libs_defaults"],
    srcs: ["EGL/getProcAddress.cpp"],
    arch: {
        arm: {
            instruction_set: "arm",
        },
    },
}

cc_library_shared {
    name: "libEGL",
    defaults: ["egl_libs_defaults"],
    srcs: [
        "EGL/egl_tls.cpp",
        "EGL/egl_cache.cpp",
        "EGL/egl_display.cpp",
        "EGL/egl_object.cpp",
        "EGL/egl.cpp",
        "EGL/eglApi.cpp",
        "EGL/Loader.cpp",
    ],
    static_libs: ["libEGL_getProcAddress"],
    ldflags: ["-Wl,--exclude-libs=ALL"],

    required: ["egl.cfg"],
}

cc_defaults {
    name: "gles_libs_defaults",
    defaults: ["gl_libs_defaults"],
    arch: {
        arm: {
            instruction_set: "arm",

            // TODO: This is to work around b/20093774. Remove after root cause is fixed
            ldflags: ["-Wl,--hash-style,both"],
        },
    },
    shared_libs: ["libEGL"],
}

//##############################################################################
// Build the wrapper OpenGL ES 1.x library
//
cc_library_shared {
    name: "libGLESv1_CM",
    defaults: ["gles_libs_defaults"],
    srcs: ["GLES_CM/gl.cpp"],

    cflags: ["-DLOG_TAG=\"libGLESv1\""],
}

//##############################################################################
// Build the wrapper OpenGL ES 2.x library
//
cc_library_shared {
    name: "libGLESv2",
    defaults: ["gles_libs_defaults"],
    srcs: ["GLES2/gl2.cpp"],

    shared_libs: ["libutils"],

    cflags: ["-DLOG_TAG=\"libGLESv2\""],
}

//##############################################################################
// Build the wrapper OpenGL ES 3.x library (this is just different name for v2)
//
cc_library_shared {
    name: "libGLESv3",
    defaults: ["gles_libs_defaults"],
    srcs: ["GLES2/gl2.cpp"],

    shared_libs: ["libutils"],

    cflags: ["-DLOG_TAG=\"libGLESv3\""],
}
Loading