summaryrefslogtreecommitdiff
path: root/buildSrc/armv6sf.gradle
blob: 9b09f5ee5aa1a176d9ad907d2aa5090f60a06953 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
/*
 * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 *
 * This code is free software; you can redistribute it and/or modify it
 * under the terms of the GNU General Public License version 2 only, as
 * published by the Free Software Foundation.  Oracle designates this
 * particular file as subject to the "Classpath" exception as provided
 * by Oracle in the LICENSE file that accompanied this code.
 *
 * This code is distributed in the hope that it will be useful, but WITHOUT
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
 * version 2 for more details (a copy is included in the LICENSE file that
 * accompanied this code).
 *
 * You should have received a copy of the GNU General Public License version
 * 2 along with this work; if not, write to the Free Software Foundation,
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
 *
 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
 * or visit www.oracle.com if you need additional information or have any
 * questions.
 */

ext.ARMV6SF = [:]
def crossLibsPackage="armv6sf-02"

// Define the location of the sdk and toolchain
def sdk=file("${rootProject.CROSS_TOOLS_DIR}/${crossLibsPackage}")

def compilerHome
def compilerPrefix
if (IS_LINUX) {
    fetchExternalTools('ARMV6SF',
            ["${crossLibsPackage}.tgz",
             "arm-linaro-4.7.tgz" ],
            rootProject.CROSS_TOOLS_DIR,
            rootProject.IS_IMPORT_CROSS_TOOLS)

    compilerHome=file("${rootProject.CROSS_TOOLS_DIR}/arm-linaro-4.7")
    compilerPrefix="arm-linux-gnueabi-"
}

if (rootProject.hasProperty("ARMV6SF_COMPILER")) {
    logger.quiet "Using alternate ARMV6SF_COMPILER $rootProject.ARMV6SF_COMPILER"
    compilerHome=file(rootProject.ARMV6SF_COMPILER);
}
if (rootProject.hasProperty("ARMV6SF_COMPILER_PREFIX")) {
    logger.quiet "Using alternate ARMV6SF_COMPILER_PREFIX $rootProject.ARMV6SF_COMPILER_PREFIX"
    compilerPrefix="${rootProject.ARMV6SF_COMPILER_PREFIX}"
}
def jniPlatform
if (IS_LINUX) {
    jniPlatform="linux"
} else if (IS_MAC) {
    jniPlatform="darwin"
} else {
    fail "armv6sf Cannot build on this platform"
    return;
}

def compiler = file("$compilerHome/bin/${compilerPrefix}gcc").getAbsolutePath()
def linker = file("$compilerHome/bin/${compilerPrefix}g++").getAbsolutePath()

// Declare whether this particular target file applies to the current system
ARMV6SF.canBuild = (IS_LINUX || IS_MAC) && compilerHome.exists() && sdk.exists()
if (!ARMV6SF.canBuild) {
    if (!compilerHome.exists()) println "ERROR: Missing compiler $compilerHome"
    if (!sdk.exists()) println "ERROR: Missing sdk $sdk"
    fail("armv6sf missing required tools")
}

// Lambda for naming the generated libs
ARMV6SF.library = { name -> return "lib${name}.so" as String }

ARMV6SF.compileSwing = false;
ARMV6SF.compileSWT = false;
ARMV6SF.compileFXPackager = false;
ARMV6SF.compileWebnodeNative = false;
ARMV6SF.compileMediaNative = false;

ARMV6SF.includeLens = false
ARMV6SF.includeMonocle = true
ARMV6SF.includeNull3d = true
ARMV6SF.includeEGL = true
ARMV6SF.includeSwing = false
ARMV6SF.includeSWT = false
ARMV6SF.includeGTK = true

ARMV6SF.javafxPlatformDefault="monocle"

// Libraries end up in the sdk/rt/lib/arm directory for arm builds
ARMV6SF.arch = "arm"
ARMV6SF.libDest = "lib/arm"

