Makefile 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. ##
  2. # Copyright (C) 2021 Alibaba Group Holding Limited
  3. #
  4. # This program is free software; you can redistribute it and/or modify
  5. # it under the terms of the GNU General Public License version 2 as
  6. # published by the Free Software Foundation.
  7. ##
  8. TARGET = bm_csi
  9. KBUILD_EXTRA_SYMBOLS += $(shell pwd)/../visys/Module.symvers
  10. export KBUILD_EXTRA_SYMBOLS
  11. obj-m +=$(TARGET).o
  12. ##$(TARGET)-objs += bm_csi_dphy.o
  13. $(TARGET)-objs += bm_csi_driver.o
  14. $(TARGET)-objs += bm_csi_hw.o
  15. $(TARGET)-objs += dw-csi-plat.o
  16. $(TARGET)-objs += dw-csi-sysfs.o
  17. $(TARGET)-objs += dw-mipi-csi.o
  18. $(TARGET)-objs += dw-dphy-plat.o
  19. $(TARGET)-objs += dw-dphy-rx.o
  20. $(TARGET)-objs += dw-dphy-sysfs.o
  21. EXTRA_CFLAGS += -I$(PWD)/./
  22. EXTRA_CFLAGS += -I$(PWD)/../common
  23. #DEFS = -DCONFIG_DWC_MIPI_TC_DPHY_GEN3
  24. ifeq ($(BUILD_TYPE),DEBUG)
  25. EXTRA_CFLAGS += -DDEBUG
  26. endif
  27. EXTRA_CFLAGS += $(DEFS)
  28. PWD :=$(shell pwd)
  29. all:
  30. make -C $(KERNEL) M=$(PWD) modules
  31. modules_install:
  32. make -C $(KERNEL_SRC) M=$(SRC) modules_install
  33. clean:
  34. rm -rf $($(TARGET)-objs)
  35. make -C $(KERNEL) M=`pwd` clean