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