def commonFlags = [
        "-fno-strict-aliasing", "-fPIC", "-fno-omit-frame-pointer", // optimization flags
        "-W", "-Wall", "-Wno-unused", "-Wno-parentheses", "-Werror=implicit-function-declaration"] // warning flags
// Specify the compilation parameters and link parameters
def ccFlags = [
        commonFlags, "-I$JDK_HOME/include", "-I$JDK_HOME/include/$jniPlatform", "-c",
        IS_DEBUG_NATIVE ? ["-ggdb", "-DVERBOSE"] : ["-O2", "-DNDEBUG"]].flatten()
//ccFlags.addAll(["-Wnon-virtual-dtor", "-Woverloaded-virtual", "-std=c++0x"])
def linkFlags = ["-shared", commonFlags].flatten()

// Specify the compilation parameters and link parameters
def extraCFlags = [
        ccFlags,
        "-march=armv6", "-mfloat-abi=softfp", "-mfpu=vfp",
        "-I$sdk/usr/include",
        "-D_GNU_SOURCE", "-DOMAP3"].flatten();

//See if we should build for imx6
def imxHeader=file("$sdk/usr/include/linux/mxcfb.h")
if (imxHeader.exists()) {
        extraCFlags = [extraCFlags,"-DIMX6_PLATFORM"].flatten();
}

def extraLFlags = [
        linkFlags,
        "-L$sdk/usr/lib",
        "-L$sdk/usr/lib/arm-linux-gnueabi",
        "-L$sdk/lib/arm-linux-gnueabi"
        ].flatten()

def x11CFlags = [extraCFlags, "-DUSE_XSHM"].flatten()
def x11LFlags = [extraLFlags, "-lX11", "-lXext"].flatten()
def eglCFlags = [extraCFlags].flatten()
def eglLFlags = [extraLFlags].flatten()
def dfbCFlags = ["-I$sdk/usr/include/directfb"]
def dfbLFlags = ["-ldl"]
// TODO dfb.args=disable-module=ps2mouse,disable-module=keyboard

def lensLFlags = [extraLFlags, "-lpthread", "-ludev", "-ldl", "-lm"].flatten()
def monocleCFlags = [
        extraCFlags,
        "-Werror",
        "-I", file("modules/graphics/src/main/native-glass/monocle/")].flatten();
def monocleLFlags = [extraLFlags, "-ldl", "-lm"].flatten()
def glassCFlags = ["-ffast-math"]
def glassLFlags = []

def fontCFlags = [extraCFlags].flatten()
def fontLFlags = [extraLFlags].flatten()

def iioCFlags = [extraCFlags].flatten()
def iioLFlags = [extraLFlags].flatten()

def es2CFlags = [extraCFlags].flatten()
def es2LFlags = [extraLFlags, eglLFlags].flatten()

def es2EglfbCFlags = [extraCFlags, eglCFlags, "-DIS_EGLFB", "-DLINUX"].flatten()
def es2EglfbLFlags = [extraLFlags, eglLFlags].flatten()
def es2MonocleCFlags = [extraCFlags, eglCFlags, "-DIS_EGLFB", "-DLINUX"].flatten()
def es2MonocleFlags = [extraLFlags, eglLFlags].flatten()

def es2X11CFlags = [extraCFlags, eglCFlags, x11CFlags, "-DDEBUG", "-DIS_EGLX11", "-DLINUX"].flatten()
def es2X11LFlags = [extraLFlags, x11LFlags, eglLFlags, "-lXdmcp", "-lXau"].flatten()

def prismSWCFlags = [extraCFlags].flatten()
def prismSWLFlags = [extraLFlags].flatten()

def mediaCFlags = [extraCFlags,
    "-I$sdk/usr/include/gstreamer-0.10",
    "-I$sdk/usr/include/glib-2.0",
    "-I$sdk/usr/lib/arm-linux-gnueabi/glib-2.0/include",
    "-DENABLE_NATIVE_SOURCE=1", "-DENABLE_GST_FFMPEG=1"].flatten()
