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.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.compileDesignTime = false; 82 83 ARMV6HF.includeLens = true 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 setupTools("armv6hf_tools", 169 { propFile -> 170 ByteArrayOutputStream results = new ByteArrayOutputStream(); 171 exec { 172 commandLine("$sdk/bin/pkg-config", "--cflags", "gtk+-2.0", "gthread-2.0", "xtst"); 173 setStandardOutput(results); 174 } 175 propFile << "cflags=" << results.toString().trim() << "\n"; 176 177 results = new ByteArrayOutputStream(); 178 exec { 179 commandLine "$sdk/bin/pkg-config", "--libs", "gtk+-2.0", "gthread-2.0", "xtst" 180 standardOutput = results 181 } 182 propFile << "libs=" << results.toString().trim(); 183 }, 184 { properties -> 185 if (properties.getProperty("cflags") == null || properties.getProperty("libs") == null ) { 186 fail("pkg-config failed for tools") 187 throw new GradleException("FAIL: pkg-config failed for tools") 188 } 189 gtkCFlags.addAll(properties.getProperty("cflags").split(" ")) 190 gtkLFlags.addAll(properties.getProperty("libs").split(" ")) 191 } 192 ) 193 194 def monoclePlatformAdditions = """ 195 monocle.glass.platform=Monocle 196 monocle.prism.order=es2,sw 197 monocle.prism.eglfb=true 198 monocle.prism.lcdtext=false 199 monocle.prism.maxvram=128m 200 monocle.prism.targetvram=112m 201 monocle.use.egl=true 202 monocle.use.gles2=true 203 monocle.embedded=monocle 204 monocle.com.sun.javafx.isEmbedded=true 205 monocle.doNativeComposite=true 206 monocle.com.sun.javafx.scene.control.skin.FXVK.cache=true 207 monocle.prism.glDepthSize=0 208 monocle.com.sun.javafx.gestures.zoom=true 209 monocle.com.sun.javafx.gestures.rotate=true 210 monocle.com.sun.javafx.gestures.scroll=true""" 211 212 def lensPlatformAdditions = """ 213 directfb.com.sun.javafx.scene.control.skin.ListViewSkin.pannable=true 214 directfb.com.sun.javafx.scene.control.skin.TreeViewSkin.pannable=true 215 directfb.com.sun.javafx.scene.control.skin.TableViewSkin.pannable=true 216 directfb.glass.platform=Lens 217 directfb.glass.lens=dfb 218 directfb.prism.order=sw 219 directfb.com.sun.javafx.isEmbedded=true 220 directfb.com.sun.javafx.scene.control.skin.FXVK.cache=true 221 directfb.com.sun.javafx.gestures.zoom=true 222 directfb.com.sun.javafx.gestures.rotate=true 223 directfb.com.sun.javafx.gestures.scroll=true 224 eglfb.com.sun.javafx.scene.control.skin.ListViewSkin.pannable=true 225 eglfb.com.sun.javafx.scene.control.skin.TreeViewSkin.pannable=true 226 eglfb.com.sun.javafx.scene.control.skin.TableViewSkin.pannable=true 227 eglfb.glass.platform=Lens 228 eglfb.glass.lens=eglfb 229 eglfb.prism.order=es2 230 eglfb.prism.eglfb=true 231 eglfb.prism.lcdtext=false 232 eglfb.prism.maxvram=128m 233 eglfb.prism.targetvram=112m 234 eglfb.use.egl=true 235 eglfb.use.gles2=true 236 eglfb.embedded=eglfb 237 eglfb.com.sun.javafx.isEmbedded=true 238 eglfb.doNativeComposite=true 239 eglfb.com.sun.javafx.scene.control.skin.FXVK.cache=true 240 eglfb.prism.glDepthSize=0 241 eglfb.com.sun.javafx.gestures.zoom=true 242 eglfb.com.sun.javafx.gestures.rotate=true 243 eglfb.com.sun.javafx.gestures.scroll=true 244 fb.com.sun.javafx.scene.control.skin.ListViewSkin.pannable=true 245 fb.com.sun.javafx.scene.control.skin.TreeViewSkin.pannable=true 246 fb.com.sun.javafx.scene.control.skin.TableViewSkin.pannable=true 247 fb.glass.platform=Lens 248 fb.glass.lens=fb 249 fb.prism.order=sw 250 fb.com.sun.javafx.isEmbedded=true 251 fb.glass.restrictWindowToScreen=true 252 fb.com.sun.javafx.scene.control.skin.FXVK.cache=true 253 fb.com.sun.javafx.gestures.zoom=true 254 fb.com.sun.javafx.gestures.rotate=true 255 fb.com.sun.javafx.gestures.scroll=true 256 eglx11.com.sun.javafx.scene.control.skin.ListViewSkin.pannable=true 257 eglx11.com.sun.javafx.scene.control.skin.TreeViewSkin.pannable=true 258 eglx11.com.sun.javafx.scene.control.skin.TableViewSkin.pannable=true 259 eglx11.glass.platform=Lens 260 eglx11.glass.lens=eglx11 261 eglx11.prism.order=es2 262 eglx11.prism.eglx11=true 263 eglx11.prism.lcdtext=false 264 eglx11.prism.maxvram=128m 265 eglx11.prism.targetvram=112m 266 eglx11.use.egl=true 267 eglx11.use.gles2=true 268 eglx11.embedded=eglx11 269 eglx11.com.sun.javafx.isEmbedded=true 270 eglx11.com.sun.javafx.scene.control.skin.FXVK.cache=true 271 eglx11.prism.glDepthSize=0 272 eglx11.com.sun.javafx.gestures.zoom=true 273 eglx11.com.sun.javafx.gestures.rotate=true 274 eglx11.com.sun.javafx.gestures.scroll=true""" 275 276 def gtkPlatformAdditions = """ 277 gtk.com.sun.javafx.scene.control.skin.ListViewSkin.pannable=true 278 gtk.com.sun.javafx.scene.control.skin.TreeViewSkin.pannable=true 279 gtk.com.sun.javafx.scene.control.skin.TableViewSkin.pannable=true 280 gtk.glass.platform=gtk 281 gtk.prism.order=sw 282 gtk.com.sun.javafx.isEmbedded=true 283 gtk.com.sun.javafx.scene.control.skin.FXVK.cache=true 284 gtk.com.sun.javafx.gestures.zoom=true 285 gtk.com.sun.javafx.gestures.rotate=true 286 gtk.com.sun.javafx.gestures.scroll=true""" 287 288 def pangoCCFlags = [extraCFlags, "-D_ENABLE_PANGO"]; 289 def pangoLinkFlags = [extraLFlags]; 290 setupTools("armv6hf_pango_tools", 291 { propFile -> 292 ByteArrayOutputStream results = new ByteArrayOutputStream(); 293 exec { 294 commandLine "$sdk/bin/pkg-config", "--cflags", "pangoft2" 295 standardOutput = results 296 } 297 propFile << "cflags=" << results.toString().trim() << "\n"; 298 299 results = new ByteArrayOutputStream(); 300 exec { 301 commandLine "$sdk/bin/pkg-config", "--libs", "pangoft2" 302 standardOutput = results 303 } 304 propFile << "libs=" << results.toString().trim(); 305 }, 306 { properties -> 307 pangoCCFlags.addAll(properties.getProperty("cflags").split(" ")) 308 pangoLinkFlags.addAll(properties.getProperty("libs").split(" ")) 309 } 310 ) 311 312 def freetypeCCFlags = [ext.IS_COMPILE_PANGO ? "-D_ENABLE_PANGO" : 313 ext.IS_COMPILE_HARFBUZZ ? "-D_ENABLE_HARFBUZZ" : ""] 314 def freetypeLinkFlags = [] 315 setupTools("armv6hf_freetype_tools", 316 { propFile -> 317 ByteArrayOutputStream results = new ByteArrayOutputStream(); 318 exec { 319 commandLine "$sdk/bin/pkg-config", "--cflags", "freetype2" 320 standardOutput = results 321 } 322 propFile << "cflags=" << results.toString().trim() << "\n"; 323 324 results = new ByteArrayOutputStream(); 325 exec { 326 commandLine "$sdk/bin/pkg-config", "--libs", "freetype2" 327 standardOutput = results 328 } 329 propFile << "libs=" << results.toString().trim(); 330 }, 331 { properties -> 332 freetypeCCFlags.addAll(properties.getProperty("cflags").split(" ")) 333 freetypeLinkFlags.addAll(properties.getProperty("libs").split(" ")) 334 } 335 ) 336 337 ARMV6HF.javafxPlatformProperties = "javafx.platform=${ARMV6HF.javafxPlatformDefault}" 338 339 ARMV6HF.glass = [:] 340 ARMV6HF.glass.javahInclude = [ 341 "com/sun/glass/events/**", 342 "com/sun/glass/ui/*"] 343 ARMV6HF.glass.variants = [ ] 344 if (ARMV6HF.includeLens) { 345 ARMV6HF.glass.variants.addAll("eglfb", "directfb", "fb", "lensport" ); 346 ARMV6HF.glass.javahInclude.addAll("com/sun/glass/ui/lens/*"); 347 ARMV6HF.javafxPlatformProperties = ARMV6HF.javafxPlatformProperties + lensPlatformAdditions 348 } 349 if (ARMV6HF.includeMonocle) { 350 ARMV6HF.glass.variants.addAll("monocle", "monocle_x11"); 351 ARMV6HF.glass.javahInclude.addAll( 352 "com/sun/glass/ui/monocle/*", 353 "com/sun/glass/ui/monocle/dispman/*", 354 "com/sun/glass/ui/monocle/mx6/*", 355 "com/sun/glass/ui/monocle/linux/*", 356 "com/sun/glass/ui/monocle/util/*", 357 "com/sun/glass/ui/monocle/x11/*"); 358 ARMV6HF.javafxPlatformProperties = ARMV6HF.javafxPlatformProperties + monoclePlatformAdditions 359 } 360 if (ARMV6HF.includeGTK) { 361 ARMV6HF.glass.variants.addAll("gtk"); 362 ARMV6HF.glass.javahInclude.addAll("com/sun/glass/ui/gtk/*"); 363 ARMV6HF.javafxPlatformProperties = ARMV6HF.javafxPlatformProperties + gtkPlatformAdditions 364 } 365 366 ARMV6HF.glass.lib = "glass" 367 368 ARMV6HF.glass.lensport = [:] 369 ARMV6HF.glass.lensport.nativeSource = [ 370 file("modules/graphics/src/main/native-glass/lens/lensport") ] 371 ARMV6HF.glass.lensport.compiler = compiler 372 ARMV6HF.glass.lensport.ccFlags = ["-ffast-math", extraCFlags, "-DLINUX", "-DISEGLFB", 373 "-DLENSPORT", "-I", file("modules/graphics/src/main/native-glass/lens/") ].flatten() 374 ARMV6HF.glass.lensport.linker = linker 375 ARMV6HF.glass.lensport.linkFlags = [lensLFlags].flatten() 376 ARMV6HF.glass.lensport.lib = "lens_porting" 377 378 ARMV6HF.glass.monocle = [:] 379 ARMV6HF.glass.monocle.nativeSource = [ 380 file("modules/graphics/src/main/native-glass/monocle"), 381 file("modules/graphics/src/main/native-glass/monocle/dispman"), 382 file("modules/graphics/src/main/native-glass/monocle/mx6"), 383 file("modules/graphics/src/main/native-glass/monocle/linux"), 384 file("modules/graphics/src/main/native-glass/monocle/util") ] 385 ARMV6HF.glass.monocle.compiler = compiler 386 ARMV6HF.glass.monocle.ccFlags = monocleCFlags 387 ARMV6HF.glass.monocle.linker = linker 388 ARMV6HF.glass.monocle.linkFlags = monocleLFlags 389 ARMV6HF.glass.monocle.lib = "glass_monocle" 390 391 ARMV6HF.glass.monocle_x11 = [:] 392 ARMV6HF.glass.monocle_x11.nativeSource = [ 393 file("modules/graphics/src/main/native-glass/monocle/util"), 394 file("modules/graphics/src/main/native-glass/monocle/x11") ] 395 ARMV6HF.glass.monocle_x11.compiler = compiler 396 ARMV6HF.glass.monocle_x11.ccFlags = monocleCFlags 397 ARMV6HF.glass.monocle_x11.linker = linker 398 ARMV6HF.glass.monocle_x11.linkFlags = [ monocleLFlags, "-lX11" ].flatten() 399 ARMV6HF.glass.monocle_x11.lib = "glass_monocle_x11" 400 401 ARMV6HF.glass.eglfb = [:] 402 // TODO when building headless, use lens/cursor/nullcursor/ 403 // otherwise we use lens/cursor/fbCursor/ and lens/input/udev 404 405 // TODO when USE_RFB is specified use lens/rfb 406 407 // TODO use /eglfb/x11ContainerScreen when using eglfb and EGL_X11_FB_CONTAINER 408 // TODO use /headless/headlessScreen when using headless 409 ARMV6HF.glass.eglfb.nativeSource = [ 410 file("modules/graphics/src/main/native-glass/lens"), 411 file("modules/graphics/src/main/native-glass/lens/wm"), 412 file("modules/graphics/src/main/native-glass/lens/cursor/fbCursor"), 413 file("modules/graphics/src/main/native-glass/lens/input/udev"), 414 file("modules/graphics/src/main/native-glass/lens/wm/screen/fbdevScreen.c") ] 415 ARMV6HF.glass.eglfb.compiler = compiler 416 ARMV6HF.glass.eglfb.ccFlags = ["-ffast-math", extraCFlags, "-DLINUX", "-DISEGLFB"].flatten() 417 ARMV6HF.glass.eglfb.linker = linker 418 ARMV6HF.glass.eglfb.linkFlags = [lensLFlags].flatten() 419 ARMV6HF.glass.eglfb.lib = "glass_lens_eglfb" 420 421 ARMV6HF.glass.directfb = [:] 422 ARMV6HF.glass.directfb.nativeSource = [ 423 file("modules/graphics/src/main/native-glass/lens"), 424 file("modules/graphics/src/main/native-glass/lens/wm"), 425 file("modules/graphics/src/main/native-glass/lens/cursor/fbCursor"), 426 file("modules/graphics/src/main/native-glass/lens/input/udev"), 427 file("modules/graphics/src/main/native-glass/lens/wm/screen/dfbScreen.c") ] 428 ARMV6HF.glass.directfb.compiler = compiler 429 ARMV6HF.glass.directfb.ccFlags = ["-ffast-math", extraCFlags, "-I$sdk/usr/include/directfb", "-DLINUX"].flatten() 430 ARMV6HF.glass.directfb.linker = linker 431 ARMV6HF.glass.directfb.linkFlags = [lensLFlags].flatten() 432 ARMV6HF.glass.directfb.lib = "glass_lens_dfb" 433 434 ARMV6HF.glass.fb = [:] 435 ARMV6HF.glass.fb.nativeSource = [ 436 file("modules/graphics/src/main/native-glass/lens"), 437 file("modules/graphics/src/main/native-glass/lens/wm"), 438 file("modules/graphics/src/main/native-glass/lens/cursor/fbCursor"), 439 file("modules/graphics/src/main/native-glass/lens/input/udev"), 440 file("modules/graphics/src/main/native-glass/lens/wm/screen/fbdevScreen.c") ] 441 ARMV6HF.glass.fb.compiler = compiler 442 ARMV6HF.glass.fb.ccFlags = ["-ffast-math", extraCFlags, "-DLINUX"].flatten() 443 ARMV6HF.glass.fb.linker = linker 444 ARMV6HF.glass.fb.linkFlags = [lensLFlags].flatten() 445 ARMV6HF.glass.fb.lib = "glass_lens_fb" 446 447 ARMV6HF.glass.eglx11 = [:] 448 ARMV6HF.glass.eglx11.nativeSource = [ 449 file("modules/graphics/src/main/native-glass/lens"), 450 file("modules/graphics/src/main/native-glass/lens/wm"), 451 file("modules/graphics/src/main/native-glass/lens/cursor/fbCursor"), 452 file("modules/graphics/src/main/native-glass/lens/input/udev"), 453 file("modules/graphics/src/main/native-glass/lens/wm/screen/x11ContainerScreen.c")] 454 //file("modules/graphics/src/main/native-glass/lens/wm/screen")] 455 ARMV6HF.glass.eglx11.compiler = compiler 456 ARMV6HF.glass.eglx11.ccFlags = ["-ffast-math", extraCFlags, "-DLINUX"].flatten() 457 ARMV6HF.glass.eglx11.linker = linker 458 ARMV6HF.glass.eglx11.linkFlags = [lensLFlags].flatten() 459 ARMV6HF.glass.eglx11.lib = "glass_lens_eglx11" 460 461 ARMV6HF.glass.gtk = [:] 462 ARMV6HF.glass.gtk.nativeSource = file("modules/graphics/src/main/native-glass/gtk") 463 ARMV6HF.glass.gtk.compiler = compiler 464 ARMV6HF.glass.gtk.ccFlags = ["-ffast-math", gtkCFlags, "-DLINUX"].flatten() 465 ARMV6HF.glass.gtk.linker = linker 466 ARMV6HF.glass.gtk.linkFlags = [gtkLFlags, "-lstdc++"].flatten() 467 ARMV6HF.glass.gtk.lib = "glass" 468 469 ARMV6HF.decora = [:] 470 ARMV6HF.decora.compiler = compiler 471 ARMV6HF.decora.ccFlags = extraCFlags 472 ARMV6HF.decora.linker = linker 473 ARMV6HF.decora.linkFlags = extraLFlags 474 ARMV6HF.decora.lib = "decora_sse" 475 476 ARMV6HF.prism = [:] 477 ARMV6HF.prism.javahInclude = ["com/sun/prism/impl/**/*", "com/sun/prism/PresentableState*"] 478 ARMV6HF.prism.nativeSource = file("modules/graphics/src/main/native-prism") 479 ARMV6HF.prism.compiler = compiler 480 ARMV6HF.prism.ccFlags = [extraCFlags].flatten() 481 ARMV6HF.prism.linker = linker 482 ARMV6HF.prism.linkFlags = [extraLFlags].flatten() 483 ARMV6HF.prism.lib = "prism_common" 484 485 ARMV6HF.prismSW = [:] 486 ARMV6HF.prismSW.javahInclude = ["com/sun/pisces/**/*"] 487 ARMV6HF.prismSW.nativeSource = file("modules/graphics/src/main/native-prism-sw") 488 ARMV6HF.prismSW.compiler = compiler 489 ARMV6HF.prismSW.ccFlags = [extraCFlags].flatten() 490 ARMV6HF.prismSW.linker = linker 491 ARMV6HF.prismSW.linkFlags = [extraLFlags].flatten() 492 ARMV6HF.prismSW.lib = "prism_sw" 493 494 ARMV6HF.iio = [:] 495 ARMV6HF.iio.javahInclude = ["com/sun/javafx/iio/**/*"] 496 ARMV6HF.iio.nativeSource = [ 497 file("modules/graphics/src/main/native-iio"), 498 file("modules/graphics/src/main/native-iio/libjpeg7")] 499 ARMV6HF.iio.compiler = compiler 500 ARMV6HF.iio.ccFlags = iioCFlags 501 ARMV6HF.iio.linker = linker 502 ARMV6HF.iio.linkFlags = iioLFlags 503 ARMV6HF.iio.lib = "javafx_iio" 504 505 ARMV6HF.prismES2 = [:] 506 ARMV6HF.prismES2.variants = ["eglfb", "monocle"] 507 ARMV6HF.prismES2.javahInclude = ["com/sun/prism/es2/**/*"] 508 509 ARMV6HF.prismES2.eglfb = [:] 510 ARMV6HF.prismES2.eglfb.nativeSource = [ 511 file("modules/graphics/src/main/native-prism-es2"), 512 file("modules/graphics/src/main/native-prism-es2/GL"), 513 file("modules/graphics/src/main/native-prism-es2/eglfb") 514 ] 515 ARMV6HF.prismES2.eglfb.compiler = compiler 516 ARMV6HF.prismES2.eglfb.ccFlags = [ es2EglfbCFlags, "-I", ARMV6HF.glass.lensport.nativeSource ].flatten() 517 ARMV6HF.prismES2.eglfb.linker = linker 518 ARMV6HF.prismES2.eglfb.linkFlags = [ es2EglfbLFlags, "-dl" ] .flatten() 519 ARMV6HF.prismES2.eglfb.lib = "prism_es2_eglfb" 520 521 ARMV6HF.prismES2.monocle= [:] 522 ARMV6HF.prismES2.monocle.nativeSource = [ 523 file("modules/graphics/src/main/native-prism-es2"), 524 file("modules/graphics/src/main/native-prism-es2/GL"), 525 file("modules/graphics/src/main/native-prism-es2/monocle") 526 ] 527 ARMV6HF.prismES2.monocle.compiler = compiler 528 ARMV6HF.prismES2.monocle.ccFlags = [ es2EglfbCFlags, "-I", ARMV6HF.glass.lensport.nativeSource ].flatten() 529 ARMV6HF.prismES2.monocle.linker = linker 530 ARMV6HF.prismES2.monocle.linkFlags =[ es2EglfbLFlags, "-ldl" ].flatten() 531 ARMV6HF.prismES2.monocle.lib = "prism_es2_monocle" 532 533 ARMV6HF.prismES2.eglx11 = [:] 534 ARMV6HF.prismES2.eglx11.nativeSource = [ 535 file("modules/graphics/src/main/native-prism-es2"), 536 file("modules/graphics/src/main/native-prism-es2/GL"), 537 file("modules/graphics/src/main/native-prism-es2/eglx11") 538 ] 539 ARMV6HF.prismES2.eglx11.compiler = compiler 540 ARMV6HF.prismES2.eglx11.ccFlags = es2X11CFlags 541 ARMV6HF.prismES2.eglx11.linker = linker 542 ARMV6HF.prismES2.eglx11.linkFlags = es2X11LFlags 543 ARMV6HF.prismES2.eglx11.lib = "prism_es2_eglx11" 544 545 def closedDir = file("$projectDir/../rt-closed") 546 ARMV6HF.font = [:] 547 ARMV6HF.font.javahInclude = [ 548 "com/sun/javafx/font/**/*", 549 "com/sun/javafx/text/**/*"] 550 ARMV6HF.font.nativeSource = [file("modules/graphics/src/main/native-font")] 551 ARMV6HF.font.compiler = compiler 552 ARMV6HF.font.ccFlags = fontCFlags 553 ARMV6HF.font.linker = linker 554 ARMV6HF.font.linkFlags = fontLFlags 555 ARMV6HF.font.lib = "javafx_font" 556 557 ARMV6HF.fontT2K = [:] 558 ARMV6HF.fontT2K.javahInclude = ["com/sun/javafx/font/t2k/**/*"] 559 ARMV6HF.fontT2K.nativeSource = [ 560 file("$closedDir/javafx-font-t2k-native/src"), 561 file("$closedDir/javafx-font-t2k-native/src/layout")] 562 ARMV6HF.fontT2K.compiler = compiler 563 ARMV6HF.fontT2K.ccFlags = [fontCFlags, "-DLE_STANDALONE"].flatten() 564 ARMV6HF.fontT2K.linker = linker 565 ARMV6HF.fontT2K.linkFlags = fontLFlags 566 ARMV6HF.fontT2K.lib = "javafx_font_t2k" 567 568 ARMV6HF.fontFreetype = [:] 569 ARMV6HF.fontFreetype.javahInclude = ["com/sun/javafx/font/freetype/OSFreetype.class*"] 570 ARMV6HF.fontFreetype.nativeSource = ["src/main/native-font/freetype.c"] 571 ARMV6HF.fontFreetype.compiler = compiler 572 ARMV6HF.fontFreetype.ccFlags = ["-DJFXFONT_PLUS", ccFlags, fontCFlags, freetypeCCFlags].flatten() 573 ARMV6HF.fontFreetype.linker = linker 574 ARMV6HF.fontFreetype.linkFlags = [linkFlags, fontLFlags, freetypeLinkFlags, "-ldl"].flatten() 575 ARMV6HF.fontFreetype.lib = "javafx_font_freetype" 576 577 ARMV6HF.fontPango = [:] 578 ARMV6HF.fontPango.javahInclude = ["com/sun/javafx/font/freetype/OSPango.class"] 579 ARMV6HF.fontPango.nativeSource = ["src/main/native-font/pango.c"] 580 ARMV6HF.fontPango.compiler = compiler 581 ARMV6HF.fontPango.ccFlags = ["-DJFXFONT_PLUS", ccFlags, pangoCCFlags].flatten() 582 ARMV6HF.fontPango.linker = linker 583 ARMV6HF.fontPango.linkFlags = [linkFlags, pangoLinkFlags].flatten() 584 ARMV6HF.fontPango.lib = "javafx_font_pango" 585 586 ARMV6HF.webkit = [:] 587 ARMV6HF.webkit.binDir = "$compilerHome/bin" 588 ARMV6HF.webkit.compiler = compiler 589 ARMV6HF.webkit.linker = linker 590 ARMV6HF.webkit.ar = file("$compilerHome/bin/${compilerPrefix}ar").getAbsolutePath() 591 ARMV6HF.webkit.objcopy = file("$compilerHome/bin/${compilerPrefix}objcopy").getAbsolutePath() 592 ARMV6HF.webkit.strip = file("$compilerHome/bin/${compilerPrefix}strip").getAbsolutePath() 593 ARMV6HF.webkit.ccFlags = extraCFlags.join(' ') 594 ARMV6HF.webkit.linkFlags = extraLFlags.join(' ') 595 596 ARMV6HF.disableMedia = true 597 ARMV6HF.media = [:] 598 ARMV6HF.media.compiler = compiler 599 ARMV6HF.media.linker = linker 600 ARMV6HF.media.extra_cflags = mediaCFlags.join(' ') 601 ARMV6HF.media.extra_ldflags = mediaLFlags.join(' ') 602 603 ARMV6HF.deploy = [:] 604 ARMV6HF.deploy.publicLibraryFilter = [ 605 "fxavcodecplugin-52.so", 606 "fxavcodecplugin-53.so", 607 "fxplugins.so", 608 "libjfxwebkit.so", 609 "libgstplugins-lite.so", 610 "libgstreamer-lite.so", 611 "libprism_es2_eglx11.so", 612 "libglass_lens_fb.so" 613 ] 614 ARMV6HF.deploy.compressBigJar=true