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