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