1 /*
   2  * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
   3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   4  *
   5  * This code is free software; you can redistribute it and/or modify it
   6  * under the terms of the GNU General Public License version 2 only, as
   7  * published by the Free Software Foundation.  Oracle designates this
   8  * particular file as subject to the "Classpath" exception as provided
   9  * by Oracle in the LICENSE file that accompanied this code.
  10  *
  11  * This code is distributed in the hope that it will be useful, but WITHOUT
  12  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  13  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  14  * version 2 for more details (a copy is included in the LICENSE file that
  15  * accompanied this code).
  16  *
  17  * You should have received a copy of the GNU General Public License version
  18  * 2 along with this work; if not, write to the Free Software Foundation,
  19  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  20  *
  21  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  22  * or visit www.oracle.com if you need additional information or have any
  23  * questions.
  24  */
  25 
  26 ext.X86EGL = [:]
  27 
  28 def sdk
  29 def compilerHome
  30 def compilerPrefix
  31 def pkgconfig
  32 def jniPlatform
  33 if (IS_MAC) {
  34     jniPlatform="darwin"
  35     fetchExternalTools('X86EGL', [ "x86egl-01.tgz" ], 
  36         rootProject.CROSS_TOOLS_DIR, rootProject.IS_IMPORT_CROSS_TOOLS)
  37     sdk=file("${rootProject.CROSS_TOOLS_DIR}/x86egl-01")
  38     pkgconfig="${sdk}/bin/pkg-config"
  39 } else {
  40     jniPlatform="linux"
  41     sdk=""
  42     pkgconfig="pkg-config"
  43 }
  44 
  45 if (rootProject.hasProperty("X86EGL_COMPILER")) {
  46     logger.quiet "Using alternate X86EGL_COMPILER $rootProject.X86EGL_COMPILER"
  47     compilerHome=file(rootProject.X86EGL_COMPILER);
  48 } else {
  49     compilerHome=file("/usr");
  50 }
  51 if (rootProject.hasProperty("X86EGL_COMPILER_PREFIX")) {
  52     logger.quiet "Using alternate X86EGL_COMPILER_PREFIX $rootProject.X86EGL_COMPILER_PREFIX"
  53     compilerPrefix="${rootProject.X86EGL_COMPILER_PREFIX}"
  54 } else {
  55     compilerPrefix=""
  56 }
  57 
  58 // Declare whether this particular target file applies to the current system
  59 X86EGL.canBuild = (IS_LINUX || IS_MAC) && compilerHome.exists()
  60 if (!X86EGL.canBuild) {
  61     return;
  62 }
  63 
  64 // Lambda for naming the generated libs
  65 X86EGL.library = { name -> return "lib${name}.so" as String }
  66 
  67 X86EGL.compileSwing = false;
  68 X86EGL.compileSWT = false;
  69 X86EGL.compileFXPackager = false;
  70 X86EGL.compileDesignTime = false;
  71 
  72 // Libraries end up in the sdk/rt/lib/arm directory for arm builds
  73 X86EGL.libDest = "lib/i386"
  74 
  75 // TODO this is garbage. Each target file should define what it includes,
  76 // not what it excludes.
  77 X86EGL.jfxrtJarExcludes = [
  78     "**/*.hlsl",
  79     "com/sun/glass/ui/win",
  80     "com/sun/prism/d3d",
  81     "com/sun/prism/es2/gl/win",
  82     //"com/sun/prism/null3d",
  83     "com/sun/scenario/effect/impl/hw/d3d",
  84     
  85     "com/sun/glass/events/mac",
  86     "com/sun/glass/ui/mac",
  87     "com/sun/prism/es2/gl/mac",
  88     
  89     "com/sun/glass/ui/android",
  90     
  91     "com/sun/glass/ui/ios",
  92     
  93     "com/sun/glass/ui/swt", // SWT glass
  94     
  95     "javafx/embed/swing", // Swing Interop
  96     
  97     "javafx/embed/swt", // SWT Interop
  98 
  99     "com/sun/prism/es2/MacGL*",
 100     "com/sun/prism/es2/IOSGL*",
 101     "com/sun/prism/es2/WinGL*",
 102 ]
 103 
 104 def commonFlags = [
 105         "-fno-strict-aliasing", "-fPIC", "-fno-omit-frame-pointer", // optimization flags
 106         "-W", "-Wall", "-Wno-unused", "-Wno-parentheses", "-Werror=implicit-function-declaration"] // warning flags
 107 // Specify the compilation parameters and link parameters
 108 def ccFlags = [
 109         commonFlags,
 110         "-I$JDK_HOME/include", "-I$JDK_HOME/include/${jniPlatform}", "-c",
 111         IS_DEBUG_NATIVE ? ["-ggdb", "-DVERBOSE"] : "-O2"].flatten()
 112 //ccFlags.addAll(["-Wnon-virtual-dtor", "-Woverloaded-virtual", "-std=c++0x"])
 113 def linkFlags = ["-shared", commonFlags].flatten()
 114 
 115 // Specify the compilation parameters and link parameters
 116 def extraCFlags = [
 117         "-I", "-L",
 118         ccFlags,
 119         "-I$sdk/usr/include",
 120         "-DEGL_X11_FB_CONTAINER"].flatten();
 121 def extraLFlags = [
 122         "-I", "-L",
 123         "-L$sdk/usr/lib",
 124         "-L$sdk/usr/lib/i386-linux-gnu",
 125         linkFlags].flatten()
 126 
 127 def lensLFlags = [extraLFlags, "-lpthread", "-ludev", "-ldl", "-lm"].flatten()
 128 def monocleCFlags = [
 129         extraCFlags,
 130         "-Werror",
 131         "-I", file("modules/graphics/src/main/native-glass/monocle/")].flatten();
 132 def monocleLFlags = [extraLFlags, "-ldl", "-lm"].flatten()
 133 
 134 def fontCFlags = [extraCFlags].flatten()
 135 def fontLFlags = [extraLFlags].flatten()
 136 
 137 def iioCFlags = [extraCFlags].flatten()
 138 def iioLFlags = [extraLFlags].flatten()
 139 
 140 def es2EglfbCFlags = [extraCFlags, "-DIS_EGLFB", "-DLINUX", "-ffast-math" ].flatten()
 141 def es2EglfbLFlags = [extraLFlags].flatten()
 142 
 143 def es2X11CFlags = [extraCFlags, "-DUSE_XSHM", "-DDEBUG", "-DIS_EGLX11", "-DLINUX"].flatten()
 144 def es2X11LFlags = [extraLFlags, "-lX11", "-lXext", "-lXdmcp", "-lXau"].flatten()
 145 
 146 def mediaCFlags = [extraCFlags,
 147     "-I${sdk}/usr/include/gstreamer-0.10",
 148     "-I${sdk}/usr/include/glib-2.0",
 149     "-DENABLE.nativeSource=1", "-DENABLE_GST_FFMPEG=1"].flatten()
 150 def mediaLFlags = [extraLFlags, "-lgstreamer-0.10", "-lgstapp-0.10",
 151     "-lgstbase-0.10", "-lglib-2.0", "-lgobject-2.0", "-lgmodule-2.0", "-lgthread-2.0"].flatten()
 152 
 153 def webCFlags = [extraCFlags].flatten()
 154 def webLFlags = [extraLFlags].flatten()
 155 
 156 def gtkCFlags = [extraCFlags].flatten()
 157 def gtkLFlags = [extraLFlags].flatten()
 158 // Create $buildDir/x86egl_tools.properties file and load props from it
 159 setupTools("x86egl_tools",
 160         { propFile ->
 161             ByteArrayOutputStream results = new ByteArrayOutputStream();
 162 
 163             exec {
 164                 commandLine("$pkgconfig", "--cflags", "gtk+-2.0",
 165                         "gthread-2.0", "xtst");
 166                 setStandardOutput(results);
 167             }
 168             propFile << "cflags=" << results.toString().trim() << "\n";
 169 
 170             results = new ByteArrayOutputStream();
 171             exec {
 172                 commandLine "$pkgconfig", "--libs", "gtk+-2.0",
 173                         "gthread-2.0", "xtst"
 174                 standardOutput = results
 175             }
 176             propFile << "libs=" << results.toString().trim();
 177         },
 178         { properties ->
 179             gtkCFlags.addAll(properties.getProperty("cflags").split(" "))
 180             gtkLFlags.addAll(properties.getProperty("libs").split(" "))
 181         }
 182 )
 183 
 184 X86EGL.javafxPlatformProperties ="""javafx.platform=eglfb
 185 directfb.com.sun.javafx.scene.control.skin.ListViewSkin.pannable=true
 186 directfb.com.sun.javafx.scene.control.skin.TreeViewSkin.pannable=true
 187 directfb.com.sun.javafx.scene.control.skin.TableViewSkin.pannable=true
 188 directfb.glass.platform=Lens
 189 directfb.glass.lens=dfb
 190 directfb.prism.order=sw
 191 directfb.com.sun.javafx.isEmbedded=true
 192 directfb.com.sun.javafx.scene.control.skin.FXVK.cache=true
 193 directfb.com.sun.javafx.gestures.zoom=true
 194 directfb.com.sun.javafx.gestures.rotate=true
 195 directfb.com.sun.javafx.gestures.scroll=true
 196 eglfb.com.sun.javafx.scene.control.skin.ListViewSkin.pannable=true
 197 eglfb.com.sun.javafx.scene.control.skin.TreeViewSkin.pannable=true
 198 eglfb.com.sun.javafx.scene.control.skin.TableViewSkin.pannable=true
 199 eglfb.glass.platform=Lens
 200 eglfb.glass.lens=eglfb
 201 eglfb.prism.order=es2
 202 eglfb.prism.eglfb=true
 203 eglfb.prism.lcdtext=false
 204 eglfb.use.egl=true
 205 eglfb.use.gles2=true
 206 eglfb.embedded=eglfb
 207 eglfb.com.sun.javafx.isEmbedded=true
 208 eglfb.doNativeComposite=true
 209 eglfb.com.sun.javafx.scene.control.skin.FXVK.cache=true
 210 eglfb.com.sun.javafx.gestures.zoom=true
 211 eglfb.com.sun.javafx.gestures.rotate=true
 212 eglfb.com.sun.javafx.gestures.scroll=true
 213 fb.com.sun.javafx.scene.control.skin.ListViewSkin.pannable=true
 214 fb.com.sun.javafx.scene.control.skin.TreeViewSkin.pannable=true
 215 fb.com.sun.javafx.scene.control.skin.TableViewSkin.pannable=true
 216 fb.glass.platform=Lens
 217 fb.glass.lens=fb
 218 fb.prism.order=sw
 219 fb.com.sun.javafx.isEmbedded=true
 220 fb.glass.restrictWindowToScreen=true
 221 fb.com.sun.javafx.scene.control.skin.FXVK.cache=true
 222 fb.com.sun.javafx.gestures.zoom=true
 223 fb.com.sun.javafx.gestures.rotate=true
 224 fb.com.sun.javafx.gestures.scroll=true
 225 monocle.glass.platform=Monocle
 226 monocle.prism.order=es2,sw
 227 monocle.prism.eglfb=true
 228 monocle.prism.lcdtext=false
 229 monocle.prism.maxvram=128m
 230 monocle.prism.targetvram=112m
 231 monocle.use.egl=true
 232 monocle.use.gles2=true
 233 monocle.embedded=eglfb
 234 monocle.com.sun.javafx.isEmbedded=true
 235 monocle.doNativeComposite=true
 236 monocle.com.sun.javafx.scene.control.skin.FXVK.cache=true
 237 monocle.com.sun.javafx.gestures.zoom=true
 238 monocle.com.sun.javafx.gestures.rotate=true
 239 monocle.com.sun.javafx.gestures.scroll=true
 240 monocle.prism.glDepthSize=0
 241 eglx11.com.sun.javafx.scene.control.skin.ListViewSkin.pannable=true
 242 eglx11.com.sun.javafx.scene.control.skin.TreeViewSkin.pannable=true
 243 eglx11.com.sun.javafx.scene.control.skin.TableViewSkin.pannable=true
 244 eglx11.glass.platform=Lens
 245 eglx11.glass.lens=eglx11
 246 eglx11.prism.order=es2
 247 eglx11.prism.eglx11=true
 248 eglx11.prism.lcdtext=false
 249 eglx11.use.egl=true
 250 eglx11.use.gles2=true
 251 eglx11.embedded=eglx11
 252 eglx11.com.sun.javafx.isEmbedded=true
 253 eglx11.com.sun.javafx.scene.control.skin.FXVK.cache=true
 254 eglx11.com.sun.javafx.gestures.zoom=true
 255 eglx11.com.sun.javafx.gestures.rotate=true
 256 eglx11.com.sun.javafx.gestures.scroll=true
 257 gtk.com.sun.javafx.scene.control.skin.ListViewSkin.pannable=true
 258 gtk.com.sun.javafx.scene.control.skin.TreeViewSkin.pannable=true
 259 gtk.com.sun.javafx.scene.control.skin.TableViewSkin.pannable=true
 260 gtk.glass.platform=gtk
 261 gtk.prism.order=sw
 262 gtk.com.sun.javafx.isEmbedded=true
 263 gtk.com.sun.javafx.scene.control.skin.FXVK.cache=true
 264 gtk.com.sun.javafx.gestures.zoom=true
 265 gtk.com.sun.javafx.gestures.rotate=true
 266 gtk.com.sun.javafx.gestures.scroll=true"""
 267 
 268 def pangoCCFlags = ["-D_ENABLE_PANGO"];
 269 def pangoLinkFlags = [];
 270 setupTools("linux_pango_tools",
 271         { propFile ->
 272             ByteArrayOutputStream results = new ByteArrayOutputStream();
 273             exec {
 274                 commandLine "$pkgconfig", "--cflags", "pangoft2"
 275                 standardOutput = results
 276             }
 277             propFile << "cflags=" << results.toString().trim() << "\n";
 278 
 279             results = new ByteArrayOutputStream();
 280             exec {
 281                 commandLine "$pkgconfig", "--libs", "pangoft2"
 282                 standardOutput = results
 283             }
 284             propFile << "libs=" << results.toString().trim();
 285         },
 286         { properties ->
 287             pangoCCFlags.addAll(properties.getProperty("cflags").split(" "))
 288             pangoLinkFlags.addAll(properties.getProperty("libs").split(" "))
 289         }
 290 )
 291 
 292 def compiler = file("$compilerHome/bin/${compilerPrefix}gcc").getAbsolutePath()
 293 def linker = file("$compilerHome/bin/${compilerPrefix}g++").getAbsolutePath()
 294 
 295 X86EGL.glass = [:]
 296 X86EGL.glass.variants = ["eglfb", "directfb", "fb", "gtk", "lensport", "monocle", "monocle_x11"]
 297 X86EGL.glass.javahInclude = [
 298     "com/sun/glass/events/**",
 299     "com/sun/glass/ui/*",
 300     "com/sun/glass/ui/lens/*",
 301     "com/sun/glass/ui/monocle/*",
 302     "com/sun/glass/ui/monocle/linux/*",
 303     "com/sun/glass/ui/monocle/util/*",
 304     "com/sun/glass/ui/monocle/x11/*",
 305     "com/sun/glass/ui/gtk/*"]
 306 X86EGL.glass.lib = "glass"
 307 
 308 X86EGL.glass.monocle = [:]
 309 X86EGL.glass.monocle.nativeSource = [
 310         file("modules/graphics/src/main/native-glass/monocle"),
 311         file("modules/graphics/src/main/native-glass/monocle/linux"),
 312         file("modules/graphics/src/main/native-glass/monocle/util") ]
 313 X86EGL.glass.monocle.compiler = compiler
 314 X86EGL.glass.monocle.ccFlags = monocleCFlags
 315 X86EGL.glass.monocle.linker = linker
 316 X86EGL.glass.monocle.linkFlags = monocleLFlags
 317 X86EGL.glass.monocle.lib = "glass_monocle"
 318 
 319 X86EGL.glass.monocle_x11 = [:]
 320 X86EGL.glass.monocle_x11.nativeSource = [
 321         file("modules/graphics/src/main/native-glass/monocle/util"),
 322         file("modules/graphics/src/main/native-glass/monocle/x11") ]
 323 X86EGL.glass.monocle_x11.compiler = compiler
 324 X86EGL.glass.monocle_x11.ccFlags = monocleCFlags
 325 X86EGL.glass.monocle_x11.linker = linker
 326 X86EGL.glass.monocle_x11.linkFlags = [ monocleLFlags, "-lX11" ].flatten()
 327 X86EGL.glass.monocle_x11.lib = "glass_monocle_x11"
 328 
 329 X86EGL.glass.lensport = [:]
 330 X86EGL.glass.lensport.nativeSource = [
 331     file("modules/graphics/src/main/native-glass/lens/lensport") ]
 332 X86EGL.glass.lensport.compiler = compiler
 333 X86EGL.glass.lensport.ccFlags = ["-ffast-math", extraCFlags, "-DLINUX", "-DISEGLFB",
 334     "-DLENSPORT", "-I", file("modules/graphics/src/main/native-glass/lens/") ].flatten()
 335 X86EGL.glass.lensport.linker = linker
 336 X86EGL.glass.lensport.linkFlags = [lensLFlags].flatten()
 337 X86EGL.glass.lensport.lib = "lens_porting"
 338 
 339 X86EGL.glass.eglfb = [:]
 340 // TODO when building headless, use lens/cursor/nullcursor/
 341 // otherwise we use lens/cursor/fbCursor/ and lens/input/udev
 342 
 343 // TODO when USE_RFB is specified use lens/rfb
 344 
 345 // TODO use /headless/headlessScreen when using headless
 346 X86EGL.glass.eglfb.nativeSource = [
 347     file("modules/graphics/src/main/native-glass/lens"),
 348     file("modules/graphics/src/main/native-glass/lens/wm"),
 349     file("modules/graphics/src/main/native-glass/lens/cursor/fbCursor"),
 350     file("modules/graphics/src/main/native-glass/lens/input/udev"),
 351     file("modules/graphics/src/main/native-glass/lens/wm/screen/x11ContainerScreen.c") ]
 352     //file("modules/graphics/src/main/native-glass/lens/wm/screen")]
 353 X86EGL.glass.eglfb.compiler = compiler
 354 X86EGL.glass.eglfb.ccFlags = [ es2EglfbCFlags, "-I", X86EGL.glass.lensport.nativeSource ].flatten()
 355 X86EGL.glass.eglfb.linker = linker
 356 X86EGL.glass.eglfb.linkFlags = [lensLFlags].flatten()
 357 X86EGL.glass.eglfb.lib = "glass_lens_eglfb"
 358 
 359 X86EGL.glass.directfb = [:]
 360 X86EGL.glass.directfb.nativeSource = [
 361     file("modules/graphics/src/main/native-glass/lens"),
 362     file("modules/graphics/src/main/native-glass/lens/wm"),
 363     file("modules/graphics/src/main/native-glass/lens/cursor/fbCursor"),
 364     file("modules/graphics/src/main/native-glass/lens/input/udev"),
 365     file("modules/graphics/src/main/native-glass/lens/wm/screen/dfbScreen.c"),
 366     file("modules/graphics/src/main/native-glass/lens/lensport") ]
 367     //file("modules/graphics/src/main/native-glass/lens/wm/screen")]
 368 X86EGL.glass.directfb.compiler = compiler
 369 X86EGL.glass.directfb.ccFlags = ["-ffast-math", extraCFlags,
 370         "-I${sdk}/usr/include/directfb", "-DLINUX"].flatten()
 371 X86EGL.glass.directfb.linker = linker
 372 X86EGL.glass.directfb.linkFlags = [lensLFlags].flatten()
 373 X86EGL.glass.directfb.lib = "glass_lens_dfb"
 374 
 375 X86EGL.glass.fb = [:]
 376 X86EGL.glass.fb.nativeSource = [
 377     file("modules/graphics/src/main/native-glass/lens"),
 378     file("modules/graphics/src/main/native-glass/lens/wm"),
 379     file("modules/graphics/src/main/native-glass/lens/cursor/fbCursor"),
 380     file("modules/graphics/src/main/native-glass/lens/input/udev"),
 381     file("modules/graphics/src/main/native-glass/lens/wm/screen/fbdevScreen.c"),
 382     file("modules/graphics/src/main/native-glass/lens/lensport") ]
 383     //file("modules/graphics/src/main/native-glass/lens/wm/screen")]
 384 X86EGL.glass.fb.compiler = compiler
 385 X86EGL.glass.fb.ccFlags = ["-ffast-math", extraCFlags, "-DLINUX"].flatten()
 386 X86EGL.glass.fb.linker = linker
 387 X86EGL.glass.fb.linkFlags = [lensLFlags].flatten()
 388 X86EGL.glass.fb.lib = "glass_lens_fb"
 389 
 390 X86EGL.glass.eglx11 = [:]
 391 X86EGL.glass.eglx11.nativeSource = [
 392     file("modules/graphics/src/main/native-glass/lens"),
 393     file("modules/graphics/src/main/native-glass/lens/wm"),
 394     file("modules/graphics/src/main/native-glass/lens/cursor/fbCursor"),
 395     file("modules/graphics/src/main/native-glass/lens/input/udev"),
 396     file("modules/graphics/src/main/native-glass/lens/wm/screen/x11ContainerScreen.c")]
 397     //file("modules/graphics/src/main/native-glass/lens/wm/screen")]
 398 X86EGL.glass.eglx11.compiler = compiler
 399 X86EGL.glass.eglx11.ccFlags = ["-ffast-math", extraCFlags, "-DLINUX"].flatten()
 400 X86EGL.glass.eglx11.linker = linker
 401 X86EGL.glass.eglx11.linkFlags = [lensLFlags].flatten()
 402 X86EGL.glass.eglx11.lib = "glass_lens_eglx11"
 403 
 404 X86EGL.glass.gtk = [:]
 405 X86EGL.glass.gtk.nativeSource = file("modules/graphics/src/main/native-glass/gtk")
 406 X86EGL.glass.gtk.compiler = compiler
 407 X86EGL.glass.gtk.ccFlags = ["-ffast-math", gtkCFlags, "-DLINUX"].flatten()
 408 X86EGL.glass.gtk.linker = linker
 409 X86EGL.glass.gtk.linkFlags = [gtkLFlags, "-lstdc++"].flatten()
 410 X86EGL.glass.gtk.lib = "glass"
 411 
 412 X86EGL.decora = [:]
 413 X86EGL.decora.compiler = compiler
 414 X86EGL.decora.ccFlags = extraCFlags
 415 X86EGL.decora.linker = linker
 416 X86EGL.decora.linkFlags = extraLFlags
 417 X86EGL.decora.lib = "decora_sse"
 418 
 419 X86EGL.prism = [:]
 420 X86EGL.prism.javahInclude = ["com/sun/prism/impl/**/*", "com/sun/prism/PresentableState*"]
 421 X86EGL.prism.nativeSource = file("modules/graphics/src/main/native-prism")
 422 X86EGL.prism.compiler = compiler
 423 X86EGL.prism.ccFlags = [extraCFlags].flatten()
 424 X86EGL.prism.linker = linker
 425 X86EGL.prism.linkFlags = [extraLFlags, "-lX11", "-lXext", "-lXdmcp", "-lXau"].flatten()
 426 X86EGL.prism.lib = "prism_common"
 427 
 428 X86EGL.prismSW = [:]
 429 X86EGL.prismSW.javahInclude = ["com/sun/pisces/**/*"]
 430 X86EGL.prismSW.nativeSource = file("modules/graphics/src/main/native-prism-sw")
 431 X86EGL.prismSW.compiler = compiler
 432 X86EGL.prismSW.ccFlags = [extraCFlags].flatten()
 433 X86EGL.prismSW.linker = linker
 434 X86EGL.prismSW.linkFlags = [extraLFlags].flatten()
 435 X86EGL.prismSW.lib = "prism_sw"
 436 
 437 X86EGL.iio = [:]
 438 X86EGL.iio.javahInclude = ["com/sun/javafx/iio/**/*"]
 439 X86EGL.iio.nativeSource = [
 440     file("modules/graphics/src/main/native-iio"),
 441     file("modules/graphics/src/main/native-iio/libjpeg7")]
 442 X86EGL.iio.compiler = compiler
 443 X86EGL.iio.ccFlags = iioCFlags
 444 X86EGL.iio.linker = linker
 445 X86EGL.iio.linkFlags = iioLFlags
 446 X86EGL.iio.lib = "javafx_iio"
 447 
 448 X86EGL.prismES2 = [:]
 449 X86EGL.prismES2.variants = ["eglfb", "monocle"]
 450 X86EGL.prismES2.javahInclude = ["com/sun/prism/es2/**/*"]
 451 
 452 X86EGL.prismES2.eglfb = [:]
 453 X86EGL.prismES2.eglfb.nativeSource = [
 454     file("modules/graphics/src/main/native-prism-es2"),
 455     file("modules/graphics/src/main/native-prism-es2/GL"),
 456     file("modules/graphics/src/main/native-prism-es2/eglfb")
 457 ]
 458 X86EGL.prismES2.eglfb.compiler = compiler
 459 X86EGL.prismES2.eglfb.ccFlags = [ es2EglfbCFlags, "-I", X86EGL.glass.lensport.nativeSource ].flatten()
 460 X86EGL.prismES2.eglfb.linker = linker
 461 X86EGL.prismES2.eglfb.linkFlags = es2EglfbLFlags
 462 X86EGL.prismES2.eglfb.lib = "prism_es2_eglfb"
 463 
 464 X86EGL.prismES2.eglx11 = [:]
 465 X86EGL.prismES2.eglx11.nativeSource = [
 466     file("modules/graphics/src/main/native-prism-es2"),
 467     file("modules/graphics/src/main/native-prism-es2/GL"),
 468     file("modules/graphics/src/main/native-prism-es2/eglx11")
 469 ]
 470 X86EGL.prismES2.eglx11.compiler = compiler
 471 X86EGL.prismES2.eglx11.ccFlags = es2X11CFlags
 472 X86EGL.prismES2.eglx11.linker = linker
 473 X86EGL.prismES2.eglx11.linkFlags = es2X11LFlags
 474 X86EGL.prismES2.eglx11.lib = "prism_es2_eglx11"
 475 
 476 X86EGL.prismES2.monocle= [:]
 477 X86EGL.prismES2.monocle.nativeSource = [
 478         file("modules/graphics/src/main/native-prism-es2"),
 479         file("modules/graphics/src/main/native-prism-es2/GL"),
 480         file("modules/graphics/src/main/native-prism-es2/monocle")
 481 ]
 482 X86EGL.prismES2.monocle.compiler = compiler
 483 X86EGL.prismES2.monocle.ccFlags = [ es2EglfbCFlags, "-I", X86EGL.glass.lensport.nativeSource ].flatten()
 484 X86EGL.prismES2.monocle.linker = linker
 485 X86EGL.prismES2.monocle.linkFlags = es2EglfbLFlags
 486 X86EGL.prismES2.monocle.lib = "prism_es2_monocle"
 487 
 488 def closedDir = file("$projectDir/../rt-closed")
 489 X86EGL.font = [:]
 490 X86EGL.font.javahInclude = [
 491     "com/sun/javafx/font/**/*",
 492     "com/sun/javafx/text/**/*"]
 493 X86EGL.font.nativeSource = [file("modules/graphics/src/main/native-font")]
 494 X86EGL.font.compiler = compiler
 495 X86EGL.font.ccFlags = fontCFlags
 496 X86EGL.font.linker = linker
 497 X86EGL.font.linkFlags = fontLFlags
 498 X86EGL.font.lib = "javafx_font"
 499 
 500 X86EGL.fontT2K = [:]
 501 X86EGL.fontT2K.javahInclude = ["com/sun/javafx/font/t2k/**/*"]
 502 X86EGL.fontT2K.nativeSource = [
 503         file("$closedDir/javafx-font-t2k-native/src"),
 504         file("$closedDir/javafx-font-t2k-native/src/layout")]
 505 X86EGL.fontT2K.compiler = compiler
 506 X86EGL.fontT2K.ccFlags = [fontCFlags, "-DLE_STANDALONE"].flatten()
 507 X86EGL.fontT2K.linker = linker
 508 X86EGL.fontT2K.linkFlags = fontLFlags
 509 X86EGL.fontT2K.lib = "javafx_font_t2k"
 510 
 511 X86EGL.fontPango = [:]
 512 X86EGL.fontPango.javahInclude = ["com/sun/javafx/font/pango/*"]
 513 X86EGL.fontPango.nativeSource = [
 514     "src/main/native-font/pango.c",
 515     "src/main/native-font/freetype.c"]
 516 X86EGL.fontPango.compiler = compiler
 517 X86EGL.fontPango.ccFlags = ["-DJFXFONT_PLUS", ccFlags, pangoCCFlags].flatten()
 518 X86EGL.fontPango.linker = linker
 519 X86EGL.fontPango.linkFlags = [linkFlags, pangoLinkFlags].flatten()
 520 X86EGL.fontPango.lib = "javafx_font_pango"
 521 
 522 X86EGL.media =[:]
 523 X86EGL.media.compiler = compiler
 524 X86EGL.media.linker = linker
 525 X86EGL.media.lib = "ar"