90 ARMV6HF.includeGTK = true
91
92 ARMV6HF.javafxPlatformDefault="monocle"
93
94 // Libraries end up in the sdk/rt/lib/arm directory for arm builds
95 ARMV6HF.arch = "arm"
96 ARMV6HF.libDest = "lib/arm"
97
98 def commonFlags = [
99 "-fno-strict-aliasing", "-fPIC", "-fno-omit-frame-pointer", // optimization flags
100 "-W", "-Wall", "-Wno-unused", "-Wno-parentheses", "-Werror=implicit-function-declaration"] // warning flags
101 // Specify the compilation parameters and link parameters
102 def ccFlags = [
103 commonFlags, "-I$JDK_HOME/include", "-I$JDK_HOME/include/$jniPlatform", "-c",
104 IS_DEBUG_NATIVE ? ["-ggdb", "-DVERBOSE"] : ["-O2", "-DNDEBUG"]].flatten()
105 //ccFlags.addAll(["-Wnon-virtual-dtor", "-Woverloaded-virtual", "-std=c++0x"])
106 def linkFlags = ["-shared", commonFlags].flatten()
107
108 // Specify the compilation parameters and link parameters
109 def extraCFlags = [
110 "-I", "-L",
111 ccFlags,
112 "-marm", "-mfloat-abi=hard", "-mfpu=vfp",
113 "-I$sdk/usr/include",
114 "-I$sdk/opt/vc/include",
115 "-I$sdk/opt/vc/include/interface/vcos/pthreads",
116 "-I$sdk/opt/vc/include/interface/vmcs_host/linux",
117 "-DOMAP3", "-DUSE_DISPMAN"].flatten();
118
119 //See if we should build for imx6
120 def imxHeader=file("$sdk/usr/include/linux/mxcfb.h")
121 if (imxHeader.exists()) {
122 extraCFlags = [extraCFlags,"-DIMX6_PLATFORM"].flatten();
123 }
124
125 def extraLFlags = [
126 "-I", "-L",
127 linkFlags,
128 "-L$sdk/lib/arm-linux-gnueabihf",
129 "-L$sdk/usr/lib",
130 "-L$sdk/usr/lib/arm-linux-gnueabihf",
131 "-L$sdk/opt/vc/lib"].flatten()
132
133 def lensLFlags = [extraLFlags, "-lpthread", "-ludev", "-ldl", "-lm"].flatten()
134 def monocleCFlags = [
135 extraCFlags,
136 "-Werror",
137 "-I", file("modules/graphics/src/main/native-glass/monocle/")].flatten();
138 def monocleLFlags = [extraLFlags, "-ldl", "-lm"].flatten()
139
140 def fontCFlags = [extraCFlags].flatten()
141 def fontLFlags = [extraLFlags, "-ldl"].flatten()
142
143 def iioCFlags = [extraCFlags,
144 "-Wno-main" // suppress warnings about using main as a variable, 3rd party code
145 ].flatten()
146 def iioLFlags = [extraLFlags].flatten()
|
90 ARMV6HF.includeGTK = true
91
92 ARMV6HF.javafxPlatformDefault="monocle"
93
94 // Libraries end up in the sdk/rt/lib/arm directory for arm builds
95 ARMV6HF.arch = "arm"
96 ARMV6HF.libDest = "lib/arm"
97
98 def commonFlags = [
99 "-fno-strict-aliasing", "-fPIC", "-fno-omit-frame-pointer", // optimization flags
100 "-W", "-Wall", "-Wno-unused", "-Wno-parentheses", "-Werror=implicit-function-declaration"] // warning flags
101 // Specify the compilation parameters and link parameters
102 def ccFlags = [
103 commonFlags, "-I$JDK_HOME/include", "-I$JDK_HOME/include/$jniPlatform", "-c",
104 IS_DEBUG_NATIVE ? ["-ggdb", "-DVERBOSE"] : ["-O2", "-DNDEBUG"]].flatten()
105 //ccFlags.addAll(["-Wnon-virtual-dtor", "-Woverloaded-virtual", "-std=c++0x"])
106 def linkFlags = ["-shared", commonFlags].flatten()
107
108 // Specify the compilation parameters and link parameters
109 def extraCFlags = [
110 ccFlags,
111 "-marm", "-mfloat-abi=hard", "-mfpu=vfp",
112 "-I$sdk/usr/include",
113 "-I$sdk/opt/vc/include",
114 "-I$sdk/opt/vc/include/interface/vcos/pthreads",
115 "-I$sdk/opt/vc/include/interface/vmcs_host/linux",
116 "-DOMAP3", "-DUSE_DISPMAN"].flatten();
117
118 //See if we should build for imx6
119 def imxHeader=file("$sdk/usr/include/linux/mxcfb.h")
120 if (imxHeader.exists()) {
121 extraCFlags = [extraCFlags,"-DIMX6_PLATFORM"].flatten();
122 }
123
124 def extraLFlags = [
125 linkFlags,
126 "-L$sdk/lib/arm-linux-gnueabihf",
127 "-L$sdk/usr/lib",
128 "-L$sdk/usr/lib/arm-linux-gnueabihf",
129 "-L$sdk/opt/vc/lib"].flatten()
130
131 def lensLFlags = [extraLFlags, "-lpthread", "-ludev", "-ldl", "-lm"].flatten()
132 def monocleCFlags = [
133 extraCFlags,
134 "-Werror",
135 "-I", file("modules/graphics/src/main/native-glass/monocle/")].flatten();
136 def monocleLFlags = [extraLFlags, "-ldl", "-lm"].flatten()
137
138 def fontCFlags = [extraCFlags].flatten()
139 def fontLFlags = [extraLFlags, "-ldl"].flatten()
140
141 def iioCFlags = [extraCFlags,
142 "-Wno-main" // suppress warnings about using main as a variable, 3rd party code
143 ].flatten()
144 def iioLFlags = [extraLFlags].flatten()
|