WaveDecDriver_buildroot.mak 931 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. # Comment/uncomment the following line to disable/enable debugging
  2. #DEBUG = y
  3. # Add your debugging flag (or not) to CFLAGS
  4. ifeq ($(DEBUG),y)
  5. DEBFLAGS = -O -g # "-O" is needed to expand inlines
  6. else
  7. DEBFLAGS = -O2
  8. endif
  9. export ARCH=riscv
  10. export SUBARCH=riscv
  11. export CROSS_COMPILE=riscv64-buildroot-linux-gnu-
  12. DRV_PATH := $(shell pwd)/vdi/linux/driver
  13. EXTRA_CFLAGS += $(DEBFLAGS) -I$(LDDINCDIR) -Wall
  14. ifneq ($(KERNELRELEASE),)
  15. # call from kernel build system
  16. obj-m := vdec.o
  17. else
  18. default:
  19. $(MAKE) -C $(KERNELDIR) M=$(DRV_PATH) LDDINCDIR=$(DRV_PATH)/../include modules
  20. endif
  21. clean:
  22. rm -rf $(DRV_PATH)/*.o $(DRV_PATH)/*~ $(DRV_PATH)/core $(DRV_PATH)/.depend $(DRV_PATH)/.*.cmd $(DRV_PATH)/*.ko $(DRV_PATH)/*.mod.c $(DRV_PATH)/modules.order $(DRV_PATH)/.tmp_versions $(DRV_PATH)/*.dwo $(DRV_PATH)/.*.dwo
  23. depend .depend dep:
  24. $(CC) $(CFLAGS) -M *.c > .depend
  25. ifeq (.depend,$(wildcard .depend))
  26. include .depend
  27. endif