1 /*
   2  * Copyright (c) 2013, 2014, 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.ARMV6HF = [:]
  27 
  28 // Define the location of the sdk and toolchain
  29 def crossLibsPackage="armv6hf-02"
  30 def sdk=file("${rootProject.CROSS_TOOLS_DIR}/$crossLibsPackage")
  31 def compilerHome=file("${rootProject.CROSS_TOOLS_DIR}/gcc-linaro-arm-linux-gnueabihf-raspbian-2012.09-20120921_linux")
  32 def compilerPrefix
  33 def jniPlatform
  34 if (IS_LINUX) {
  35     fetchExternalTools('ARMV6HF',
  36             ["${crossLibsPackage}.tgz",
  37              "gcc-linaro-arm-linux-gnueabihf-raspbian-2012.09-20120921_linux.tgz" ],
  38             rootProject.CROSS_TOOLS_DIR, rootProject.IS_IMPORT_CROSS_TOOLS)
  39 
  40     compilerHome=file("${rootProject.CROSS_TOOLS_DIR}/gcc-linaro-arm-linux-gnueabihf-raspbian-2012.09-20120921_linux")
  41     compilerPrefix="arm-linux-gnueabihf-"
  42     jniPlatform="linux"
  43 } else if (IS_MAC) {
  44     fetchExternalTools('ARMV6HF',
  45             ["${crossLibsPackage}.tgz"],
  46             rootProject.CROSS_TOOLS_DIR, rootProject.IS_IMPORT_CROSS_TOOLS)
  47 
  48     compilerHome=file("/usr/local/arm-linux")
  49     compilerPrefix="arm-linux-"
  50     jniPlatform="darwin"
  51 } else {
  52     fail("armv6hf Cannot build on this platform")
  53 }
  54 
  55 if (rootProject.hasProperty("ARMV6HF_COMPILER")) {
  56     logger.quiet "Using alternate ARMV6HF_COMPILER $rootProject.ARMV6HF_COMPILER"
  57     compilerHome=file(rootProject.ARMV6HF_COMPILER);
  58 }
  59 if (rootProject.hasProperty("ARMV6HF_COMPILER_PREFIX")) {
  60     logger.quiet "Using alternate ARMV6HF_COMPILER_PREFIX $rootProject.ARMV6HF_COMPILER_PREFIX"
  61     compilerPrefix="${rootProject.ARMV6HF_COMPILER_PREFIX}"
  62 }
  63 
  64 def compiler = file("$compilerHome/bin/${compilerPrefix}gcc").getAbsolutePath()
  65 def linker = file("$compilerHome/bin/${compilerPrefix}g++").getAbsolutePath()
  66 
  67 // Declare whether this particular target file applies to the current system
  68 ARMV6HF.canBuild = (IS_LINUX || IS_MAC) && compilerHome.exists() && sdk.exists()
  69 if (!ARMV6HF.canBuild) {
  70     if (!compilerHome.exists()) println "ERROR: Missing compiler $compilerHome"
  71     if (!sdk.exists()) println "ERROR: Missing sdk $sdk"
  72     fail("armv6hf missing required tools")
  73 }
  74 
  75 // Lambda for naming the generated libs
  76 ARMV6HF.library = { name -> return "lib${name}.so" as String }
  77 
  78 ARMV6HF.compileSwing = false;
  79 ARMV6HF.compileSWT = false;
  80 ARMV6HF.compileFXPackager = false;
  81 ARMV6HF.compileWebnodeNative = false;
  82 
  83 ARMV6HF.includeLens = false
  84 ARMV6HF.includeMonocle = true
  85 ARMV6HF.includeNull3d = true
  86 ARMV6HF.includeEGL = true
  87 ARMV6HF.includeSwing = false
  88 ARMV6HF.includeSWT = false
  89 ARMV6HF.includeGTK = true
  90 
  91 ARMV6HF.javafxPlatformDefault="monocle"
  92 
  93 // Libraries end up in the sdk/rt/lib/arm directory for arm builds
  94 ARMV6HF.arch = "arm"
  95 ARMV6HF.libDest = "lib/arm"
  96 
  97 def commonFlags = [
  98         "-fno-strict-aliasing", "-fPIC", "-fno-omit-frame-pointer", // optimization flags
  99         "-W", "-Wall", "-Wno-unused", "-Wno-parentheses", "-Werror=implicit-function-declaration"] // warning flags
 100 // Specify the compilation parameters and link parameters
 101 def ccFlags = [
 102         commonFlags, "-I$JDK_HOME/include", "-I$JDK_HOME/include/$jniPlatform", "-c",
 103         IS_DEBUG_NATIVE ? ["-ggdb", "-DVERBOSE"] : ["-O2", "-DNDEBUG"]].flatten()
 104 //ccFlags.addAll(["-Wnon-virtual-dtor", "-Woverloaded-virtual", "-std=c++0x"])
 105 def linkFlags = ["-shared", commonFlags].flatten()
 106 
 107 // Specify the compilation parameters and link parameters
 108 def extraCFlags = [
 109         "-I", "-L",
 110         ccFlags,
 111         "-marm", "-mfloat-abi=hard", "-mfpu=vfp",
 112         "-I$sdk/usr/include",
 113         "-I$sdk/opt/vc/include",
 114         "-I$sdk/opt/vc/include/interface/vcos/pthreads",
 115         "-I$sdk/opt/vc/include/interface/vmcs_host/linux",
 116         "-DOMAP3", "-DUSE_DISPMAN"].flatten();
 117 
 118 //See if we should build for imx6
 119 def imxHeader=file("$sdk/usr/include/linux/mxcfb.h")
 120 if (imxHeader.exists()) {
 121         extraCFlags = [extraCFlags,"-DIMX6_PLATFORM"].flatten();
 122 }
 123 
 124 def extraLFlags = [
 125         "-I", "-L",
 126         linkFlags,
 127         "-L$sdk/lib/arm-linux-gnueabihf",
 128         "-L$sdk/usr/lib",
 129         "-L$sdk/usr/lib/arm-linux-gnueabihf",
 130         "-L$sdk/opt/vc/lib"].flatten()
 131 
 132 def lensLFlags = [extraLFlags, "-lpthread", "-ludev", "-ldl", "-lm"].flatten()
 133 def monocleCFlags = [
 134         extraCFlags,
 135         "-Werror",
 136         "-I", file("modules/graphics/src/main/native-glass/monocle/")].flatten();
 137 def monocleLFlags = [extraLFlags, "-ldl", "-lm"].flatten()
 138 
 139 def fontCFlags = [extraCFlags].flatten()
 140 def fontLFlags = [extraLFlags, "-ldl"].flatten()
 141 
 142 def iioCFlags = [extraCFlags, 
 143          "-Wno-main" // suppress warnings about using main as a variable, 3rd party code
 144          ].flatten()
 145 def iioLFlags = [extraLFlags].flatten()
 146 
 147 def es2EglfbCFlags = [extraCFlags, "-DIS_EGLFB", "-DLINUX"].flatten()
 148 def es2EglfbLFlags = [extraLFlags].flatten()
 149 def es2MonocleCFlags = [extraCFlags, "-DIS_EGLFB", "-DLINUX"].flatten()
 150 def es2MonocleLFlags = [extraLFlags].flatten()
 151 
 152 def es2X11CFlags = [extraCFlags, "-DUSE_XSHM", "-DDEBUG", "-DIS_EGLX11", "-DLINUX"].flatten()
 153 def es2X11LFlags = [extraLFlags, "-lX11", "-lXext", "-lXdmcp", "-lXau"].flatten()
 154 
 155 def mediaCFlags = [extraCFlags,
 156     "-I$sdk/usr/include/gstreamer-0.10",
 157     "-I$sdk/usr/include/glib-2.0",
 158     "-I$sdk/usr/lib/arm-linux-gnueabihf/glib-2.0/include",
 159     "-DENABLE_NATIVE_SOURCE=1", "-DENABLE_GST_FFMPEG=1"].flatten()
 160 def mediaLFlags = [extraLFlags, "-lgstreamer-0.10", "-lgstapp-0.10",
 161     "-lgstbase-0.10", "-lglib-2.0", "-lgobject-2.0", "-lgmodule-2.0", "-lgthread-2.0"].flatten()
 162 
 163 def webCFlags = [extraCFlags].flatten()
 164 def webLFlags = [extraLFlags].flatten()
 165 
 166 def gtkCFlags = [extraCFlags].flatten()
 167 def gtkLFlags = [extraLFlags].flatten()
 168 
 169 def gtkCFlags_pkgconfig = "-pthread -I${sdk}/usr/include/gtk-2.0 -I${sdk}/usr/lib/arm-linux-gnueabihf/gtk-2.0/include -I${sdk}/usr/include/atk-1.0 -I${sdk}/usr/include/cairo -I${sdk}/usr/include/gdk-pixbuf-2.0 -I${sdk}/usr/include/pango-1.0 -I${sdk}/usr/include/gio-unix-2.0/ -I${sdk}/usr/include -I${sdk}/usr/include/glib-2.0 -I${sdk}/usr/lib/arm-linux-gnueabihf/glib-2.0/include -I${sdk}/usr/include/pixman-1 -I${sdk}/usr/include/freetype2 -I${sdk}/usr/include/libpng12"
 170 
 171 def gtkLFlags_pkgconfig = "-pthread -L${sdk}/usr/lib/arm-linux-gnueabihf -lgtk-x11-2.0 -lgdk-x11-2.0 -latk-1.0 -lgio-2.0 -lpangoft2-1.0 -lpangocairo-1.0 -lgdk_pixbuf-2.0 -lcairo -lpango-1.0 -lfreetype -lfontconfig -lgobject-2.0 -lgthread-2.0 -lrt -lglib-2.0 -lXtst"
 172 
 173 gtkCFlags.addAll(gtkCFlags_pkgconfig.split(" "))
 174 gtkLFlags.addAll(gtkLFlags_pkgconfig.split(" "))
 175 
 176 def monoclePlatformAdditions = """
 177 monocle.glass.platform=Monocle
 178 monocle.prism.order=es2,sw
 179 monocle.prism.eglfb=true
 180 monocle.prism.lcdtext=false
 181 monocle.prism.maxvram=128m
 182 monocle.prism.targetvram=112m
 183 monocle.use.egl=true
 184 monocle.use.gles2=true
 185 monocle.embedded=monocle
 186 monocle.com.sun.javafx.isEmbedded=true
 187 monocle.doNativeComposite=true
 188 monocle.com.sun.javafx.scene.control.skin.FXVK.cache=true
 189 monocle.prism.glDepthSize=0
 190 monocle.com.sun.javafx.gestures.zoom=true
 191 monocle.com.sun.javafx.gestures.rotate=true
 192 monocle.com.sun.javafx.gestures.scroll=true"""
 193 
 194 def lensPlatformAdditions = """
 195 directfb.com.sun.javafx.scene.control.skin.ListViewSkin.pannable=true
 196 directfb.com.sun.javafx.scene.control.skin.TreeViewSkin.pannable=true
 197 directfb.com.sun.javafx.scene.control.skin.TableViewSkin.pannable=true
 198 directfb.glass.platform=Lens
 199 directfb.glass.lens=dfb
 200 directfb.prism.order=sw
 201 directfb.com.sun.javafx.isEmbedded=true
 202 directfb.com.sun.javafx.scene.control.skin.FXVK.cache=true
 203 directfb.com.sun.javafx.gestures.zoom=true
 204 directfb.com.sun.javafx.gestures.rotate=true
 205 directfb.com.sun.javafx.gestures.scroll=true
 206 eglfb.com.sun.javafx.scene.control.skin.ListViewSkin.pannable=true
 207 eglfb.com.sun.javafx.scene.control.skin.TreeViewSkin.pannable=true
 208 eglfb.com.sun.javafx.scene.control.skin.TableViewSkin.pannable=true
 209 eglfb.glass.platform=Lens
 210 eglfb.glass.lens=eglfb
 211 eglfb.prism.order=es2
 212 eglfb.prism.eglfb=true
 213 eglfb.prism.lcdtext=false
 214 eglfb.prism.maxvram=128m
 215 eglfb.prism.targetvram=112m
 216 eglfb.use.egl=true
 217 eglfb.use.gles2=true
 218 eglfb.embedded=eglfb
 219 eglfb.com.sun.javafx.isEmbedded=true
 220 eglfb.doNativeComposite=true
 221 eglfb.com.sun.javafx.scene.control.skin.FXVK.cache=true
 222 eglfb.prism.glDepthSize=0
 223 eglfb.com.sun.javafx.gestures.zoom=true
 224 eglfb.com.sun.javafx.gestures.rotate=true
 225 eglfb.com.sun.javafx.gestures.scroll=true
 226 fb.com.sun.javafx.scene.control.skin.ListViewSkin.pannable=true
 227 fb.com.sun.javafx.scene.control.skin.TreeViewSkin.pannable=true
 228 fb.com.sun.javafx.scene.control.skin.TableViewSkin.pannable=true
 229 fb.glass.platform=Lens
 230 fb.glass.lens=fb
 231 fb.prism.order=sw
 232 fb.com.sun.javafx.isEmbedded=true
 233 fb.glass.restrictWindowToScreen=true
 234 fb.com.sun.javafx.scene.control.skin.FXVK.cache=true
 235 fb.com.sun.javafx.gestures.zoom=true
 236 fb.com.sun.javafx.gestures.rotate=true
 237 fb.com.sun.javafx.gestures.scroll=true
 238 eglx11.com.sun.javafx.scene.control.skin.ListViewSkin.pannable=true
 239 eglx11.com.sun.javafx.scene.control.skin.TreeViewSkin.pannable=true
 240 eglx11.com.sun.javafx.scene.control.skin.TableViewSkin.pannable=true
 241 eglx11.glass.platform=Lens
 242 eglx11.glass.lens=eglx11
 243 eglx11.prism.order=es2
 244 eglx11.prism.eglx11=true
 245 eglx11.prism.lcdtext=false
 246 eglx11.prism.maxvram=128m
 247 eglx11.prism.targetvram=112m
 248 eglx11.use.egl=true
 249 eglx11.use.gles2=true
 250 eglx11.embedded=eglx11
 251 eglx11.com.sun.javafx.isEmbedded=true
 252 eglx11.com.sun.javafx.scene.control.skin.FXVK.cache=true
 253 eglx11.prism.glDepthSize=0
 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 
 258 def gtkPlatformAdditions = """
 259 gtk.com.sun.javafx.scene.control.skin.ListViewSkin.pannable=true
 260 gtk.com.sun.javafx.scene.control.skin.TreeViewSkin.pannable=true
 261 gtk.com.sun.javafx.scene.control.skin.TableViewSkin.pannable=true
 262 gtk.glass.platform=gtk
 263 gtk.prism.order=sw
 264 gtk.com.sun.javafx.isEmbedded=true
 265 gtk.com.sun.javafx.scene.control.skin.FXVK.cache=true
 266 gtk.com.sun.javafx.gestures.zoom=true
 267 gtk.com.sun.javafx.gestures.rotate=true
 268 gtk.com.sun.javafx.gestures.scroll=true"""
 269 
 270 def pangoCCFlags = [extraCFlags, "-D_ENABLE_PANGO"];
 271 def pangoLinkFlags = [extraLFlags];
 272 
 273 def pangoCFlags_pkgconfig = "-pthread -I${sdk}/usr/include/pango-1.0 -I${sdk}/usr/include/freetype2 -I${sdk}/usr/include -I${sdk}/usr/include/glib-2.0 -I${sdk}/usr/lib/arm-linux-gnueabihf/glib-2.0/include"
 274 
 275 def pangoLFlags_pkgconfig = "-L${sdk}/usr/lib/arm-linux-gnueabihf -lpangoft2-1.0 -lpango-1.0 -lfreetype -lfontconfig -lgobject-2.0 -lglib-2.0"
 276 
 277 pangoCCFlags.addAll(gtkCFlags_pkgconfig.split(" "))
 278 pangoLinkFlags.addAll(gtkLFlags_pkgconfig.split(" "))
 279 
 280 def freetypeCCFlags = [ext.IS_COMPILE_PANGO ? "-D_ENABLE_PANGO" :
 281                        ext.IS_COMPILE_HARFBUZZ ? "-D_ENABLE_HARFBUZZ" : ""]
 282 def freetypeLinkFlags = []
 283 
 284 def freetypeCFlags_pkgconfig = "-I${sdk}/usr/include/freetype2 -I${sdk}/usr/include"
 285 def freeytpeLFlags_pkgconfig = "-L${sdk}/usr/lib/arm-linux-gnueabihf -lfreetype"
 286 
 287 freetypeCCFlags.addAll(gtkCFlags_pkgconfig.split(" "))
 288 freetypeLinkFlags.addAll(gtkLFlags_pkgconfig.split(" "))
 289 
 290 ARMV6HF.javafxPlatformProperties = "javafx.platform=${ARMV6HF.javafxPlatformDefault}"
 291 
 292 ARMV6HF.glass = [:]
 293 ARMV6HF.glass.javahInclude = [
 294     "com/sun/glass/events/**",
 295     "com/sun/glass/ui/*"]
 296 ARMV6HF.glass.variants = [ ]
 297 if (ARMV6HF.includeLens) { 
 298     ARMV6HF.glass.variants.addAll("eglfb", "directfb", "fb", "lensport" );
 299     ARMV6HF.glass.javahInclude.addAll("com/sun/glass/ui/lens/*");
 300     ARMV6HF.javafxPlatformProperties = ARMV6HF.javafxPlatformProperties + lensPlatformAdditions
 301 }
 302 if (ARMV6HF.includeMonocle) { 
 303     ARMV6HF.glass.variants.addAll("monocle", "monocle_x11");
 304     ARMV6HF.glass.javahInclude.addAll(
 305         "com/sun/glass/ui/monocle/*",
 306         "com/sun/glass/ui/monocle/dispman/*",
 307         "com/sun/glass/ui/monocle/mx6/*",
 308         "com/sun/glass/ui/monocle/linux/*",
 309         "com/sun/glass/ui/monocle/util/*",
 310         "com/sun/glass/ui/monocle/x11/*");
 311     ARMV6HF.javafxPlatformProperties = ARMV6HF.javafxPlatformProperties + monoclePlatformAdditions
 312 }
 313 if (ARMV6HF.includeGTK) {
 314     ARMV6HF.glass.variants.addAll("gtk");
 315     ARMV6HF.glass.javahInclude.addAll("com/sun/glass/ui/gtk/*");
 316     ARMV6HF.javafxPlatformProperties = ARMV6HF.javafxPlatformProperties + gtkPlatformAdditions
 317 }
 318 
 319 ARMV6HF.glass.lib = "glass"
 320 
 321 ARMV6HF.glass.lensport = [:]
 322 ARMV6HF.glass.lensport.nativeSource = [
 323     file("modules/graphics/src/main/native-glass/lens/lensport") ]
 324 ARMV6HF.glass.lensport.compiler = compiler
 325 ARMV6HF.glass.lensport.ccFlags = ["-ffast-math", extraCFlags, "-DLINUX", "-DISEGLFB",
 326     "-DLENSPORT", "-I", file("modules/graphics/src/main/native-glass/lens/") ].flatten()
 327 ARMV6HF.glass.lensport.linker = linker
 328 ARMV6HF.glass.lensport.linkFlags = [lensLFlags].flatten()
 329 ARMV6HF.glass.lensport.lib = "lens_porting"
 330 
 331 ARMV6HF.glass.monocle = [:]
 332 ARMV6HF.glass.monocle.nativeSource = [
 333         file("modules/graphics/src/main/native-glass/monocle"),
 334         file("modules/graphics/src/main/native-glass/monocle/dispman"),
 335         file("modules/graphics/src/main/native-glass/monocle/mx6"),
 336         file("modules/graphics/src/main/native-glass/monocle/linux"),
 337         file("modules/graphics/src/main/native-glass/monocle/util") ]
 338 ARMV6HF.glass.monocle.compiler = compiler
 339 ARMV6HF.glass.monocle.ccFlags = monocleCFlags
 340 ARMV6HF.glass.monocle.linker = linker
 341 ARMV6HF.glass.monocle.linkFlags = monocleLFlags
 342 ARMV6HF.glass.monocle.lib = "glass_monocle"
 343 
 344 ARMV6HF.glass.monocle_x11 = [:]
 345 ARMV6HF.glass.monocle_x11.nativeSource = [
 346         file("modules/graphics/src/main/native-glass/monocle/util"),
 347         file("modules/graphics/src/main/native-glass/monocle/x11") ]
 348 ARMV6HF.glass.monocle_x11.compiler = compiler
 349 ARMV6HF.glass.monocle_x11.ccFlags = monocleCFlags
 350 ARMV6HF.glass.monocle_x11.linker = linker
 351 ARMV6HF.glass.monocle_x11.linkFlags = [ monocleLFlags, "-lX11" ].flatten()
 352 ARMV6HF.glass.monocle_x11.lib = "glass_monocle_x11"
 353 
 354 ARMV6HF.glass.eglfb = [:]
 355 // TODO when building headless, use lens/cursor/nullcursor/
 356 // otherwise we use lens/cursor/fbCursor/ and lens/input/udev
 357 
 358 // TODO when USE_RFB is specified use lens/rfb
 359 
 360 // TODO use /eglfb/x11ContainerScreen when using eglfb and EGL_X11_FB_CONTAINER
 361 // TODO use /headless/headlessScreen when using headless
 362 ARMV6HF.glass.eglfb.nativeSource = [
 363     file("modules/graphics/src/main/native-glass/lens"),
 364     file("modules/graphics/src/main/native-glass/lens/wm"),
 365     file("modules/graphics/src/main/native-glass/lens/cursor/fbCursor"),
 366     file("modules/graphics/src/main/native-glass/lens/input/udev"),
 367     file("modules/graphics/src/main/native-glass/lens/wm/screen/fbdevScreen.c") ]
 368 ARMV6HF.glass.eglfb.compiler = compiler
 369 ARMV6HF.glass.eglfb.ccFlags = ["-ffast-math", extraCFlags, "-DLINUX", "-DISEGLFB"].flatten()
 370 ARMV6HF.glass.eglfb.linker = linker
 371 ARMV6HF.glass.eglfb.linkFlags = [lensLFlags].flatten()
 372 ARMV6HF.glass.eglfb.lib = "glass_lens_eglfb"
 373 
 374 ARMV6HF.glass.directfb = [:]
 375 ARMV6HF.glass.directfb.nativeSource = [
 376     file("modules/graphics/src/main/native-glass/lens"),
 377     file("modules/graphics/src/main/native-glass/lens/wm"),
 378     file("modules/graphics/src/main/native-glass/lens/cursor/fbCursor"),
 379     file("modules/graphics/src/main/native-glass/lens/input/udev"),
 380     file("modules/graphics/src/main/native-glass/lens/wm/screen/dfbScreen.c") ]
 381 ARMV6HF.glass.directfb.compiler = compiler
 382 ARMV6HF.glass.directfb.ccFlags = ["-ffast-math", extraCFlags, "-I$sdk/usr/include/directfb", "-DLINUX"].flatten()
 383 ARMV6HF.glass.directfb.linker = linker
 384 ARMV6HF.glass.directfb.linkFlags = [lensLFlags].flatten()
 385 ARMV6HF.glass.directfb.lib = "glass_lens_dfb"
 386 
 387 ARMV6HF.glass.fb = [:]
 388 ARMV6HF.glass.fb.nativeSource = [
 389     file("modules/graphics/src/main/native-glass/lens"),
 390     file("modules/graphics/src/main/native-glass/lens/wm"),
 391     file("modules/graphics/src/main/native-glass/lens/cursor/fbCursor"),
 392     file("modules/graphics/src/main/native-glass/lens/input/udev"),
 393     file("modules/graphics/src/main/native-glass/lens/wm/screen/fbdevScreen.c") ]
 394 ARMV6HF.glass.fb.compiler = compiler
 395 ARMV6HF.glass.fb.ccFlags = ["-ffast-math", extraCFlags, "-DLINUX"].flatten()
 396 ARMV6HF.glass.fb.linker = linker
 397 ARMV6HF.glass.fb.linkFlags = [lensLFlags].flatten()
 398 ARMV6HF.glass.fb.lib = "glass_lens_fb"
 399 
 400 ARMV6HF.glass.eglx11 = [:]
 401 ARMV6HF.glass.eglx11.nativeSource = [
 402     file("modules/graphics/src/main/native-glass/lens"),
 403     file("modules/graphics/src/main/native-glass/lens/wm"),
 404     file("modules/graphics/src/main/native-glass/lens/cursor/fbCursor"),
 405     file("modules/graphics/src/main/native-glass/lens/input/udev"),
 406     file("modules/graphics/src/main/native-glass/lens/wm/screen/x11ContainerScreen.c")]
 407     //file("modules/graphics/src/main/native-glass/lens/wm/screen")]
 408 ARMV6HF.glass.eglx11.compiler = compiler
 409 ARMV6HF.glass.eglx11.ccFlags = ["-ffast-math", extraCFlags, "-DLINUX"].flatten()
 410 ARMV6HF.glass.eglx11.linker = linker
 411 ARMV6HF.glass.eglx11.linkFlags = [lensLFlags].flatten()
 412 ARMV6HF.glass.eglx11.lib = "glass_lens_eglx11"
 413 
 414 ARMV6HF.glass.gtk = [:]
 415 ARMV6HF.glass.gtk.nativeSource = file("modules/graphics/src/main/native-glass/gtk")
 416 ARMV6HF.glass.gtk.compiler = compiler
 417 ARMV6HF.glass.gtk.ccFlags = ["-ffast-math", gtkCFlags, "-DLINUX"].flatten()
 418 ARMV6HF.glass.gtk.linker = linker
 419 ARMV6HF.glass.gtk.linkFlags = [gtkLFlags, "-lstdc++"].flatten()
 420 ARMV6HF.glass.gtk.lib = "glass"
 421 
 422 ARMV6HF.decora = [:]
 423 ARMV6HF.decora.compiler = compiler
 424 ARMV6HF.decora.ccFlags = extraCFlags
 425 ARMV6HF.decora.linker = linker
 426 ARMV6HF.decora.linkFlags = extraLFlags
 427 ARMV6HF.decora.lib = "decora_sse"
 428 
 429 ARMV6HF.prism = [:]
 430 ARMV6HF.prism.javahInclude = ["com/sun/prism/impl/**/*", "com/sun/prism/PresentableState*"]
 431 ARMV6HF.prism.nativeSource = file("modules/graphics/src/main/native-prism")
 432 ARMV6HF.prism.compiler = compiler
 433 ARMV6HF.prism.ccFlags = [extraCFlags].flatten()
 434 ARMV6HF.prism.linker = linker
 435 ARMV6HF.prism.linkFlags = [extraLFlags].flatten()
 436 ARMV6HF.prism.lib = "prism_common"
 437 
 438 ARMV6HF.prismSW = [:]
 439 ARMV6HF.prismSW.javahInclude = ["com/sun/pisces/**/*"]
 440 ARMV6HF.prismSW.nativeSource = file("modules/graphics/src/main/native-prism-sw")
 441 ARMV6HF.prismSW.compiler = compiler
 442 ARMV6HF.prismSW.ccFlags = [extraCFlags].flatten()
 443 ARMV6HF.prismSW.linker = linker
 444 ARMV6HF.prismSW.linkFlags = [extraLFlags].flatten()
 445 ARMV6HF.prismSW.lib = "prism_sw"
 446 
 447 ARMV6HF.iio = [:]
 448 ARMV6HF.iio.javahInclude = ["com/sun/javafx/iio/**/*"]
 449 ARMV6HF.iio.nativeSource = [
 450     file("modules/graphics/src/main/native-iio"),
 451     file("modules/graphics/src/main/native-iio/libjpeg7")]
 452 ARMV6HF.iio.compiler = compiler
 453 ARMV6HF.iio.ccFlags = iioCFlags
 454 ARMV6HF.iio.linker = linker
 455 ARMV6HF.iio.linkFlags = iioLFlags
 456 ARMV6HF.iio.lib = "javafx_iio"
 457 
 458 ARMV6HF.prismES2 = [:]
 459 ARMV6HF.prismES2.variants = ["eglfb", "monocle"]
 460 ARMV6HF.prismES2.javahInclude = ["com/sun/prism/es2/**/*"]
 461 
 462 ARMV6HF.prismES2.eglfb = [:]
 463 ARMV6HF.prismES2.eglfb.nativeSource = [
 464     file("modules/graphics/src/main/native-prism-es2"),
 465     file("modules/graphics/src/main/native-prism-es2/GL"),
 466     file("modules/graphics/src/main/native-prism-es2/eglfb")
 467 ]
 468 ARMV6HF.prismES2.eglfb.compiler = compiler
 469 ARMV6HF.prismES2.eglfb.ccFlags = [ es2EglfbCFlags, "-I", ARMV6HF.glass.lensport.nativeSource ].flatten()
 470 ARMV6HF.prismES2.eglfb.linker = linker
 471 ARMV6HF.prismES2.eglfb.linkFlags = [ es2EglfbLFlags, "-dl" ] .flatten()
 472 ARMV6HF.prismES2.eglfb.lib = "prism_es2_eglfb"
 473 
 474 ARMV6HF.prismES2.monocle= [:]
 475 ARMV6HF.prismES2.monocle.nativeSource = [
 476     file("modules/graphics/src/main/native-prism-es2"),
 477     file("modules/graphics/src/main/native-prism-es2/GL"),
 478     file("modules/graphics/src/main/native-prism-es2/monocle")
 479 ]
 480 ARMV6HF.prismES2.monocle.compiler = compiler
 481 ARMV6HF.prismES2.monocle.ccFlags = [ es2EglfbCFlags, "-I", ARMV6HF.glass.lensport.nativeSource ].flatten()
 482 ARMV6HF.prismES2.monocle.linker = linker
 483 ARMV6HF.prismES2.monocle.linkFlags =[  es2EglfbLFlags, "-ldl" ].flatten()
 484 ARMV6HF.prismES2.monocle.lib = "prism_es2_monocle"
 485 
 486 ARMV6HF.prismES2.eglx11 = [:]
 487 ARMV6HF.prismES2.eglx11.nativeSource = [
 488     file("modules/graphics/src/main/native-prism-es2"),
 489     file("modules/graphics/src/main/native-prism-es2/GL"),
 490     file("modules/graphics/src/main/native-prism-es2/eglx11")
 491 ]
 492 ARMV6HF.prismES2.eglx11.compiler = compiler
 493 ARMV6HF.prismES2.eglx11.ccFlags = es2X11CFlags
 494 ARMV6HF.prismES2.eglx11.linker = linker
 495 ARMV6HF.prismES2.eglx11.linkFlags = es2X11LFlags
 496 ARMV6HF.prismES2.eglx11.lib = "prism_es2_eglx11"
 497 
 498 def closedDir = file("$projectDir/../rt-closed")
 499 ARMV6HF.font = [:]
 500 ARMV6HF.font.javahInclude = [
 501     "com/sun/javafx/font/**/*",
 502     "com/sun/javafx/text/**/*"]
 503 ARMV6HF.font.nativeSource = [file("modules/graphics/src/main/native-font")]
 504 ARMV6HF.font.compiler = compiler
 505 ARMV6HF.font.ccFlags = fontCFlags
 506 ARMV6HF.font.linker = linker
 507 ARMV6HF.font.linkFlags = fontLFlags
 508 ARMV6HF.font.lib = "javafx_font"
 509 
 510 ARMV6HF.fontT2K = [:]
 511 ARMV6HF.fontT2K.javahInclude = ["com/sun/javafx/font/t2k/**/*"]
 512 ARMV6HF.fontT2K.nativeSource = [
 513         file("$closedDir/javafx-font-t2k-native/src"),
 514         file("$closedDir/javafx-font-t2k-native/src/layout")]
 515 ARMV6HF.fontT2K.compiler = compiler
 516 ARMV6HF.fontT2K.ccFlags = [fontCFlags, "-DLE_STANDALONE"].flatten()
 517 ARMV6HF.fontT2K.linker = linker
 518 ARMV6HF.fontT2K.linkFlags = fontLFlags
 519 ARMV6HF.fontT2K.lib = "javafx_font_t2k"
 520 
 521 ARMV6HF.fontFreetype = [:]
 522 ARMV6HF.fontFreetype.javahInclude = ["com/sun/javafx/font/freetype/OSFreetype.class*"]
 523 ARMV6HF.fontFreetype.nativeSource = ["src/main/native-font/freetype.c"]
 524 ARMV6HF.fontFreetype.compiler = compiler
 525 ARMV6HF.fontFreetype.ccFlags = ["-DJFXFONT_PLUS", ccFlags, fontCFlags, freetypeCCFlags].flatten()
 526 ARMV6HF.fontFreetype.linker = linker
 527 ARMV6HF.fontFreetype.linkFlags = [linkFlags, fontLFlags, freetypeLinkFlags, "-ldl"].flatten()
 528 ARMV6HF.fontFreetype.lib = "javafx_font_freetype"
 529 
 530 ARMV6HF.fontPango = [:]
 531 ARMV6HF.fontPango.javahInclude = ["com/sun/javafx/font/freetype/OSPango.class"]
 532 ARMV6HF.fontPango.nativeSource = ["src/main/native-font/pango.c"]
 533 ARMV6HF.fontPango.compiler = compiler
 534 ARMV6HF.fontPango.ccFlags = ["-DJFXFONT_PLUS", ccFlags, pangoCCFlags].flatten()
 535 ARMV6HF.fontPango.linker = linker
 536 ARMV6HF.fontPango.linkFlags = [linkFlags, pangoLinkFlags].flatten()
 537 ARMV6HF.fontPango.lib = "javafx_font_pango"
 538 
 539 ARMV6HF.webkit = [:]
 540 ARMV6HF.webkit.binDir   = "$compilerHome/bin"
 541 ARMV6HF.webkit.compiler = compiler
 542 ARMV6HF.webkit.linker   = linker
 543 ARMV6HF.webkit.ar       = file("$compilerHome/bin/${compilerPrefix}ar").getAbsolutePath()
 544 ARMV6HF.webkit.objcopy  = file("$compilerHome/bin/${compilerPrefix}objcopy").getAbsolutePath()
 545 ARMV6HF.webkit.strip    = file("$compilerHome/bin/${compilerPrefix}strip").getAbsolutePath()
 546 ARMV6HF.webkit.ccFlags  = extraCFlags.join(' ')
 547 ARMV6HF.webkit.linkFlags = extraLFlags.join(' ')
 548 
 549 ARMV6HF.disableMedia = true
 550 ARMV6HF.media = [:]
 551 ARMV6HF.media.compiler = compiler
 552 ARMV6HF.media.linker = linker
 553 ARMV6HF.media.extra_cflags = mediaCFlags.join(' ')
 554 ARMV6HF.media.extra_ldflags = mediaLFlags.join(' ')
 555 
 556 ARMV6HF.deploy = [:]
 557 ARMV6HF.deploy.publicLibraryFilter = [
 558   "fxavcodecplugin-52.so",
 559   "fxavcodecplugin-53.so",
 560   "fxplugins.so",
 561   "libjfxwebkit.so",
 562   "libgstplugins-lite.so",
 563   "libgstreamer-lite.so",
 564   "libprism_es2_eglx11.so",
 565   "libglass_lens_fb.so"
 566 ]
 567 ARMV6HF.deploy.compressBigJar=true