summaryrefslogtreecommitdiff
path: root/lib/libdrm/Android.sources.bp.mk
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libdrm/Android.sources.bp.mk')
-rw-r--r--lib/libdrm/Android.sources.bp.mk25
1 files changed, 25 insertions, 0 deletions
diff --git a/lib/libdrm/Android.sources.bp.mk b/lib/libdrm/Android.sources.bp.mk
new file mode 100644
index 000000000..26b61c1ec
--- /dev/null
+++ b/lib/libdrm/Android.sources.bp.mk
@@ -0,0 +1,25 @@
+# Usage: make -f path/to/Android.sources.bp.mk NAMES=<> >Android.sources.bp
+#
+# It will read the Makefile.sources in the current directory, and
+# write <NAME>_FILES to stdout as an Android.bp cc_defaults module.
+
+.PHONY: all
+all:
+ @# Do nothing
+
+include Makefile.sources
+
+empty :=
+indent := $(empty) $(empty)
+
+$(info // Autogenerated with Android.sources.bp.mk)
+$(foreach NAME,$(NAMES), \
+ $(eval lower_name := $(shell echo $(PREFIX)$(NAME) | tr 'A-Z' 'a-z')) \
+ $(info ) \
+ $(info cc_defaults {) \
+ $(info $(indent)name: "$(lower_name)_sources",) \
+ $(info $(indent)srcs: [) \
+ $(foreach f,$(filter %.c,$($(NAME)_FILES)), \
+ $(info $(indent)$(indent)"$(f)",)) \
+ $(info $(indent)],) \
+ $(info }))