28 lines
667 B
Go
28 lines
667 B
Go
package audiofoundation
|
|
|
|
import (
|
|
"android/soong/android"
|
|
"android/soong/cc"
|
|
)
|
|
func mtkLibAudiofoundationDefaults(ctx android.LoadHookContext) {
|
|
type props struct {
|
|
Cflags []string
|
|
Shared_libs []string
|
|
}
|
|
p := &props{}
|
|
vars := ctx.Config().VendorConfig("mtkPlugin")
|
|
if vars.Bool("MTK_AUDIO") {
|
|
p.Cflags = append(p.Cflags, "-DMTK_AUDIO")
|
|
}
|
|
ctx.AppendProperties(p)
|
|
}
|
|
|
|
func init() {
|
|
android.RegisterModuleType("mtk_libaudiofoundation_defaults", mtkLibAudiofoundationDefaultsFactory)
|
|
}
|
|
|
|
func mtkLibAudiofoundationDefaultsFactory() android.Module {
|
|
module := cc.DefaultsFactory()
|
|
android.AddLoadHook(module, mtkLibAudiofoundationDefaults)
|
|
return module
|
|
} |