18c2ecf20Sopenharmony_ci# SPDX-License-Identifier: GPL-2.0 28c2ecf20Sopenharmony_ciobj-$(CONFIG_CFG80211) += cfg80211.o 38c2ecf20Sopenharmony_ciobj-$(CONFIG_LIB80211) += lib80211.o 48c2ecf20Sopenharmony_ciobj-$(CONFIG_LIB80211_CRYPT_WEP) += lib80211_crypt_wep.o 58c2ecf20Sopenharmony_ciobj-$(CONFIG_LIB80211_CRYPT_CCMP) += lib80211_crypt_ccmp.o 68c2ecf20Sopenharmony_ciobj-$(CONFIG_LIB80211_CRYPT_TKIP) += lib80211_crypt_tkip.o 78c2ecf20Sopenharmony_ci 88c2ecf20Sopenharmony_ciobj-$(CONFIG_WEXT_CORE) += wext-core.o 98c2ecf20Sopenharmony_ciobj-$(CONFIG_WEXT_PROC) += wext-proc.o 108c2ecf20Sopenharmony_ciobj-$(CONFIG_WEXT_SPY) += wext-spy.o 118c2ecf20Sopenharmony_ciobj-$(CONFIG_WEXT_PRIV) += wext-priv.o 128c2ecf20Sopenharmony_ci 138c2ecf20Sopenharmony_cicfg80211-y += core.o sysfs.o radiotap.o util.o reg.o scan.o nl80211.o 148c2ecf20Sopenharmony_cicfg80211-y += mlme.o ibss.o sme.o chan.o ethtool.o mesh.o ap.o trace.o ocb.o 158c2ecf20Sopenharmony_cicfg80211-y += pmsr.o 168c2ecf20Sopenharmony_cicfg80211-$(CONFIG_OF) += of.o 178c2ecf20Sopenharmony_cicfg80211-$(CONFIG_CFG80211_DEBUGFS) += debugfs.o 188c2ecf20Sopenharmony_cicfg80211-$(CONFIG_CFG80211_WEXT) += wext-compat.o wext-sme.o 198c2ecf20Sopenharmony_ci 208c2ecf20Sopenharmony_ciCFLAGS_trace.o := -I$(src) 218c2ecf20Sopenharmony_ci 228c2ecf20Sopenharmony_cicfg80211-$(CONFIG_CFG80211_USE_KERNEL_REGDB_KEYS) += shipped-certs.o 238c2ecf20Sopenharmony_ciifneq ($(CONFIG_CFG80211_EXTRA_REGDB_KEYDIR),) 248c2ecf20Sopenharmony_cicfg80211-y += extra-certs.o 258c2ecf20Sopenharmony_ciendif 268c2ecf20Sopenharmony_ci 278c2ecf20Sopenharmony_ci$(obj)/shipped-certs.c: $(wildcard $(srctree)/$(src)/certs/*.hex) 288c2ecf20Sopenharmony_ci @$(kecho) " GEN $@" 298c2ecf20Sopenharmony_ci @(echo '#include "reg.h"'; \ 308c2ecf20Sopenharmony_ci echo 'const u8 shipped_regdb_certs[] = {'; \ 318c2ecf20Sopenharmony_ci echo | cat - $^ ; \ 328c2ecf20Sopenharmony_ci echo '};'; \ 338c2ecf20Sopenharmony_ci echo 'unsigned int shipped_regdb_certs_len = sizeof(shipped_regdb_certs);'; \ 348c2ecf20Sopenharmony_ci ) > $@ 358c2ecf20Sopenharmony_ci 368c2ecf20Sopenharmony_ci$(obj)/extra-certs.c: $(CONFIG_CFG80211_EXTRA_REGDB_KEYDIR:"%"=%) \ 378c2ecf20Sopenharmony_ci $(wildcard $(CONFIG_CFG80211_EXTRA_REGDB_KEYDIR:"%"=%)/*.x509) 388c2ecf20Sopenharmony_ci @$(kecho) " GEN $@" 398c2ecf20Sopenharmony_ci @(set -e; \ 408c2ecf20Sopenharmony_ci allf=""; \ 418c2ecf20Sopenharmony_ci for f in $^ ; do \ 428c2ecf20Sopenharmony_ci test -f $$f || continue;\ 438c2ecf20Sopenharmony_ci # similar to hexdump -v -e '1/1 "0x%.2x," "\n"' \ 448c2ecf20Sopenharmony_ci thisf=$$(od -An -v -tx1 < $$f | \ 458c2ecf20Sopenharmony_ci sed -e 's/ /\n/g' | \ 468c2ecf20Sopenharmony_ci sed -e 's/^[0-9a-f]\+$$/\0/;t;d' | \ 478c2ecf20Sopenharmony_ci sed -e 's/^/0x/;s/$$/,/'); \ 488c2ecf20Sopenharmony_ci # file should not be empty - maybe command substitution failed? \ 498c2ecf20Sopenharmony_ci test ! -z "$$thisf";\ 508c2ecf20Sopenharmony_ci allf=$$allf$$thisf;\ 518c2ecf20Sopenharmony_ci done; \ 528c2ecf20Sopenharmony_ci ( \ 538c2ecf20Sopenharmony_ci echo '#include "reg.h"'; \ 548c2ecf20Sopenharmony_ci echo 'const u8 extra_regdb_certs[] = {'; \ 558c2ecf20Sopenharmony_ci echo "$$allf"; \ 568c2ecf20Sopenharmony_ci echo '};'; \ 578c2ecf20Sopenharmony_ci echo 'unsigned int extra_regdb_certs_len = sizeof(extra_regdb_certs);'; \ 588c2ecf20Sopenharmony_ci ) > $@) 598c2ecf20Sopenharmony_ci 608c2ecf20Sopenharmony_ciclean-files += shipped-certs.c extra-certs.c 61