annotate buildSrc/armv7hf.gradle @ 6974:98fc97b79c74

Automated merge with ssh://jfxsrc.us.oracle.com//javafx/8u/master/jfx/rt
author kcr
date Mon, 05 May 2014 14:03:34 -0700
parents 685555d88860
children 2396fec9b032
rev   line source
ddhill@6377 1 /*
ddhill@6377 2 * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
ddhill@6377 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
ddhill@6377 4 *
ddhill@6377 5 * This code is free software; you can redistribute it and/or modify it
ddhill@6377 6 * under the terms of the GNU General Public License version 2 only, as
ddhill@6377 7 * published by the Free Software Foundation. Oracle designates this
ddhill@6377 8 * particular file as subject to the "Classpath" exception as provided
ddhill@6377 9 * by Oracle in the LICENSE file that accompanied this code.
ddhill@6377 10 *
ddhill@6377 11 * This code is distributed in the hope that it will be useful, but WITHOUT
ddhill@6377 12 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
ddhill@6377 13 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
ddhill@6377 14 * version 2 for more details (a copy is included in the LICENSE file that
ddhill@6377 15 * accompanied this code).
ddhill@6377 16 *
ddhill@6377 17 * You should have received a copy of the GNU General Public License version
ddhill@6377 18 * 2 along with this work; if not, write to the Free Software Foundation,
ddhill@6377 19 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
ddhill@6377 20 *
ddhill@6377 21 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
ddhill@6377 22 * or visit www.oracle.com if you need additional information or have any
ddhill@6377 23 * questions.
ddhill@6377 24 */
ddhill@6377 25
ddhill@6828 26 ext.ARMV7HF = [:]
ddhill@6377 27
ddhill@6377 28 // Define the location of the sdk and toolchain
ddhill@6377 29 def sdk=file("${rootProject.CROSS_TOOLS_DIR}/armhf-raspberry-pi-10")
ddhill@6377 30 def compilerHome=file("${rootProject.CROSS_TOOLS_DIR}/gcc-linaro-arm-linux-gnueabihf-raspbian-2012.09-20120921_linux")
ddhill@6377 31 def compilerPrefix
ddhill@6377 32 def jniPlatform
ddhill@6377 33 if (IS_LINUX) {
ddhill@6828 34 fetchExternalTools('ARMV7HF',
ddhill@6377 35 ["armhf-raspberry-pi-10.tgz",
ddhill@6377 36 "gcc-linaro-arm-linux-gnueabihf-raspbian-2012.09-20120921_linux.tgz" ],
ddhill@6377 37 rootProject.CROSS_TOOLS_DIR, rootProject.IS_IMPORT_CROSS_TOOLS)
ddhill@6377 38
ddhill@6377 39 compilerHome=file("${rootProject.CROSS_TOOLS_DIR}/gcc-linaro-arm-linux-gnueabihf-raspbian-2012.09-20120921_linux")
ddhill@6377 40 compilerPrefix="arm-linux-gnueabihf-"
ddhill@6377 41 jniPlatform="linux"
ddhill@6377 42 } else if (IS_MAC) {
ddhill@6377 43 fetchExternalTools('ARMV7HF',
ddhill@6377 44 ["armhf-raspberry-pi-10.tgz"],
ddhill@6377 45 rootProject.CROSS_TOOLS_DIR, rootProject.IS_IMPORT_CROSS_TOOLS)
ddhill@6377 46
ddhill@6377 47 compilerHome=file("/usr/local/arm-linux")
ddhill@6377 48 compilerPrefix="arm-linux-"
ddhill@6377 49 jniPlatform="darwin"
ddhill@6377 50 } else {
ddhill@6377 51 println "ERROR: Cannot build on this platform"
ddhill@6377 52 return;
ddhill@6377 53 }
ddhill@6377 54
ddhill@6377 55 if (rootProject.hasProperty("ARMV7HF_COMPILER")) {
ddhill@6377 56 logger.quiet "Using alternate ARMV7HF_COMPILER $rootProject.ARMV7HF_COMPILER"
ddhill@6377 57 compilerHome=file(rootProject.ARMV7HF_COMPILER);
ddhill@6377 58 }
ddhill@6377 59 if (rootProject.hasProperty("ARMV7HF_COMPILER_PREFIX")) {
ddhill@6377 60 logger.quiet "Using alternate ARMV7HF_COMPILER_PREFIX $rootProject.ARMV7HF_COMPILER_PREFIX"
ddhill@6377 61 compilerPrefix="${rootProject.ARMV7HF_COMPILER_PREFIX}"
ddhill@6377 62 }
ddhill@6377 63
ddhill@6377 64 // Declare whether this particular target file applies to the current system
ddhill@6828 65 ARMV7HF.canBuild = (IS_LINUX || IS_MAC) && compilerHome.exists() && sdk.exists()
ddhill@6828 66 if (!ARMV7HF.canBuild) {
ddhill@6377 67 if (!compilerHome.exists()) println "ERROR: Mising compiler $compilerHome"
ddhill@6377 68 if (!sdk.exists()) println "ERROR: Mising sdk $sdk"
ddhill@6377 69 return;
ddhill@6377 70 }
ddhill@6377 71
ddhill@6377 72 // Lambda for naming the generated libs
ddhill@6828 73 ARMV7HF.library = { name -> return "lib${name}.so" as String }
ddhill@6377 74
ddhill@6828 75 ARMV7HF.compileSwing = false;
ddhill@6828 76 ARMV7HF.compileSWT = false;
ddhill@6828 77 ARMV7HF.compileFXPackager = false;
ddhill@6828 78 ARMV7HF.compileDesignTime = false;
ddhill@6377 79
ddhill@6377 80 // Libraries end up in the sdk/rt/lib/arm directory for arm builds
ddhill@6957 81 ARMV7HF.arch = "arm"
ddhill@6828 82 ARMV7HF.libDest = "lib/arm"
ddhill@6377 83
ddhill@6377 84 // TODO this is garbage. Each target file should define what it includes,
ddhill@6377 85 // not what it excludes.
ddhill@6828 86 ARMV7HF.jfxrtJarExcludes = [
ddhill@6377 87 "**/*.hlsl",
ddhill@6377 88 "com/sun/glass/ui/win",
ddhill@6377 89 "com/sun/prism/d3d",
ddhill@6377 90 "com/sun/prism/es2/gl/win",
ddhill@6377 91 //"com/sun/prism/null3d",
ddhill@6377 92 "com/sun/scenario/effect/impl/hw/d3d",
ddhill@6377 93
ddhill@6377 94 "com/sun/glass/events/mac",
ddhill@6377 95 "com/sun/glass/ui/mac",
ddhill@6377 96 "com/sun/prism/es2/gl/mac",
ddhill@6377 97
ddhill@6377 98 "com/sun/glass/ui/android",
ddhill@6377 99
ddhill@6377 100 "com/sun/glass/ui/ios",
ddhill@6377 101
ddhill@6377 102 "com/sun/glass/ui/swt", // SWT glass
ddhill@6377 103
ddhill@6377 104 "javafx/embed/swing", // Swing Interop
ddhill@6377 105
ddhill@6377 106 "javafx/embed/swt", // SWT Interop
ddhill@6377 107
ddhill@6377 108 "com/sun/prism/es2/MacGL*",
ddhill@6377 109 "com/sun/prism/es2/IOSGL*",
ddhill@6377 110 "com/sun/prism/es2/WinGL*",
ddhill@6377 111 ]
ddhill@6377 112
ddhill@6377 113 def commonFlags = [
ddhill@6377 114 "-fno-strict-aliasing", "-fPIC", "-fno-omit-frame-pointer", // optimization flags
ddhill@6377 115 "-W", "-Wall", "-Wno-unused", "-Wno-parentheses", "-Werror=implicit-function-declaration"] // warning flags
ddhill@6377 116 // Specify the compilation parameters and link parameters
ddhill@6377 117 def ccFlags = [
ddhill@6377 118 commonFlags, "-I$JDK_HOME/include", "-I$JDK_HOME/include/$jniPlatform", "-c",
ddhill@6377 119 IS_DEBUG_NATIVE ? ["-ggdb", "-DVERBOSE"] : "-O2"].flatten()
ddhill@6377 120 //ccFlags.addAll(["-Wnon-virtual-dtor", "-Woverloaded-virtual", "-std=c++0x"])
ddhill@6377 121 def linkFlags = ["-shared", commonFlags].flatten()
ddhill@6377 122
ddhill@6377 123 // Specify the compilation parameters and link parameters
ddhill@6377 124 def extraCFlags = [
ddhill@6377 125 "-I", "-L",
ddhill@6377 126 ccFlags,
ddhill@6377 127 "-mthumb", "-march=armv7-a", "-mfloat-abi=hard", "-mfpu=vfp",
ddhill@6377 128 "-I$sdk/usr/include",
ddhill@6377 129 "-I$sdk/opt/vc/include",
ddhill@6377 130 "-I$sdk/opt/vc/include/interface/vcos/pthreads",
ddhill@6377 131 "-I$sdk/opt/vc/include/interface/vmcs_host/linux",
ddhill@6377 132 "-DOMAP3", "-DUSE_DISPMAN"].flatten();
ddhill@6377 133
ddhill@6377 134 //See if we should build for imx6
ddhill@6377 135 def imxHeader=file("$sdk/usr/include/linux/mxcfb.h")
ddhill@6377 136 if (imxHeader.exists()) {
ddhill@6377 137 extraCFlags = [extraCFlags,"-DIMX6_PLATFORM"].flatten();
ddhill@6377 138 }
ddhill@6377 139
ddhill@6377 140 def extraLFlags = [
ddhill@6377 141 "-I", "-L",
ddhill@6377 142 linkFlags,
ddhill@6377 143 "-L$sdk/lib/arm-linux/gnueabihf",
ddhill@6377 144 "-L$sdk/usr/lib",
ddhill@6377 145 "-L$sdk/usr/lib/arm-linux-gnueabihf",
ddhill@6377 146 "-L$sdk/opt/vc/lib"].flatten()
ddhill@6377 147
ddhill@6377 148 def lensLFlags = [extraLFlags, "-lpthread", "-ludev", "-ldl", "-lm"].flatten()
ddhill@6377 149 def monocleCFlags = [
ddhill@6377 150 extraCFlags,
ddhill@6377 151 "-Werror",
ddhill@6377 152 "-I", file("modules/graphics/src/main/native-glass/monocle/")].flatten();
ddhill@6377 153 def monocleLFlags = [extraLFlags, "-ldl", "-lm"].flatten()
ddhill@6377 154
ddhill@6377 155 def fontCFlags = [extraCFlags].flatten()
ddhill@6377 156 def fontLFlags = [extraLFlags].flatten()
ddhill@6377 157
ddhill@6377 158 def iioCFlags = [extraCFlags].flatten()
ddhill@6377 159 def iioLFlags = [extraLFlags].flatten()
ddhill@6377 160
ddhill@6377 161 def es2EglfbCFlags = [extraCFlags, "-DIS_EGLFB", "-DLINUX"].flatten()
ddhill@6377 162 def es2EglfbLFlags = [extraLFlags].flatten()
ddhill@6377 163
ddhill@6377 164 def es2X11CFlags = [extraCFlags, "-DUSE_XSHM", "-DDEBUG", "-DIS_EGLX11", "-DLINUX"].flatten()
ddhill@6377 165 def es2X11LFlags = [extraLFlags, "-lX11", "-lXext", "-lXdmcp", "-lXau"].flatten()
ddhill@6377 166
ddhill@6377 167 def mediaCFlags = [extraCFlags,
ddhill@6377 168 "-I$sdk/usr/include/gstreamer-0.10",
ddhill@6377 169 "-I$sdk/usr/include/glib-2.0",
ddhill@6377 170 "-I$sdk/usr/lib/arm-linux-gnueabihf/glib-2.0/include",
ddhill@6377 171 "-DENABLE_NATIVE_SOURCE=1", "-DENABLE_GST_FFMPEG=1"].flatten()
ddhill@6377 172 def mediaLFlags = [extraLFlags, "-lgstreamer-0.10", "-lgstapp-0.10",
ddhill@6377 173 "-lgstbase-0.10", "-lglib-2.0", "-lgobject-2.0", "-lgmodule-2.0", "-lgthread-2.0"].flatten()
ddhill@6377 174
ddhill@6377 175 def webCFlags = [extraCFlags].flatten()
ddhill@6377 176 def webLFlags = [extraLFlags].flatten()
ddhill@6377 177
ddhill@6377 178 // libraries to remove from the SDK
ddhill@6377 179 //deploy.trim.public.library.filter= \
ddhill@6377 180 // fxavcodecplugin-52.so \
ddhill@6377 181 // fxavcodecplugin-53.so \
ddhill@6377 182 // fxplugins.so \
ddhill@6377 183 // libjfxwebkit.so \
ddhill@6377 184 // libgstplugins-lite.so \
ddhill@6377 185 // libgstreamer-lite.so \
ddhill@6377 186 // libprism-es2-eglx11.so \
ddhill@6377 187 // libglass_lens_fb.so \
ddhill@6377 188
ddhill@6377 189 def gtkCFlags = [extraCFlags].flatten()
ddhill@6377 190 def gtkLFlags = [extraLFlags].flatten()
ddhill@6377 191 setupTools("armv6hf_tools",
ddhill@6377 192 { propFile ->
ddhill@6377 193 ByteArrayOutputStream results = new ByteArrayOutputStream();
ddhill@6377 194 exec {
ddhill@6377 195 commandLine("$sdk/bin/pkg-config", "--cflags", "gtk+-2.0", "gthread-2.0", "xtst");
ddhill@6377 196 setStandardOutput(results);
ddhill@6377 197 }
ddhill@6377 198 propFile << "cflags=" << results.toString().trim() << "\n";
ddhill@6377 199
ddhill@6377 200 results = new ByteArrayOutputStream();
ddhill@6377 201 exec {
ddhill@6377 202 commandLine "$sdk/bin/pkg-config", "--libs", "gtk+-2.0", "gthread-2.0", "xtst"
ddhill@6377 203 standardOutput = results
ddhill@6377 204 }
ddhill@6377 205 propFile << "libs=" << results.toString().trim();
ddhill@6377 206 },
ddhill@6377 207 { properties ->
ddhill@6377 208 gtkCFlags.addAll(properties.getProperty("cflags").split(" "))
ddhill@6377 209 gtkLFlags.addAll(properties.getProperty("libs").split(" "))
ddhill@6377 210 }
ddhill@6377 211 )
ddhill@6377 212
ddhill@6828 213 ARMV7HF.javafxPlatformProperties ="""javafx.platform=eglfb
ddhill@6377 214 directfb.com.sun.javafx.scene.control.skin.ListViewSkin.pannable=true
ddhill@6377 215 directfb.com.sun.javafx.scene.control.skin.TreeViewSkin.pannable=true
ddhill@6377 216 directfb.com.sun.javafx.scene.control.skin.TableViewSkin.pannable=true
ddhill@6377 217 directfb.glass.platform=Lens
ddhill@6377 218 directfb.glass.lens=dfb
ddhill@6377 219 directfb.prism.order=sw
ddhill@6377 220 directfb.com.sun.javafx.isEmbedded=true
ddhill@6377 221 directfb.com.sun.javafx.scene.control.skin.FXVK.cache=true
seeon@6736 222 directfb.com.sun.javafx.gestures.zoom=true
seeon@6736 223 directfb.com.sun.javafx.gestures.rotate=true
seeon@6736 224 directfb.com.sun.javafx.gestures.scroll=true
ddhill@6377 225 eglfb.com.sun.javafx.scene.control.skin.ListViewSkin.pannable=true
ddhill@6377 226 eglfb.com.sun.javafx.scene.control.skin.TreeViewSkin.pannable=true
ddhill@6377 227 eglfb.com.sun.javafx.scene.control.skin.TableViewSkin.pannable=true
ddhill@6377 228 eglfb.glass.platform=Lens
ddhill@6377 229 eglfb.glass.lens=eglfb
ddhill@6377 230 eglfb.prism.order=es2
ddhill@6377 231 eglfb.prism.eglfb=true
ddhill@6377 232 eglfb.prism.lcdtext=false
ddhill@6377 233 eglfb.prism.maxvram=128m
ddhill@6377 234 eglfb.prism.targetvram=112m
ddhill@6377 235 eglfb.use.egl=true
ddhill@6377 236 eglfb.use.gles2=true
ddhill@6377 237 eglfb.embedded=eglfb
ddhill@6377 238 eglfb.com.sun.javafx.isEmbedded=true
ddhill@6377 239 eglfb.doNativeComposite=true
ddhill@6377 240 eglfb.com.sun.javafx.scene.control.skin.FXVK.cache=true
seeon@6736 241 eglfb.com.sun.javafx.gestures.zoom=true
seeon@6736 242 eglfb.com.sun.javafx.gestures.rotate=true
seeon@6736 243 eglfb.com.sun.javafx.gestures.scroll=true
ddhill@6377 244 eglfb.prism.glDepthSize=0
ddhill@6377 245 fb.com.sun.javafx.scene.control.skin.ListViewSkin.pannable=true
ddhill@6377 246 fb.com.sun.javafx.scene.control.skin.TreeViewSkin.pannable=true
ddhill@6377 247 fb.com.sun.javafx.scene.control.skin.TableViewSkin.pannable=true
ddhill@6377 248 fb.glass.platform=Lens
ddhill@6377 249 fb.glass.lens=fb
ddhill@6377 250 fb.prism.order=sw
ddhill@6377 251 fb.com.sun.javafx.isEmbedded=true
ddhill@6377 252 fb.glass.restrictWindowToScreen=true
ddhill@6377 253 fb.com.sun.javafx.scene.control.skin.FXVK.cache=true
seeon@6736 254 fb.com.sun.javafx.gestures.zoom=true
seeon@6736 255 fb.com.sun.javafx.gestures.rotate=true
seeon@6736 256 fb.com.sun.javafx.gestures.scroll=true
ddhill@6377 257 monocle.glass.platform=Monocle
ddhill@6377 258 monocle.prism.order=es2,sw
ddhill@6377 259 monocle.prism.eglfb=true
ddhill@6377 260 monocle.prism.lcdtext=false
ddhill@6377 261 monocle.prism.maxvram=128m
ddhill@6377 262 monocle.prism.targetvram=112m
ddhill@6377 263 monocle.use.egl=true
ddhill@6377 264 monocle.use.gles2=true
ddhill@6377 265 monocle.embedded=eglfb
ddhill@6377 266 monocle.com.sun.javafx.isEmbedded=true
ddhill@6377 267 monocle.doNativeComposite=true
ddhill@6377 268 monocle.com.sun.javafx.scene.control.skin.FXVK.cache=true
seeon@6736 269 monocle.com.sun.javafx.gestures.zoom=true
seeon@6736 270 monocle.com.sun.javafx.gestures.rotate=true
seeon@6736 271 monocle.com.sun.javafx.gestures.scroll=true
ddhill@6377 272 monocle.prism.glDepthSize=0
ddhill@6377 273 eglx11.com.sun.javafx.scene.control.skin.ListViewSkin.pannable=true
ddhill@6377 274 eglx11.com.sun.javafx.scene.control.skin.TreeViewSkin.pannable=true
ddhill@6377 275 eglx11.com.sun.javafx.scene.control.skin.TableViewSkin.pannable=true
ddhill@6377 276 eglx11.glass.platform=Lens
ddhill@6377 277 eglx11.glass.lens=eglx11
ddhill@6377 278 eglx11.prism.order=es2
ddhill@6377 279 eglx11.prism.eglx11=true
ddhill@6377 280 eglx11.prism.lcdtext=false
ddhill@6377 281 eglx11.prism.maxvram=128m
ddhill@6377 282 eglx11.prism.targetvram=112m
ddhill@6377 283 eglx11.use.egl=true
ddhill@6377 284 eglx11.use.gles2=true
ddhill@6377 285 eglx11.embedded=eglx11
ddhill@6377 286 eglx11.com.sun.javafx.isEmbedded=true
ddhill@6377 287 eglx11.com.sun.javafx.scene.control.skin.FXVK.cache=true
seeon@6736 288 eglx11.com.sun.javafx.gestures.zoom=true
seeon@6736 289 eglx11.com.sun.javafx.gestures.rotate=true
seeon@6736 290 eglx11.com.sun.javafx.gestures.scroll=true
ddhill@6377 291 eglx11.prism.glDepthSize=0
ddhill@6377 292 gtk.com.sun.javafx.scene.control.skin.ListViewSkin.pannable=true
ddhill@6377 293 gtk.com.sun.javafx.scene.control.skin.TreeViewSkin.pannable=true
ddhill@6377 294 gtk.com.sun.javafx.scene.control.skin.TableViewSkin.pannable=true
ddhill@6377 295 gtk.glass.platform=gtk
ddhill@6377 296 gtk.prism.order=sw
ddhill@6377 297 gtk.com.sun.javafx.isEmbedded=true
seeon@6736 298 gtk.com.sun.javafx.scene.control.skin.FXVK.cache=true
seeon@6736 299 gtk.com.sun.javafx.gestures.zoom=true
seeon@6736 300 gtk.com.sun.javafx.gestures.rotate=true
seeon@6736 301 gtk.com.sun.javafx.gestures.scroll=true"""
ddhill@6377 302
ddhill@6377 303 def pangoCCFlags = [extraCFlags, "-D_ENABLE_PANGO"];
ddhill@6377 304 def pangoLinkFlags = [extraLFlags];
ddhill@6377 305 setupTools("armv6hf_pango_tools",
ddhill@6377 306 { propFile ->
ddhill@6377 307 ByteArrayOutputStream results = new ByteArrayOutputStream();
ddhill@6377 308 exec {
ddhill@6377 309 commandLine "$sdk/bin/pkg-config", "--cflags", "pangoft2"
ddhill@6377 310 standardOutput = results
ddhill@6377 311 }
ddhill@6377 312 propFile << "cflags=" << results.toString().trim() << "\n";
ddhill@6377 313
ddhill@6377 314 results = new ByteArrayOutputStream();
ddhill@6377 315 exec {
ddhill@6377 316 commandLine "$sdk/bin/pkg-config", "--libs", "pangoft2"
ddhill@6377 317 standardOutput = results
ddhill@6377 318 }
ddhill@6377 319 propFile << "libs=" << results.toString().trim();
ddhill@6377 320 },
ddhill@6377 321 { properties ->
ddhill@6377 322 pangoCCFlags.addAll(properties.getProperty("cflags").split(" "))
ddhill@6377 323 pangoLinkFlags.addAll(properties.getProperty("libs").split(" "))
ddhill@6377 324 }
ddhill@6377 325 )
ddhill@6377 326
ddhill@6377 327 def freetypeCCFlags = [ext.IS_COMPILE_PANGO ? "-D_ENABLE_PANGO" :
ddhill@6377 328 ext.IS_COMPILE_HARFBUZZ ? "-D_ENABLE_HARFBUZZ" : ""]
ddhill@6377 329 def freetypeLinkFlags = []
ddhill@6377 330 setupTools("armv6hf_freetype_tools",
ddhill@6377 331 { propFile ->
ddhill@6377 332 ByteArrayOutputStream results = new ByteArrayOutputStream();
ddhill@6377 333 exec {
ddhill@6377 334 commandLine "$sdk/bin/pkg-config", "--cflags", "freetype2"
ddhill@6377 335 standardOutput = results
ddhill@6377 336 }
ddhill@6377 337 propFile << "cflags=" << results.toString().trim() << "\n";
ddhill@6377 338
ddhill@6377 339 results = new ByteArrayOutputStream();
ddhill@6377 340 exec {
ddhill@6377 341 commandLine "$sdk/bin/pkg-config", "--libs", "freetype2"
ddhill@6377 342 standardOutput = results
ddhill@6377 343 }
ddhill@6377 344 propFile << "libs=" << results.toString().trim();
ddhill@6377 345 },
ddhill@6377 346 { properties ->
ddhill@6377 347 freetypeCCFlags.addAll(properties.getProperty("cflags").split(" "))
ddhill@6377 348 freetypeLinkFlags.addAll(properties.getProperty("libs").split(" "))
ddhill@6377 349 }
ddhill@6377 350 )
ddhill@6377 351
ddhill@6377 352 def compiler = file("$compilerHome/bin/${compilerPrefix}gcc").getAbsolutePath()
ddhill@6377 353 def linker = file("$compilerHome/bin/${compilerPrefix}g++").getAbsolutePath()
ddhill@6377 354
ddhill@6828 355 ARMV7HF.glass = [:]
ddhill@6828 356 ARMV7HF.glass.variants = ["eglfb", "directfb", "fb", "gtk", "lensport", "monocle", "monocle_x11" ]
ddhill@6828 357 ARMV7HF.glass.javahInclude = [
ddhill@6377 358 "com/sun/glass/events/**",
ddhill@6377 359 "com/sun/glass/ui/*",
ddhill@6377 360 "com/sun/glass/ui/lens/*",
ddhill@6377 361 "com/sun/glass/ui/monocle/linux/*",
ddhill@6377 362 "com/sun/glass/ui/monocle/util/*",
ddhill@6377 363 "com/sun/glass/ui/monocle/x11/*",
felipe@6505 364 "com/sun/glass/ui/gtk/*"]
ddhill@6828 365 ARMV7HF.glass.lib = "glass"
ddhill@6377 366
ddhill@6828 367 ARMV7HF.glass.lensport = [:]
ddhill@6828 368 ARMV7HF.glass.lensport.nativeSource = [
ddhill@6377 369 file("modules/graphics/src/main/native-glass/lens/lensport") ]
ddhill@6828 370 ARMV7HF.glass.lensport.compiler = compiler
ddhill@6828 371 ARMV7HF.glass.lensport.ccFlags = ["-ffast-math", extraCFlags, "-DLINUX", "-DISEGLFB",
ddhill@6377 372 "-DLENSPORT", "-I", file("modules/graphics/src/main/native-glass/lens/") ].flatten()
ddhill@6828 373 ARMV7HF.glass.lensport.linker = linker
ddhill@6828 374 ARMV7HF.glass.lensport.linkFlags = [lensLFlags].flatten()
ddhill@6828 375 ARMV7HF.glass.lensport.lib = "lens_porting"
ddhill@6377 376
ddhill@6828 377 ARMV7HF.glass.monocle = [:]
ddhill@6828 378 ARMV7HF.glass.monocle.nativeSource = [
ddhill@6377 379 file("modules/graphics/src/main/native-glass/monocle/linux"),
ddhill@6377 380 file("modules/graphics/src/main/native-glass/monocle/util") ]
ddhill@6828 381 ARMV7HF.glass.monocle.compiler = compiler
ddhill@6828 382 ARMV7HF.glass.monocle.ccFlags = monocleCFlags
ddhill@6828 383 ARMV7HF.glass.monocle.linker = linker
ddhill@6828 384 ARMV7HF.glass.monocle.linkFlags = monocleLFlags
ddhill@6828 385 ARMV7HF.glass.monocle.lib = "glass_monocle"
ddhill@6377 386
ddhill@6828 387 ARMV7HF.glass.monocle_x11 = [:]
ddhill@6828 388 ARMV7HF.glass.monocle_x11.nativeSource = [
ddhill@6377 389 file("modules/graphics/src/main/native-glass/monocle/util"),
ddhill@6377 390 file("modules/graphics/src/main/native-glass/monocle/x11") ]
ddhill@6828 391 ARMV7HF.glass.monocle_x11.compiler = compiler
ddhill@6828 392 ARMV7HF.glass.monocle_x11.ccFlags = monocleCFlags
ddhill@6828 393 ARMV7HF.glass.monocle_x11.linker = linker
ddhill@6828 394 ARMV7HF.glass.monocle_x11.linkFlags = [ monocleLFlags, "-lX11" ].flatten()
ddhill@6828 395 ARMV7HF.glass.monocle_x11.lib = "glass_monocle_x11"
ddhill@6377 396
ddhill@6828 397 ARMV7HF.glass.eglfb = [:]
ddhill@6377 398 // TODO when building headless, use lens/cursor/nullcursor/
ddhill@6377 399 // otherwise we use lens/cursor/fbCursor/ and lens/input/udev
ddhill@6377 400
ddhill@6377 401 // TODO when USE_RFB is specified use lens/rfb
ddhill@6377 402
ddhill@6377 403 // TODO use /eglfb/x11ContainerScreen when using eglfb and EGL_X11_FB_CONTAINER
ddhill@6377 404 // TODO use /headless/headlessScreen when using headless
ddhill@6828 405 ARMV7HF.glass.eglfb.nativeSource = [
ddhill@6377 406 file("modules/graphics/src/main/native-glass/lens"),
ddhill@6377 407 file("modules/graphics/src/main/native-glass/lens/wm"),
ddhill@6377 408 file("modules/graphics/src/main/native-glass/lens/cursor/fbCursor"),
ddhill@6377 409 file("modules/graphics/src/main/native-glass/lens/input/udev"),
ddhill@6377 410 file("modules/graphics/src/main/native-glass/lens/wm/screen/fbdevScreen.c") ]
ddhill@6828 411 ARMV7HF.glass.eglfb.compiler = compiler
ddhill@6828 412 ARMV7HF.glass.eglfb.ccFlags = ["-ffast-math", extraCFlags, "-DLINUX", "-DISEGLFB"].flatten()
ddhill@6828 413 ARMV7HF.glass.eglfb.linker = linker
ddhill@6828 414 ARMV7HF.glass.eglfb.linkFlags = [lensLFlags].flatten()
ddhill@6828 415 ARMV7HF.glass.eglfb.lib = "glass_lens_eglfb"
ddhill@6377 416
ddhill@6828 417 ARMV7HF.glass.directfb = [:]
ddhill@6828 418 ARMV7HF.glass.directfb.nativeSource = [
ddhill@6377 419 file("modules/graphics/src/main/native-glass/lens"),
ddhill@6377 420 file("modules/graphics/src/main/native-glass/lens/wm"),
ddhill@6377 421 file("modules/graphics/src/main/native-glass/lens/cursor/fbCursor"),
ddhill@6377 422 file("modules/graphics/src/main/native-glass/lens/input/udev"),
ddhill@6377 423 file("modules/graphics/src/main/native-glass/lens/wm/screen/dfbScreen.c") ]
ddhill@6828 424 ARMV7HF.glass.directfb.compiler = compiler
ddhill@6828 425 ARMV7HF.glass.directfb.ccFlags = ["-ffast-math", extraCFlags, "-I$sdk/usr/include/directfb", "-DLINUX"].flatten()
ddhill@6828 426 ARMV7HF.glass.directfb.linker = linker
ddhill@6828 427 ARMV7HF.glass.directfb.linkFlags = [lensLFlags].flatten()
ddhill@6828 428 ARMV7HF.glass.directfb.lib = "glass_lens_dfb"
ddhill@6377 429
ddhill@6828 430 ARMV7HF.glass.fb = [:]
ddhill@6828 431 ARMV7HF.glass.fb.nativeSource = [
ddhill@6377 432 file("modules/graphics/src/main/native-glass/lens"),
ddhill@6377 433 file("modules/graphics/src/main/native-glass/lens/wm"),
ddhill@6377 434 file("modules/graphics/src/main/native-glass/lens/cursor/fbCursor"),
ddhill@6377 435 file("modules/graphics/src/main/native-glass/lens/input/udev"),
ddhill@6377 436 file("modules/graphics/src/main/native-glass/lens/wm/screen/fbdevScreen.c") ]
ddhill@6828 437 ARMV7HF.glass.fb.compiler = compiler
ddhill@6828 438 ARMV7HF.glass.fb.ccFlags = ["-ffast-math", extraCFlags, "-DLINUX"].flatten()
ddhill@6828 439 ARMV7HF.glass.fb.linker = linker
ddhill@6828 440 ARMV7HF.glass.fb.linkFlags = [lensLFlags].flatten()
ddhill@6828 441 ARMV7HF.glass.fb.lib = "glass_lens_fb"
ddhill@6377 442
ddhill@6828 443 ARMV7HF.glass.eglx11 = [:]
ddhill@6828 444 ARMV7HF.glass.eglx11.nativeSource = [
ddhill@6377 445 file("modules/graphics/src/main/native-glass/lens"),
ddhill@6377 446 file("modules/graphics/src/main/native-glass/lens/wm"),
ddhill@6377 447 file("modules/graphics/src/main/native-glass/lens/cursor/fbCursor"),
ddhill@6377 448 file("modules/graphics/src/main/native-glass/lens/input/udev"),
ddhill@6377 449 file("modules/graphics/src/main/native-glass/lens/wm/screen/x11ContainerScreen.c")]
ddhill@6377 450 //file("modules/graphics/src/main/native-glass/lens/wm/screen")]
ddhill@6828 451 ARMV7HF.glass.eglx11.compiler = compiler
ddhill@6828 452 ARMV7HF.glass.eglx11.ccFlags = ["-ffast-math", extraCFlags, "-DLINUX"].flatten()
ddhill@6828 453 ARMV7HF.glass.eglx11.linker = linker
ddhill@6828 454 ARMV7HF.glass.eglx11.linkFlags = [lensLFlags].flatten()
ddhill@6828 455 ARMV7HF.glass.eglx11.lib = "glass_lens_eglx11"
ddhill@6377 456
ddhill@6828 457 ARMV7HF.glass.gtk = [:]
ddhill@6828 458 ARMV7HF.glass.gtk.nativeSource = file("modules/graphics/src/main/native-glass/gtk")
ddhill@6828 459 ARMV7HF.glass.gtk.compiler = compiler
ddhill@6828 460 ARMV7HF.glass.gtk.ccFlags = ["-ffast-math", gtkCFlags, "-DLINUX"].flatten()
ddhill@6828 461 ARMV7HF.glass.gtk.linker = linker
ddhill@6828 462 ARMV7HF.glass.gtk.linkFlags = [gtkLFlags, "-lstdc++"].flatten()
ddhill@6828 463 ARMV7HF.glass.gtk.lib = "glass"
ddhill@6377 464
ddhill@6828 465 ARMV7HF.decora = [:]
ddhill@6828 466 ARMV7HF.decora.compiler = compiler
ddhill@6828 467 ARMV7HF.decora.ccFlags = extraCFlags
ddhill@6828 468 ARMV7HF.decora.linker = linker
ddhill@6828 469 ARMV7HF.decora.linkFlags = extraLFlags
ddhill@6828 470 ARMV7HF.decora.lib = "decora_sse"
ddhill@6377 471
ddhill@6828 472 ARMV7HF.prism = [:]
ddhill@6828 473 ARMV7HF.prism.javahInclude = ["com/sun/prism/impl/**/*", "com/sun/prism/PresentableState*"]
ddhill@6828 474 ARMV7HF.prism.nativeSource = file("modules/graphics/src/main/native-prism")
ddhill@6828 475 ARMV7HF.prism.compiler = compiler
ddhill@6828 476 ARMV7HF.prism.ccFlags = [extraCFlags].flatten()
ddhill@6828 477 ARMV7HF.prism.linker = linker
ddhill@6828 478 ARMV7HF.prism.linkFlags = [extraLFlags].flatten()
ddhill@6828 479 ARMV7HF.prism.lib = "prism_common"
ddhill@6377 480
ddhill@6828 481 ARMV7HF.prismSW = [:]
ddhill@6828 482 ARMV7HF.prismSW.javahInclude = ["com/sun/pisces/**/*"]
ddhill@6828 483 ARMV7HF.prismSW.nativeSource = file("modules/graphics/src/main/native-prism-sw")
ddhill@6828 484 ARMV7HF.prismSW.compiler = compiler
ddhill@6828 485 ARMV7HF.prismSW.ccFlags = [extraCFlags].flatten()
ddhill@6828 486 ARMV7HF.prismSW.linker = linker
ddhill@6828 487 ARMV7HF.prismSW.linkFlags = [extraLFlags].flatten()
ddhill@6828 488 ARMV7HF.prismSW.lib = "prism_sw"
ddhill@6377 489
ddhill@6828 490 ARMV7HF.iio = [:]
ddhill@6828 491 ARMV7HF.iio.javahInclude = ["com/sun/javafx/iio/**/*"]
ddhill@6828 492 ARMV7HF.iio.nativeSource = [
ddhill@6377 493 file("modules/graphics/src/main/native-iio"),
ddhill@6377 494 file("modules/graphics/src/main/native-iio/libjpeg7")]
ddhill@6828 495 ARMV7HF.iio.compiler = compiler
ddhill@6828 496 ARMV7HF.iio.ccFlags = iioCFlags
ddhill@6828 497 ARMV7HF.iio.linker = linker
ddhill@6828 498 ARMV7HF.iio.linkFlags = iioLFlags
ddhill@6828 499 ARMV7HF.iio.lib = "javafx_iio"
ddhill@6377 500
ddhill@6828 501 ARMV7HF.prismES2 = [:]
ddhill@6828 502 ARMV7HF.prismES2.variants = ["eglfb"]
ddhill@6828 503 ARMV7HF.prismES2.javahInclude = ["com/sun/prism/es2/**/*"]
ddhill@6377 504
ddhill@6828 505 ARMV7HF.prismES2.eglfb = [:]
ddhill@6828 506 ARMV7HF.prismES2.eglfb.nativeSource = [
ddhill@6377 507 file("modules/graphics/src/main/native-prism-es2"),
ddhill@6377 508 file("modules/graphics/src/main/native-prism-es2/GL"),
ddhill@6377 509 file("modules/graphics/src/main/native-prism-es2/eglfb")
ddhill@6377 510 ]
ddhill@6828 511 ARMV7HF.prismES2.eglfb.compiler = compiler
ddhill@6828 512 ARMV7HF.prismES2.eglfb.ccFlags = [ es2EglfbCFlags, "-I", ARMV7HF.glass.lensport.nativeSource ].flatten()
ddhill@6828 513 ARMV7HF.prismES2.eglfb.linker = linker
ddhill@6828 514 ARMV7HF.prismES2.eglfb.linkFlags = es2EglfbLFlags
ddhill@6828 515 ARMV7HF.prismES2.eglfb.lib = "prism_es2_eglfb"
ddhill@6377 516
ddhill@6828 517 ARMV7HF.prismES2.eglx11 = [:]
ddhill@6828 518 ARMV7HF.prismES2.eglx11.nativeSource = [
ddhill@6377 519 file("modules/graphics/src/main/native-prism-es2"),
ddhill@6377 520 file("modules/graphics/src/main/native-prism-es2/GL"),
ddhill@6377 521 file("modules/graphics/src/main/native-prism-es2/eglx11")
ddhill@6377 522 ]
ddhill@6828 523 ARMV7HF.prismES2.eglx11.compiler = compiler
ddhill@6828 524 ARMV7HF.prismES2.eglx11.ccFlags = es2X11CFlags
ddhill@6828 525 ARMV7HF.prismES2.eglx11.linker = linker
ddhill@6828 526 ARMV7HF.prismES2.eglx11.linkFlags = es2X11LFlags
ddhill@6828 527 ARMV7HF.prismES2.eglx11.lib = "prism_es2_eglx11"
ddhill@6377 528
ddhill@6377 529 def closedDir = file("$projectDir/../rt-closed")
ddhill@6828 530 ARMV7HF.font = [:]
ddhill@6828 531 ARMV7HF.font.javahInclude = [
ddhill@6377 532 "com/sun/javafx/font/**/*",
ddhill@6377 533 "com/sun/javafx/text/**/*"]
ddhill@6828 534 ARMV7HF.font.nativeSource = [file("modules/graphics/src/main/native-font")]
ddhill@6828 535 ARMV7HF.font.compiler = compiler
ddhill@6828 536 ARMV7HF.font.ccFlags = fontCFlags
ddhill@6828 537 ARMV7HF.font.linker = linker
ddhill@6828 538 ARMV7HF.font.linkFlags = fontLFlags
ddhill@6828 539 ARMV7HF.font.lib = "javafx_font"
ddhill@6377 540
ddhill@6828 541 ARMV7HF.fontT2K = [:]
ddhill@6828 542 ARMV7HF.fontT2K.javahInclude = ["com/sun/javafx/font/t2k/**/*"]
ddhill@6828 543 ARMV7HF.fontT2K.nativeSource = [
ddhill@6377 544 file("$closedDir/javafx-font-t2k-native/src"),
ddhill@6377 545 file("$closedDir/javafx-font-t2k-native/src/layout")]
ddhill@6828 546 ARMV7HF.fontT2K.compiler = compiler
ddhill@6828 547 ARMV7HF.fontT2K.ccFlags = [fontCFlags, "-DLE_STANDALONE"].flatten()
ddhill@6828 548 ARMV7HF.fontT2K.linker = linker
ddhill@6828 549 ARMV7HF.fontT2K.linkFlags = fontLFlags
ddhill@6828 550 ARMV7HF.fontT2K.lib = "javafx_font_t2k"
ddhill@6377 551
ddhill@6828 552 ARMV7HF.fontFreetype = [:]
ddhill@6828 553 ARMV7HF.fontFreetype.javahInclude = ["com/sun/javafx/font/freetype/OSFreetype.class*"]
ddhill@6828 554 ARMV7HF.fontFreetype.nativeSource = ["src/main/native-font/freetype.c"]
ddhill@6828 555 ARMV7HF.fontFreetype.compiler = compiler
ddhill@6828 556 ARMV7HF.fontFreetype.ccFlags = ["-DJFXFONT_PLUS", ccFlags, fontCFlags, freetypeCCFlags].flatten()
ddhill@6828 557 ARMV7HF.fontFreetype.linker = linker
ddhill@6828 558 ARMV7HF.fontFreetype.linkFlags = [linkFlags, fontLFlags, freetypeLinkFlags].flatten()
ddhill@6828 559 ARMV7HF.fontFreetype.lib = "javafx_font_freetype"
ddhill@6377 560
ddhill@6828 561 ARMV7HF.fontPango = [:]
ddhill@6828 562 ARMV7HF.fontPango.javahInclude = ["com/sun/javafx/font/freetype/OSPango.class"]
ddhill@6828 563 ARMV7HF.fontPango.nativeSource = ["src/main/native-font/pango.c"]
ddhill@6828 564 ARMV7HF.fontPango.compiler = compiler
ddhill@6828 565 ARMV7HF.fontPango.ccFlags = ["-DJFXFONT_PLUS", ccFlags, pangoCCFlags].flatten()
ddhill@6828 566 ARMV7HF.fontPango.linker = linker
ddhill@6828 567 ARMV7HF.fontPango.linkFlags = [linkFlags, pangoLinkFlags].flatten()
ddhill@6828 568 ARMV7HF.fontPango.lib = "javafx_font_pango"
ddhill@6377 569
ddhill@6828 570 ARMV7HF.webkit = [:]
ddhill@6828 571 ARMV7HF.webkit.binDir = "$compilerHome/bin"
ddhill@6828 572 ARMV7HF.webkit.compiler = compiler
ddhill@6828 573 ARMV7HF.webkit.linker = linker
ddhill@6828 574 ARMV7HF.webkit.ar = file("$compilerHome/bin/${compilerPrefix}ar").getAbsolutePath()
ddhill@6828 575 ARMV7HF.webkit.objcopy = file("$compilerHome/bin/${compilerPrefix}objcopy").getAbsolutePath()
ddhill@6828 576 ARMV7HF.webkit.strip = file("$compilerHome/bin/${compilerPrefix}strip").getAbsolutePath()
ddhill@6828 577 ARMV7HF.webkit.ccFlags = extraCFlags.join(' ')
ddhill@6828 578 ARMV7HF.webkit.linkFlags = extraLFlags.join(' ')
ddhill@6377 579
ddhill@6828 580 ARMV7HF.media = [:]
ddhill@6828 581 ARMV7HF.media.compiler = compiler
ddhill@6828 582 ARMV7HF.media.linker = linker
ddhill@6828 583 ARMV7HF.media.extra_cflags = mediaCFlags.join(' ')
ddhill@6828 584 ARMV7HF.media.extra_ldflags = mediaLFlags.join(' ')
ddhill@6957 585
ddhill@6957 586 ARMV7HF.deploy = [:]
ddhill@6957 587 ARMV7HF.deploy.publicLibraryFilter = [
ddhill@6957 588 "fxavcodecplugin-52.so",
ddhill@6957 589 "fxavcodecplugin-53.so",
ddhill@6957 590 "fxplugins.so",
ddhill@6957 591 "libjfxwebkit.so",
ddhill@6957 592 "libgstplugins-lite.so",
ddhill@6957 593 "libgstreamer-lite.so",
ddhill@6957 594 "libprism_es2_eglx11.so",
ddhill@6957 595 "libglass_lens_fb.so"
ddhill@6957 596 ]
ddhill@6957 597 ARMV7HF.deploy.compressBigJar=true