andriod.bp中 添加宏控编译
1.aosp/build/make/core/soong_config.mk
+$(call add_json_bool, Cus_nfc_config, $(filter true,$(CUS_NFC_CONFIG))
2.aosp/build/soong/android/variable.go
在Product_variables struct下添加自己的宏控变量
+Cus_nfc_config struct {
+ Cflags []string
+ }
在 type productVariables struct下增加
+Cus_nfc_config *bool `json:",omitempty"
3.在你编译文件的android.bp中增加
+product_variables: {
+ cus_nfc_config: {
+ cflags: [
+ "-DCUS_NFC_CONFIG",
+ ],
+ },
+}
4.BoardConfig.mk中添加自定义宏控
+CUS_NFC_CONFIG := true
本文来自互联网用户投稿,文章观点仅代表作者本人,不代表本站立场,不承担相关法律责任。如若转载,请注明出处。 如若内容造成侵权/违法违规/事实不符,请点击【内容举报】进行投诉反馈!