def mediaLFlags = [extraLFlags, "-lgstreamer-0.10", "-lgstapp-0.10",
    "-lgstbase-0.10", "-lglib-2.0", "-lgobject-2.0", "-lgmodule-2.0", "-lgthread-2.0"].flatten()

def webCFlags = [extraCFlags].flatten()
def webLFlags = [extraLFlags].flatten()

def gtkCFlags = [extraCFlags].flatten()
def gtkLFlags = [extraLFlags].flatten()

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"

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"

gtkCFlags.addAll(gtkCFlags_pkgconfig.split(" "))
gtkLFlags.addAll(gtkLFlags_pkgconfig.split(" "))

def monoclePlatformAdditions = """
monocle.glass.platform=Monocle
monocle.prism.order=es2,sw
monocle.prism.eglfb=true
monocle.prism.lcdtext=false
monocle.prism.maxvram=128m
monocle.prism.targetvram=112m
monocle.use.egl=true
monocle.use.gles2=true
monocle.embedded=monocle
monocle.com.sun.javafx.isEmbedded=true
monocle.doNativeComposite=true
monocle.com.sun.javafx.scene.control.skin.FXVK.cache=true
monocle.prism.glDepthSize=0
monocle.com.sun.javafx.gestures.zoom=true
monocle.com.sun.javafx.gestures.rotate=true
monocle.com.sun.javafx.gestures.scroll=true"""

def lensPlatformAdditions = """
directfb.com.sun.javafx.scene.control.skin.ListViewSkin.pannable=true
directfb.com.sun.javafx.scene.control.skin.TreeViewSkin.pannable=true
directfb.com.sun.javafx.scene.control.skin.TableViewSkin.pannable=true
directfb.glass.platform=Lens
directfb.glass.lens=dfb
directfb.prism.order=sw
directfb.com.sun.javafx.isEmbedded=true
directfb.com.sun.javafx.scene.control.skin.FXVK.cache=true
directfb.com.sun.javafx.gestures.zoom=true
directfb.com.sun.javafx.gestures.rotate=true
directfb.com.sun.javafx.gestures.scroll=true
eglfb.com.sun.javafx.scene.control.skin.ListViewSkin.pannable=true
eglfb.com.sun.javafx.scene.control.skin.TreeViewSkin.pannable=true
eglfb.com.sun.javafx.scene.control.skin.TableViewSkin.pannable=true
eglfb.maxTextureSize=2048
eglfb.glass.platform=Lens
eglfb.glass.lens=eglfb
eglfb.prism.order=es2
eglfb.prism.eglfb=true
eglfb.prism.lcdtext=false
eglfb.prism.maxvram=128m
eglfb.prism.targetvram=112m
eglfb.use.egl=true
eglfb.use.gles2=true
eglfb.embedded=eglfb
eglfb.com.sun.javafx.isEmbedded=true
eglfb.doNativeComposite=true
eglfb.com.sun.javafx.scene.control.skin.FXVK.cache=true
eglfb.prism.glDepthSize=0
eglfb.com.sun.javafx.gestures.zoom=true
eglfb.com.sun.javafx.gestures.rotate=true
eglfb.com.sun.javafx.gestures.scroll=true
fb.com.sun.javafx.scene.control.skin.ListViewSkin.pannable=true
fb.com.sun.javafx.scene.control.skin.TreeViewSkin.pannable=true
fb.com.sun.javafx.scene.control.skin.TableViewSkin.pannable=true
fb.glass.platform=Lens
fb.glass.lens=fb
fb.prism.order=sw
fb.com.sun.javafx.isEmbedded=true
fb.glass.restrictWindowToScreen=true
fb.com.sun.javafx.scene.control.skin.FXVK.cache=true
fb.com.sun.javafx.gestures.zoom=true
fb.com.sun.javafx.gestures.rotate=true
fb.com.sun.javafx.gestures.scroll=true
eglx11.com.sun.javafx.scene.control.skin.ListViewSkin.pannable=true
eglx11.com.sun.javafx.scene.control.skin.TreeViewSkin.pannable=true
eglx11.com.sun.javafx.scene.control.skin.TableViewSkin.pannable=true
eglx11.glass.platform=Lens
eglx11.glass.lens=eglx11
eglx11.prism.order=es2
eglx11.prism.eglx11=true
eglx11.prism.lcdtext=false
eglx11.prism.maxvram=128m
eglx11.prism.targetvram=112m
eglx11.use.egl=true
eglx11.use.gles2=true
eglx11.embedded=eglx11
eglx11.com.sun.javafx.isEmbedded=true
eglx11.com.sun.javafx.scene.control.skin.FXVK.cache=true
eglx11.prism.glDepthSize=0
eglx11.com.sun.javafx.gestures.zoom=true
eglx11.com.sun.javafx.gestures.rotate=true
eglx11.com.sun.javafx.gestures.scroll=true"""

