xref: /linux/net/wireless/Makefile (revision b1992c37)
1b2441318SGreg Kroah-Hartman# SPDX-License-Identifier: GPL-2.0
2704232c2SJohannes Bergobj-$(CONFIG_CFG80211) += cfg80211.o
37e272fcfSJohn W. Linvilleobj-$(CONFIG_LIB80211) += lib80211.o
4274bfb8dSJohn W. Linvilleobj-$(CONFIG_LIB80211_CRYPT_WEP) += lib80211_crypt_wep.o
5274bfb8dSJohn W. Linvilleobj-$(CONFIG_LIB80211_CRYPT_CCMP) += lib80211_crypt_ccmp.o
6274bfb8dSJohn W. Linvilleobj-$(CONFIG_LIB80211_CRYPT_TKIP) += lib80211_crypt_tkip.o
7730eeb17SJohannes Bergobj-y += tests/
8704232c2SJohannes Berg
93d23e349SJohannes Bergobj-$(CONFIG_WEXT_CORE) += wext-core.o
103d23e349SJohannes Bergobj-$(CONFIG_WEXT_PROC) += wext-proc.o
113d23e349SJohannes Bergobj-$(CONFIG_WEXT_SPY) += wext-spy.o
123d23e349SJohannes Bergobj-$(CONFIG_WEXT_PRIV) += wext-priv.o
133d23e349SJohannes Berg
1459bbb6f7SJohannes Bergcfg80211-y += core.o sysfs.o radiotap.o util.o reg.o scan.o nl80211.o
156e0bd6c3SRostislav Lisovycfg80211-y += mlme.o ibss.o sme.o chan.o ethtool.o mesh.o ap.o trace.o ocb.o
169bb7e0f2SJohannes Bergcfg80211-y += pmsr.o
17e691ac2fSRafał Miłeckicfg80211-$(CONFIG_OF) += of.o
181ac61302SLuis R. Rodriguezcfg80211-$(CONFIG_CFG80211_DEBUGFS) += debugfs.o
193d23e349SJohannes Bergcfg80211-$(CONFIG_CFG80211_WEXT) += wext-compat.o wext-sme.o
20b1439236SJohannes Berg
2114e8a3c4SBeni LevCFLAGS_trace.o := -I$(src)
2290a53e44SJohannes Berg
2390a53e44SJohannes Bergcfg80211-$(CONFIG_CFG80211_USE_KERNEL_REGDB_KEYS) += shipped-certs.o
2490a53e44SJohannes Bergifneq ($(CONFIG_CFG80211_EXTRA_REGDB_KEYDIR),)
2590a53e44SJohannes Bergcfg80211-y += extra-certs.o
2690a53e44SJohannes Bergendif
2790a53e44SJohannes Berg
28*b1992c37SMasahiro Yamada$(obj)/shipped-certs.c: $(sort $(wildcard $(src)/certs/*.hex))
291188e2a9SArnd Bergmann	@$(kecho) "  GEN     $@"
303df15f34SJohannes Berg	$(Q)(echo '#include "reg.h"'; \
31715a1233SJohannes Berg	  echo 'const u8 shipped_regdb_certs[] = {'; \
32b5642479SJohannes Berg	  echo | cat - $^ ; \
33715a1233SJohannes Berg	  echo '};'; \
34715a1233SJohannes Berg	  echo 'unsigned int shipped_regdb_certs_len = sizeof(shipped_regdb_certs);'; \
3504a7279fSJohannes Berg	 ) > $@
3690a53e44SJohannes Berg
37a12f7634SJohannes Berg$(obj)/extra-certs.c: $(CONFIG_CFG80211_EXTRA_REGDB_KEYDIR) \
38bf6b980fSJohannes Berg		      $(sort $(wildcard $(CONFIG_CFG80211_EXTRA_REGDB_KEYDIR)/*.x509))
391188e2a9SArnd Bergmann	@$(kecho) "  GEN     $@"
403df15f34SJohannes Berg	$(Q)(set -e; \
41715a1233SJohannes Berg	  allf=""; \
42715a1233SJohannes Berg	  for f in $^ ; do \
4332b5a2c9SMaxim Mikityanskiy	      test -f $$f || continue;\
44715a1233SJohannes Berg	      # similar to hexdump -v -e '1/1 "0x%.2x," "\n"' \
45715a1233SJohannes Berg	      thisf=$$(od -An -v -tx1 < $$f | \
46715a1233SJohannes Berg	                   sed -e 's/ /\n/g' | \
47715a1233SJohannes Berg	                   sed -e 's/^[0-9a-f]\+$$/\0/;t;d' | \
48715a1233SJohannes Berg	                   sed -e 's/^/0x/;s/$$/,/'); \
49715a1233SJohannes Berg	      # file should not be empty - maybe command substitution failed? \
50715a1233SJohannes Berg	      test ! -z "$$thisf";\
51715a1233SJohannes Berg	      allf=$$allf$$thisf;\
52715a1233SJohannes Berg	  done; \
53715a1233SJohannes Berg	  ( \
54715a1233SJohannes Berg	      echo '#include "reg.h"'; \
55715a1233SJohannes Berg	      echo 'const u8 extra_regdb_certs[] = {'; \
56715a1233SJohannes Berg	      echo "$$allf"; \
57715a1233SJohannes Berg	      echo '};'; \
58715a1233SJohannes Berg	      echo 'unsigned int extra_regdb_certs_len = sizeof(extra_regdb_certs);'; \
595d324073SThierry Reding	  ) > $@)
6004a7279fSJohannes Berg
6104a7279fSJohannes Bergclean-files += shipped-certs.c extra-certs.c
62