blob: 427214758e0066c4f8f9bfbdf840d447825408b0 [file] [log] [blame]
# Copyright 2016 The Fuchsia Authors
#
# Permission is hereby granted, free of charge, to any person obtaining a
# copy of this software and associated documentation files (the "Software"),
# to deal in the Software without restriction, including without limitation
# the rights to use, copy, modify, merge, publish, distribute, sublicense,
# and/or sell copies of the Software, and to permit persons to whom the
# Software is furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice (including the next
# paragraph) shall be included in all copies or substantial portions of the
# Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
# IN THE SOFTWARE.
import("//garnet/lib/magma/gnbuild/magma.gni")
shared_library("EGL") {
public_deps = [
"$mesa_build_root/include:EGL",
]
deps = [
":dri2_driver",
":main",
]
}
source_set("EGL_source") {
public_deps = [
"$mesa_build_root/include:EGL",
]
deps = [
":dri2_driver",
":main",
]
}
source_set("main") {
public_deps = [
"$mesa_build_root/include:EGL",
]
deps = [
"$mesa_build_root/include:c_compat",
]
include_dirs = [ "main" ]
cflags = [ "-fPIC" ]
sources = [
"main/egl.def",
"main/egl.pc.in",
"main/eglapi.c",
"main/eglapi.h",
"main/eglarray.c",
"main/eglarray.h",
"main/eglcompiler.h",
"main/eglconfig.c",
"main/eglconfig.h",
"main/eglcontext.c",
"main/eglcontext.h",
"main/eglcurrent.c",
"main/eglcurrent.h",
"main/egldefines.h",
"main/egldisplay.c",
"main/egldisplay.h",
"main/egldriver.c",
"main/egldriver.h",
"main/eglfallbacks.c",
"main/eglglobals.c",
"main/eglglobals.h",
"main/eglimage.c",
"main/eglimage.h",
"main/egllog.c",
"main/egllog.h",
"main/eglsurface.c",
"main/eglsurface.h",
"main/eglsync.c",
"main/eglsync.h",
"main/egltypedefs.h",
]
}
source_set("dri2_driver") {
include_dirs = [
"main",
"$mesa_build_root/src",
]
cflags = [
"-fPIC",
]
driver_path = rebase_path("$root_out_dir")
defines = [
"DEFAULT_DRIVER_DIR=\"$driver_path\"",
"HAVE_DRM_PLATFORM",
"HAVE_LIBDRM",
"_EGL_BUILT_IN_DRIVER_DRI2",
]
sources = [
"drivers/dri2/egl_dri2.c",
"drivers/dri2/egl_dri2.h",
"drivers/dri2/egl_dri2_fallbacks.h",
"drivers/dri2/platform_drm.c",
"drivers/dri2/platform_surfaceless.c",
]
deps = [
":main",
"$mesa_build_root/include:GL",
"$mesa_build_root/include:c_compat",
"$mesa_build_root/src/gbm:gbm_source",
"$mesa_build_root/src/loader",
"$mesa_build_root/src/mesa/drivers/dri/i965:i965_dri",
"$mesa_build_root/src/util:headers",
"$magma_build_root/hacks:drm_headers_hacks", #todo(MA-8)
]
}