def gtkPlatformAdditions = """
gtk.com.sun.javafx.scene.control.skin.ListViewSkin.pannable=true
gtk.com.sun.javafx.scene.control.skin.TreeViewSkin.pannable=true
gtk.com.sun.javafx.scene.control.skin.TableViewSkin.pannable=true
gtk.glass.platform=gtk
gtk.prism.order=sw
gtk.com.sun.javafx.isEmbedded=true
gtk.com.sun.javafx.scene.control.skin.FXVK.cache=true
gtk.com.sun.javafx.gestures.zoom=true
gtk.com.sun.javafx.gestures.rotate=true
gtk.com.sun.javafx.gestures.scroll=true"""

def pangoCCFlags = [extraCFlags, "-D_ENABLE_PANGO"];
def pangoLinkFlags = [extraLFlags];

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 "

def pangoLFlags_pkgconfig = "-L${sdk}/usr/lib/arm-linux-gnueabi -lpangoft2-1.0 -lpango-1.0 -lfreetype -lfontconfig -lgobject-2.0 -lglib-2.0"

pangoCCFlags.addAll(gtkCFlags_pkgconfig.split(" "))
pangoLinkFlags.addAll(gtkLFlags_pkgconfig.split(" "))

def freetypeCCFlags = [ext.IS_COMPILE_PANGO ? "-D_ENABLE_PANGO" :
                       ext.IS_COMPILE_HARFBUZZ ? "-D_ENABLE_HARFBUZZ" : ""]
def freetypeLinkFlags = []

def freetypeCFlags_pkgconfig = "-I${sdk}/usr/include/freetype2 -I${sdk}/usr/include"
def freeytpeLFlags_pkgconfig = "-L${sdk}/usr/lib/arm-linux-gnueabi -lfreetype"

freetypeCCFlags.addAll(gtkCFlags_pkgconfig.split(" "))
freetypeLinkFlags.addAll(gtkLFlags_pkgconfig.split(" "))

ARMV6SF.javafxPlatformProperties = "javafx.platform=${ARMV6SF.javafxPlatformDefault}"

ARMV6SF.glass = [:]
ARMV6SF.glass.javahInclude = [
    "com/sun/glass/events/**",
    "com/sun/glass/ui/*"]
ARMV6SF.glass.variants = [ ]
if (ARMV6SF.includeLens) { 
    ARMV6SF.glass.variants.addAll("eglfb", "directfb", "fb", "lensport" );
    ARMV6SF.glass.javahInclude.addAll("com/sun/glass/ui/lens/*");
    ARMV6SF.javafxPlatformProperties = ARMV6SF.javafxPlatformProperties + lensPlatformAdditions
}
if (ARMV6SF.includeMonocle) { 
    ARMV6SF.glass.variants.addAll("monocle", "monocle_x11");
    ARMV6SF.glass.javahInclude.addAll(
        "com/sun/glass/ui/monocle/*",
        "com/sun/glass/ui/monocle/dispman/*",
        "com/sun/glass/ui/monocle/mx6/*",
        "com/sun/glass/ui/monocle/linux/*",
        "com/sun/glass/ui/monocle/util/*",
        "com/sun/glass/ui/monocle/x11/*");
    ARMV6SF.javafxPlatformProperties = ARMV6SF.javafxPlatformProperties + monoclePlatformAdditions
}
if (ARMV6SF.includeGTK) {
    ARMV6SF.glass.variants.addAll("gtk");
    ARMV6SF.glass.javahInclude.addAll("com/sun/glass/ui/gtk/*");
    ARMV6SF.javafxPlatformProperties = ARMV6SF.javafxPlatformProperties + gtkPlatformAdditions
}

ARMV6SF.glass.lib = "glass"

ARMV6SF.glass.lensport = [:]
ARMV6SF.glass.lensport.nativeSource = [
    file("modules/graphics/src/main/native-glass/lens/lensport") ]
ARMV6SF.glass.lensport.compiler = compiler
ARMV6SF.glass.lensport.ccFlags = ["-ffast-math", extraCFlags, "-DLINUX", "-DISEGLFB",
    "-DLENSPORT", "-I", file("modules/graphics/src/main/native-glass/lens/")].flatten()
ARMV6SF.glass.lensport.linker = linker
ARMV6SF.glass.lensport.linkFlags = [lensLFlags].flatten()
ARMV6SF.glass.lensport.lib = "lens_porting"

ARMV6SF.glass.monocle = [:]
ARMV6SF.glass.monocle.nativeSource = [
        file("modules/graphics/src/main/native-glass/monocle"),
        file("modules/graphics/src/main/native-glass/monocle/linux"),
        file("modules/graphics/src/main/native-glass/monocle/util") ]
ARMV6SF.glass.monocle.compiler = compiler
ARMV6SF.glass.monocle.ccFlags = monocleCFlags
ARMV6SF.glass.monocle.linker = linker
ARMV6SF.glass.monocle.linkFlags = monocleLFlags
ARMV6SF.glass.monocle.lib = "glass_monocle"

ARMV6SF.glass.monocle_x11 = [:]
ARMV6SF.glass.monocle_x11.nativeSource = [
        file("modules/graphics/src/main/native-glass/monocle/util"),
        file("modules/graphics/src/main/native-glass/monocle/x11") ]
ARMV6SF.glass.monocle_x11.compiler = compiler
ARMV6SF.glass.monocle_x11.ccFlags = monocleCFlags
ARMV6SF.glass.monocle_x11.linker = linker
ARMV6SF.glass.monocle_x11.linkFlags = [ monocleLFlags, "-lX11" ].flatten()
ARMV6SF.glass.monocle_x11.lib = "glass_monocle_x11"

ARMV6SF.glass.eglfb = [:]
// TODO when building headless, use lens/cursor/nullcursor/
// otherwise we use lens/cursor/fbCursor/ and lens/input/udev

// TODO when USE_RFB is specified use lens/rfb

// TODO use /eglfb/x11ContainerScreen when using eglfb and EGL_X11_FB_CONTAINER
// TODO use /headless/headlessScreen when using headless
ARMV6SF.glass.eglfb.nativeSource = [
    file("modules/graphics/src/main/native-glass/lens"),
    file("modules/graphics/src/main/native-glass/lens/wm"),
    file("modules/graphics/src/main/native-glass/lens/cursor/fbCursor"),
    file("modules/graphics/src/main/native-glass/lens/input/udev"),
    file("modules/graphics/src/main/native-glass/lens/wm/screen/fbdevScreen.c")]
ARMV6SF.glass.eglfb.compiler = compiler
ARMV6SF.glass.eglfb.ccFlags = ["-ffast-math", extraCFlags, "-DLINUX", "-DISEGLFB"].flatten()
ARMV6SF.glass.eglfb.linker = linker
ARMV6SF.glass.eglfb.linkFlags = [lensLFlags].flatten()
ARMV6SF.glass.eglfb.lib = "glass_lens_eglfb"

