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

apply plugin: '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