aboutsummaryrefslogtreecommitdiff
path: root/lib/Makefile
diff options
context:
space:
mode:
authorAKASHI Takahiro2019-11-13 09:44:57 +0900
committerTom Rini2019-12-06 16:44:20 -0500
commita9b45e6e8382d59f416e3ba7cbda66bca6e33c10 (patch)
treef3b668a4ab05867882603986f682f150dbf2d06a /lib/Makefile
parente2c04fafc836274c4b04c2439511675350c6df31 (diff)
lib: add oid registry utility
Imported from linux kernel v5.3: build_OID_registry without changes oid_registry.h without changes oid_registry.c with changes marked as __UBOOT__ Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Diffstat (limited to 'lib/Makefile')
-rw-r--r--lib/Makefile16
1 files changed, 16 insertions, 0 deletions
diff --git a/lib/Makefile b/lib/Makefile
index f69c0131e87..d5bf1951ff5 100644
--- a/lib/Makefile
+++ b/lib/Makefile
@@ -120,4 +120,20 @@ endif
obj-y += date.o
+#
+# Build a fast OID lookup registry from include/linux/oid_registry.h
+#
+obj-$(CONFIG_OID_REGISTRY) += oid_registry.o
+
+$(obj)/oid_registry.o: $(obj)/oid_registry_data.c
+
+$(obj)/oid_registry_data.c: $(srctree)/include/linux/oid_registry.h \
+ $(srctree)/scripts/build_OID_registry
+ $(call cmd,build_OID_registry)
+
+quiet_cmd_build_OID_registry = GEN $@
+ cmd_build_OID_registry = perl $(srctree)/scripts/build_OID_registry $< $@
+
+clean-files += oid_registry_data.c
+
subdir-ccflags-$(CONFIG_CC_OPTIMIZE_LIBS_FOR_SPEED) += -O2