ARMV6SF.glass.directfb = [:]
ARMV6SF.glass.directfb.nativeSource = [
    file("modules/graphics/src/main/native-glass/lens"),
    file("modules/graphics/src/main/native-glass/lens/wm"),
    file("modules/graphics/src/main/native-glass/lens/cursor/fbCursor"),
    file("modules/graphics/src/main/native-glass/lens/input/udev"),
    file("modules/graphics/src/main/native-glass/lens/wm/screen/dfbScreen.c")]
ARMV6SF.glass.directfb.compiler = compiler
ARMV6SF.glass.directfb.ccFlags = ["-ffast-math", extraCFlags, "-I$sdk/usr/include/directfb", "-DLINUX"].flatten()
ARMV6SF.glass.directfb.linker = linker
ARMV6SF.glass.directfb.linkFlags = [lensLFlags].flatten()
ARMV6SF.glass.directfb.lib = "glass_lens_dfb"

ARMV6SF.glass.fb = [:]
ARMV6SF.glass.fb.nativeSource = [
    file("modules/graphics/src/main/native-glass/lens"),
    file("modules/graphics/src/main/native-glass/lens/wm"),
    file("modules/graphics/src/main/native-glass/lens/cursor/fbCursor"),
    file("modules/graphics/src/main/native-glass/lens/input/udev"),
    file("modules/graphics/src/main/native-glass/lens/wm/screen/fbdevScreen.c") ]
ARMV6SF.glass.fb.compiler = compiler
ARMV6SF.glass.fb.ccFlags = ["-ffast-math", extraCFlags, "-DLINUX"].flatten()
ARMV6SF.glass.fb.linker = linker
ARMV6SF.glass.fb.linkFlags = [lensLFlags].flatten()
ARMV6SF.glass.fb.lib = "glass_lens_fb"
 
ARMV6SF.glass.eglx11 = [:]
ARMV6SF.glass.eglx11.nativeSource = [
    file("modules/graphics/src/main/native-glass/lens"),
    file("modules/graphics/src/main/native-glass/lens/wm"),
    file("modules/graphics/src/main/native-glass/lens/cursor/fbCursor"),
    file("modules/graphics/src/main/native-glass/lens/input/udev"),
    file("modules/graphics/src/main/native-glass/lens/wm/screen/x11ContainerScreen.c")]
ARMV6SF.glass.eglx11.compiler = compiler
ARMV6SF.glass.eglx11.ccFlags = ["-ffast-math", extraCFlags].flatten()
ARMV6SF.glass.eglx11.ccFlags = ["-ffast-math", extraCFlags, "-DLINUX"].flatten()
ARMV6SF.glass.eglx11.linker = linker
ARMV6SF.glass.eglx11.linkFlags = [lensLFlags].flatten()
ARMV6SF.glass.eglx11.lib = "glass_lens_eglx11"
 
ARMV6SF.glass.gtk = [:]
ARMV6SF.glass.gtk.nativeSource = file("modules/graphics/src/main/native-glass/gtk")
ARMV6SF.glass.gtk.compiler = compiler
ARMV6SF.glass.gtk.ccFlags = ["-ffast-math", gtkCFlags, "-DLINUX"].flatten()
ARMV6SF.glass.gtk.linker = linker
ARMV6SF.glass.gtk.linkFlags = [gtkLFlags, "-lstdc++"].flatten()
ARMV6SF.glass.gtk.lib = "glass"

ARMV6SF.decora = [:]
ARMV6SF.decora.compiler = compiler
ARMV6SF.decora.ccFlags = extraCFlags
ARMV6SF.decora.linker = linker
ARMV6SF.decora.linkFlags = extraLFlags
ARMV6SF.decora.lib = "decora_sse"

ARMV6SF.prism = [:]
ARMV6SF.prism.javahInclude = ["com/sun/prism/impl/**/*", "com/sun/prism/PresentableState*"]
ARMV6SF.prism.nativeSource = file("modules/graphics/src/main/native-prism")
ARMV6SF.prism.compiler = compiler
ARMV6SF.prism.ccFlags = es2CFlags
ARMV6SF.prism.linker = linker
ARMV6SF.prism.linkFlags = es2LFlags 
ARMV6SF.prism.lib = "prism_common"

