Skip to main content
aboutsummaryrefslogtreecommitdiffstats
blob: f11e40692ca26e70bf437c4273e348f794e8a4ec (plain) (blame)
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
plugins {
	id 'c'
}

apply from: etGenerator

def models = [
	'model/PInterrupt.room',
	'model/TcpService.room',
	'model/TimingService.room'
]

createGeneratorTask('generate', 'c', models, 'src-gen', '-lib')

model {
	components {
		etrice_modellib_c(NativeLibrarySpec) {
			sources.c {
				builtBy generate
				source {
					srcDirs = ['src-gen']
					include '**/*.c'
				}
				exportedHeaders {
					srcDirs = ['src-gen']
				}
				lib project: ':runtime:org.eclipse.etrice.runtime.c', library: 'etrice_runtime_c', linkage: 'api'
			}
			binaries {
				withType(SharedLibraryBinarySpec) { buildable = false }
				all { cCompiler.args '-g3' }
			}
		}
	}
}

clean.delete 'src-gen'

Back to the top