Makefile 812 B

123456789101112131415161718192021222324
  1. # if building the kernel module in-tree, these config options
  2. # should be put into a Kconfig file.
  3. # if building out-of-tree, defining them here is as good as any.
  4. # CONFIG_VHA_NEXEF_PLAT: build the VHA 3NX-F platform driver
  5. export CONFIG_VHA_NEXEF_PLAT := m
  6. ifeq ($(CONFIG_NEXEF_NNPU_INCLUDE),)
  7. $(error CONFIG_NEXEF_NNPU_INCLUDE not set: You must provide the path to the NNPU tc_drv.h file in)
  8. endif
  9. ccflags-y += -I$(CONFIG_NEXEF_NNPU_INCLUDE)
  10. ccflags-y += -I$(src)/../include
  11. ccflags-y += -I$(src)/
  12. ccflags-y += -Wall -g
  13. # This should not be needed, but on some platform (especially old kernel)
  14. # the module can't be build without it.
  15. ccflags-y += -DRETPOLINE -Wfatal-errors
  16. # NOT WORKING FOR NOW, DO NOT ENABLE
  17. #ccflags-y += -DCONFIG_SET_FPGA_CLOCK=y
  18. obj-$(CONFIG_VHA_NEXEF_PLAT) += nexef_plat.o