ARMV6SF.prismSW = [:]
ARMV6SF.prismSW.javahInclude = ["com/sun/pisces/**/*"]
ARMV6SF.prismSW.nativeSource = file("modules/graphics/src/main/native-prism-sw")
ARMV6SF.prismSW.compiler = compiler
ARMV6SF.prismSW.ccFlags = prismSWCFlags
ARMV6SF.prismSW.linker = linker
ARMV6SF.prismSW.linkFlags = prismSWLFlags
ARMV6SF.prismSW.lib = "prism_sw"

ARMV6SF.iio = [:]
ARMV6SF.iio.javahInclude = ["com/sun/javafx/iio/**/*"]
ARMV6SF.iio.nativeSource = [
    file("modules/graphics/src/main/native-iio"),
    file("modules/graphics/src/main/native-iio/libjpeg7")]
ARMV6SF.iio.compiler = compiler
ARMV6SF.iio.ccFlags = iioCFlags
ARMV6SF.iio.linker = linker
ARMV6SF.iio.linkFlags = iioLFlags
ARMV6SF.iio.lib = "javafx_iio"

ARMV6SF.prismES2 = [:]
ARMV6SF.prismES2.variants = ["eglfb", "monocle"]
ARMV6SF.prismES2.javahInclude = ["com/sun/prism/es2/**/*"]

ARMV6SF.prismES2.eglfb = [:]
ARMV6SF.prismES2.eglfb.nativeSource = [
    file("modules/graphics/src/main/native-prism-es2"),
    file("modules/graphics/src/main/native-prism-es2/GL"),
    file("modules/graphics/src/main/native-prism-es2/eglfb")
]
ARMV6SF.prismES2.eglfb.compiler = compiler
ARMV6SF.prismES2.eglfb.ccFlags = [ es2EglfbCFlags, "-I", ARMV6SF.glass.lensport.nativeSource ].flatten()
ARMV6SF.prismES2.eglfb.linker = linker
ARMV6SF.prismES2.eglfb.linkFlags = es2EglfbLFlags
ARMV6SF.prismES2.eglfb.lib = "prism_es2_eglfb"

ARMV6SF.prismES2.monocle= [:]
ARMV6SF.prismES2.monocle.nativeSource = [
    file("modules/graphics/src/main/native-prism-es2"),
    file("modules/graphics/src/main/native-prism-es2/GL"),
    file("modules/graphics/src/main/native-prism-es2/monocle")
]
ARMV6SF.prismES2.monocle.compiler = compiler
ARMV6SF.prismES2.monocle.ccFlags = [ es2EglfbCFlags, "-I", ARMV6SF.glass.lensport.nativeSource ].flatten()
ARMV6SF.prismES2.monocle.linker = linker
ARMV6SF.prismES2.monocle.linkFlags = es2EglfbLFlags
ARMV6SF.prismES2.monocle.lib = "prism_es2_monocle"

ARMV6SF.prismES2.eglx11 = [:]
ARMV6SF.prismES2.eglx11.nativeSource = [
    file("modules/graphics/src/main/native-prism-es2"),
    file("modules/graphics/src/main/native-prism-es2/GL"),
    file("modules/graphics/src/main/native-prism-es2/eglx11")
]
ARMV6SF.prismES2.eglx11.compiler = compiler
ARMV6SF.prismES2.eglx11.ccFlags = es2X11CFlags
ARMV6SF.prismES2.eglx11.linker = linker
ARMV6SF.prismES2.eglx11.linkFlags = es2X11LFlags
ARMV6SF.prismES2.eglx11.lib = "prism_es2_eglx11"

def closedDir = file("$projectDir/../rt-closed")
ARMV6SF.font = [:]
ARMV6SF.font.javahInclude = [
    "com/sun/javafx/font/**/*",
    "com/sun/javafx/text/**/*"]
