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