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