ARMV6SF.font.nativeSource = [file("modules/graphics/src/main/native-font")]
ARMV6SF.font.compiler = compiler
ARMV6SF.font.ccFlags = fontCFlags
ARMV6SF.font.linker = linker
ARMV6SF.font.linkFlags = fontLFlags
ARMV6SF.font.lib = "javafx_font"

ARMV6SF.fontT2K = [:]
ARMV6SF.fontT2K.javahInclude = ["com/sun/javafx/font/t2k/**/*"]
ARMV6SF.fontT2K.nativeSource = [
        file("$closedDir/javafx-font-t2k-native/src"),
        file("$closedDir/javafx-font-t2k-native/src/layout")]
ARMV6SF.fontT2K.compiler = compiler
ARMV6SF.fontT2K.ccFlags = [fontCFlags, "-DLE_STANDALONE"].flatten()
ARMV6SF.fontT2K.linker = linker
ARMV6SF.fontT2K.linkFlags = fontLFlags
ARMV6SF.fontT2K.lib = "javafx_font_t2k"

ARMV6SF.fontFreetype = [:]
ARMV6SF.fontFreetype.javahInclude = ["com/sun/javafx/font/freetype/OSFreetype.class"]
ARMV6SF.fontFreetype.nativeSource = ["src/main/native-font/freetype.c"]
ARMV6SF.fontFreetype.compiler = compiler
ARMV6SF.fontFreetype.ccFlags = ["-DJFXFONT_PLUS", ccFlags, fontCFlags, freetypeCCFlags].flatten()
ARMV6SF.fontFreetype.linker = linker
ARMV6SF.fontFreetype.linkFlags = [linkFlags, fontLFlags, freetypeLinkFlags].flatten()
ARMV6SF.fontFreetype.lib = "javafx_font_freetype"

ARMV6SF.fontPango = [:]
ARMV6SF.fontPango.javahInclude = ["com/sun/javafx/font/freetype/OSPango.class"]
ARMV6SF.fontPango.nativeSource = ["src/main/native-font/pango.c"]
ARMV6SF.fontPango.compiler = compiler
ARMV6SF.fontPango.ccFlags = ["-DJFXFONT_PLUS", ccFlags, pangoCCFlags].flatten()
ARMV6SF.fontPango.linker = linker
ARMV6SF.fontPango.linkFlags = [linkFlags, pangoLinkFlags].flatten()
ARMV6SF.fontPango.lib = "javafx_font_pango"

ARMV6SF.webkit = [:]
ARMV6SF.webkit.binDir   = "$compilerHome/bin"
ARMV6SF.webkit.compiler = compiler
ARMV6SF.webkit.linker   = linker
ARMV6SF.webkit.ar       = file("$compilerHome/bin/${compilerPrefix}ar").getAbsolutePath()
ARMV6SF.webkit.objcopy  = file("$compilerHome/bin/${compilerPrefix}objcopy").getAbsolutePath()
ARMV6SF.webkit.strip    = file("$compilerHome/bin/${compilerPrefix}strip").getAbsolutePath()
ARMV6SF.webkit.ccFlags  = extraCFlags.join(' ')
ARMV6SF.webkit.linkFlags = extraLFlags.join(' ')

ARMV6SF.disableMedia = true
ARMV6SF.media = [:]
ARMV6SF.media.compiler = compiler
ARMV6SF.media.linker = linker
ARMV6SF.media.extra_cflags = mediaCFlags.join(' ')
ARMV6SF.media.extra_ldflags = mediaLFlags.join(' ')

ARMV6SF.deploy = [:]
ARMV6SF.deploy.publicLibraryFilter = [
  "fxavcodecplugin-52.so",
  "fxavcodecplugin-53.so",
  "fxplugins.so",
  "libjfxwebkit.so",
  "libgstplugins-lite.so",
  "libgstreamer-lite.so",
  "libprism_es2_eglx11.so",
  "libglass_lens_fb.so"
]
ARMV6SF.deploy.compressBigJar=true