annotate buildSrc/armv7hf.gradle @ 8968:eb272f8584c8

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