Makefile 1.4 KB

123456789101112131415161718192021222324252627282930313233343536
  1. #
  2. # Makefile for dmabuf exporter implementations
  3. #
  4. ifdef CONFIG_ION
  5. obj-$(CONFIG_VHA) += dmabuf_exporter_ion.o
  6. dmabuf_exporter_ion-objs := de_common.o de_heap_ion.o
  7. dmabuf_exporter_ion-objs += de_heap_ion_example.o
  8. # detect ION header in Linux Kernel tree
  9. # srctree is needed here for kernels built with separate object dir (O=)
  10. ifneq ($(wildcard $(srctree)/include/linux/ion.h),)
  11. # some kernel trees have this non-standard path
  12. ccflags-y += -DIMG_KERNEL_ION_HEADER="<linux/ion.h>"
  13. else
  14. # this is the default location
  15. # the vanilla linux kernel does not export ion.h to include/linux
  16. # adding -I to the entire directory would expose many internal header files
  17. # so we use this somewhat ugly hack to use only this one with full path
  18. # realpath is needed to expand full path, some kernel trees set srctree to .
  19. ccflags-y += -DIMG_KERNEL_ION_HEADER="<$(realpath $(srctree))/drivers/staging/android/ion/ion.h>"
  20. ccflags-y += -DIMG_KERNEL_ION_PRIV_HEADER="<$(realpath $(srctree))/drivers/staging/android/ion/ion_priv.h>"
  21. endif
  22. endif
  23. ifdef CONFIG_DMA_SHARED_BUFFER
  24. obj-$(CONFIG_VHA) += dmabuf_exporter_coherent.o
  25. dmabuf_exporter_coherent-objs := de_common.o de_heap_coherent.o
  26. obj-$(CONFIG_VHA) += dmabuf_exporter_noncoherent.o
  27. dmabuf_exporter_noncoherent-objs := de_common.o de_heap_noncoherent.o
  28. endif
  29. ifdef CONFIG_GENERIC_ALLOCATOR
  30. obj-$(CONFIG_VHA) += dmabuf_exporter_carveout.o
  31. dmabuf_exporter_carveout-objs := de_common.o de_heap_carveout.o
  32. endif