Skip to main content
aboutsummaryrefslogtreecommitdiffstats
blob: 27ae8fc4d2a335a855598b9439ce073d902e3d24 (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
import static org.apache.tools.ant.taskdefs.condition.Os.*

plugins {
	id 'c'
}

def platform = ''
if(isFamily(FAMILY_WINDOWS)) { platform = 'MT_WIN_MinGW' }
else if(isFamily(FAMILY_UNIX)) { platform = 'MT_POSIX_GENERIC_GCC' }

model {
	components {
		etrice_runtime_c(NativeLibrarySpec) {
			sources.c {
				source {
					srcDirs = ['src/common', 'src/config', "src/platforms/$platform", 'src/util']
					include '**/*.c'
				}
				exportedHeaders {
					srcDirs = ['src/common', 'src/config', "src/platforms/$platform", 'src/util']
				}
			}
			binaries {
				withType(SharedLibraryBinarySpec) { buildable = false }
				all { cCompiler.args '-g3' }
			}
		}
	}
}

Back to the top