Repository navigation
Expand file tree
/
Copy pathbuild.gradle
More file actions
126 lines (124 loc) · 5.57 KB
/
Copy pathbuild.gradle
File metadata and controls
126 lines (124 loc) · 5.57 KB
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
apply plugin: "c"
model {
toolChains {
gcc(Gcc) {
target("linux64") {}
target("linux32") {}
target("raspberrypi") {
cCompiler.executable = "arm-linux-gnueabihf-g++"
cppCompiler.executable = "arm-linux-gnueabihf-g++"
linker.executable = "arm-linux-gnueabihf-g++"
}
target("esp32") {
cCompiler.executable = "xtensa-esp32-elf-g++"
cppCompiler.executable = "xtensa-esp32-elf-g++"
linker.executable = "xtensa-esp32-elf-g++"
}
}
clang(Clang) {
target("macosx") {}
}
}
buildTypes {
release
debug
}
platforms {
linux32 {
operatingSystem "linux"
architecture "x86"
}
linux64 {
operatingSystem "linux"
architecture "amd64"
}
windows {
architecture "amd64"
}
macosx {
architecture "amd64"
}
esp32 {
architecture "arm"
}
raspberrypi {
operatingSystem "linux"
architecture "arm"
}
}
components {
libnpnt(NativeLibrarySpec) {
targetPlatform "linux64"
targetPlatform "linux32"
targetPlatform "windows"
targetPlatform "macosx"
targetPlatform "esp32"
targetPlatform "raspberrypi"
sources {
c {
source {
srcDir "src"
include "**/*.c"
}
exportedHeaders {
srcDirs "inc"
}
}
}
}
}
binaries {
all {
cCompiler.define 'RFM_USE_WOLFSSL'
cCompiler.args '-fPIC'
}
withType(NativeLibraryBinarySpec) {
if (targetPlatform == platforms.esp32) {
cCompiler.args "-I$System.env.SDKCONFIG_PATH/build/config"
cppCompiler.args "-I$System.env.SDKCONFIG_PATH/build/config"
cCompiler.args "-I$System.env.IDF_PATH/components/wolfssl"
cppCompiler.args "-I$System.env.IDF_PATH/components/wolfssl"
cCompiler.args "-I$System.env.IDF_PATH/components/wolfssl/include"
cppCompiler.args "-I$System.env.IDF_PATH/components/wolfssl/include"
cCompiler.args "-I$System.env.IDF_PATH/components/freertos/include/freertos"
cppCompiler.args "-I$System.env.IDF_PATH/components/freertos/include/freertos"
cCompiler.args "-I$System.env.IDF_PATH/components/freertos/include"
cppCompiler.args "-I$System.env.IDF_PATH/components/freertos/include"
cCompiler.args "-I$System.env.IDF_PATH/components/xtensa/include"
cppCompiler.args "-I$System.env.IDF_PATH/components/xtensa/include"
cCompiler.args "-I$System.env.IDF_PATH/components/soc/esp32/include"
cppCompiler.args "-I$System.env.IDF_PATH/components/soc/esp32/include"
cCompiler.args "-I$System.env.IDF_PATH/components/esp_rom/include"
cppCompiler.args "-I$System.env.IDF_PATH/components/esp_rom/include"
cCompiler.args "-I$System.env.IDF_PATH/components/xtensa/esp32/include"
cppCompiler.args "-I$System.env.IDF_PATH/components/xtensa/esp32/include"
cCompiler.args "-I$System.env.IDF_PATH/components/newlib/include"
cppCompiler.args "-I$System.env.IDF_PATH/components/newlib/include"
cCompiler.args "-I$System.env.IDF_PATH/components/esp_common/include"
cppCompiler.args "-I$System.env.IDF_PATH/components/esp_common/include"
cCompiler.args "-I$System.env.IDF_PATH/components/heap/include"
cppCompiler.args "-I$System.env.IDF_PATH/components/heap/include"
cCompiler.args "-I$System.env.IDF_PATH/components/esp32/include"
cppCompiler.args "-I$System.env.IDF_PATH/components/esp32/include"
cCompiler.args "-I$System.env.IDF_PATH/components/driver/include"
cppCompiler.args "-I$System.env.IDF_PATH/components/driver/include"
cCompiler.args "-I$System.env.IDF_PATH/components/log/include"
cppCompiler.args "-I$System.env.IDF_PATH/components/log/include"
cCompiler.args "-I$System.env.IDF_PATH/components/newlib/platform_include"
cppCompiler.args "-I$System.env.IDF_PATH/components/newlib/platform_include"
cCompiler.args "-DWOLFSSL_USER_SETTINGS"
cppCompiler.args "-DWOLFSSL_USER_SETTINGS"
cCompiler.args "-mlongcalls", "-ffunction-sections", "-fdata-sections", "-fstrict-volatile-bitfields", "-ggdb", "-Og", "-fno-exceptions", "-nostdlib"
cppCompiler.args "-mlongcalls", "-ffunction-sections", "-fdata-sections", "-fstrict-volatile-bitfields", "-ggdb", "-Og", "-std=gnu++11", "-fno-exceptions", "-fno-rtti", "-nostdlib"
}
if (targetPlatform.operatingSystem.linux || targetPlatform.operatingSystem.macOsX) {
linker.args '-lwolfssl'
linker.args '-lmxml'
}
if (targetPlatform == platforms.raspberrypi) {
cCompiler.args '-I/home/nihal/Code/Skylark/gatekeeper/prebuilt_rasp/include', '-std=c99'
linker.args '-L/home/nihal/Code/Skylark/gatekeeper/prebuilt_rasp/lib'
}
}
}
}