Advertisement
dheadshot

Modified ReSpeaker Makefile

Aug 24th, 2020
3,149
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Make 1.09 KB | None | 0 0
  1. #
  2. # Peter Yang <turmary@126.com>
  3. # Copyright (c) 2019 Seeed Studio
  4. #
  5. # MIT License
  6. #
  7.  
  8. uname_r=$(shell uname -r)
  9.  
  10. ifneq ($(KERNELVER),)
  11. uname_r=$(KERNELVER)
  12. endif
  13.  
  14. # If KERNELRELEASE is defined, we've been invoked from the
  15. # kernel build system and can use its language
  16. ifneq ($(KERNELRELEASE),)
  17. # $(warning KERNELVERSION=$(KERNELVERSION))
  18.  
  19. snd-soc-wm8960-objs := wm8960.o
  20. snd-soc-ac108-objs := ac108.o ac101.o
  21. snd-soc-seeed-voicecard-objs := seeed-voicecard.o
  22.  
  23.  
  24. obj-m += snd-soc-wm8960.o
  25. obj-m += snd-soc-ac108.o
  26. obj-m += snd-soc-seeed-voicecard.o
  27.  
  28. ifdef DEBUG
  29. ifneq ($(DEBUG),0)
  30.     ccflags-y += -DDEBUG -DAC101_DEBG
  31. endif
  32. endif
  33.  
  34.  
  35.  
  36. else
  37.  
  38. DEST := /lib/modules/$(uname_r)/kernel
  39.  
  40. all:
  41.     echo $(uname_r), $(KERNELVERSION)
  42.     make -C /lib/modules/$(uname_r)/build M=$(PWD) modules
  43.  
  44. clean:
  45.     make -C /lib/modules/$(uname_r)/build M=$(PWD) clean
  46.  
  47. install:
  48.     sudo cp snd-soc-ac108.ko ${DEST}/sound/soc/codecs/
  49.     sudo cp snd-soc-wm8960.ko ${DEST}/sound/soc/codecs/
  50.     sudo cp snd-soc-seeed-voicecard.ko ${DEST}/sound/soc/bcm/
  51.     sudo depmod -a
  52.  
  53.  
  54. .PHONY: all clean install
  55.  
  56. endif
  57.  
  58.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement