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

Commit 222c70fc authored by Dan Willemsen's avatar Dan Willemsen
Browse files

Convert libGLES_android to Android.bp

See build/soong/README.md for more information.

It's split into two libraries since Soong does not support the .cpp.arm
syntax.

Bug: 122332691
Test: treehugger
Change-Id: Ia21e467509832401214c8475486c8a7dd49653f6
parent fc4aeea8
Loading
Loading
Loading
Loading
+99 −0
Original line number Original line Diff line number Diff line
//
// Build the software OpenGL ES library
//

cc_defaults {
    name: "libGLES_android_defaults",

    cflags: [
        "-DLOG_TAG=\"libagl\"",
        "-DGL_GLEXT_PROTOTYPES",
        "-DEGL_EGLEXT_PROTOTYPES",
        "-fvisibility=hidden",
        "-Wall",
        "-Werror",
    ],

    shared_libs: [
        "libcutils",
        "libhardware",
        "libutils",
        "liblog",
        "libpixelflinger",
        "libETC1",
        "libui",
        "libnativewindow",
    ],

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

    arch: {
        arm: {
            cflags: ["-fstrict-aliasing"],
        },

        mips: {
            cflags: [
                "-fstrict-aliasing",
                // The graphics code can generate division by zero
                "-mno-check-zero-division",
            ],
        },
    },
}

cc_library_shared {
    name: "libGLES_android",
    defaults: ["libGLES_android_defaults"],

    whole_static_libs: ["libGLES_android_arm"],

    srcs: [
        "egl.cpp",
        "state.cpp",
        "texture.cpp",
        "Tokenizer.cpp",
        "TokenManager.cpp",
        "TextureObjectManager.cpp",
        "BufferObjectManager.cpp",
    ],

    arch: {
        arm: {
            srcs: [
                "fixed_asm.S",
                "iterators.S",
            ],
        },

        mips: {
            rev6: {
                srcs: ["arch-mips/fixed_asm.S"],
            },
        },
    },

    relative_install_path: "egl",
}

cc_library_static {
    name: "libGLES_android_arm",
    defaults: ["libGLES_android_defaults"],

    srcs: [
        "array.cpp",
        "fp.cpp",
        "light.cpp",
        "matrix.cpp",
        "mipmap.cpp",
        "primitives.cpp",
        "vertex.cpp",
    ],

    arch: {
        arm: {
            instruction_set: "arm",
        },
    },
}

opengl/libagl/Android.mk

deleted100644 → 0
+0 −49
Original line number Original line Diff line number Diff line
LOCAL_PATH:= $(call my-dir)

#
# Build the software OpenGL ES library
#

include $(CLEAR_VARS)

LOCAL_SRC_FILES:= \
	egl.cpp                     \
	state.cpp		            \
	texture.cpp		            \
    Tokenizer.cpp               \
    TokenManager.cpp            \
    TextureObjectManager.cpp    \
    BufferObjectManager.cpp     \
	array.cpp.arm		        \
	fp.cpp.arm		            \
	light.cpp.arm		        \
	matrix.cpp.arm		        \
	mipmap.cpp.arm		        \
	primitives.cpp.arm	        \
	vertex.cpp.arm

LOCAL_CFLAGS += -DLOG_TAG=\"libagl\"
LOCAL_CFLAGS += -DGL_GLEXT_PROTOTYPES -DEGL_EGLEXT_PROTOTYPES
LOCAL_CFLAGS += -fvisibility=hidden

LOCAL_SHARED_LIBRARIES := libcutils libhardware libutils liblog libpixelflinger libETC1 libui libnativewindow

LOCAL_SRC_FILES_arm += fixed_asm.S iterators.S
LOCAL_CFLAGS_arm += -fstrict-aliasing

ifndef ARCH_MIPS_REV6
LOCAL_SRC_FILES_mips += arch-mips/fixed_asm.S
endif
LOCAL_CFLAGS_mips += -fstrict-aliasing
# The graphics code can generate division by zero
LOCAL_CFLAGS_mips += -mno-check-zero-division

LOCAL_CFLAGS += -Wall -Werror

# we need to access the private Bionic header <bionic_tls.h>
LOCAL_C_INCLUDES += bionic/libc/private

LOCAL_MODULE_RELATIVE_PATH := egl
LOCAL_MODULE:= libGLES_android

include $(BUILD_SHARED_LIBRARY)