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