Makefile 1.0 KB

1234567891011121314151617181920212223242526272829
  1. # Makefile for use with Android's kernel/build system
  2. KBUILD_OPTIONS += CAMERA_KERNEL_ROOT=$(KERNEL_SRC)/$(M)
  3. KBUILD_OPTIONS += KERNEL_ROOT=$(KERNEL_SRC)
  4. KBUILD_OPTIONS += MODNAME=camera
  5. KBUILD_OPTIONS += BOARD_PLATFORM=pineapple
  6. KBUILD_OPTIONS += KBUILD_EXTRA_SYMBOLS=$(OUT_DIR)/../sm8650-modules/qcom/opensource/mmrm-driver/Module.symvers
  7. all: modules
  8. CAMERA_COMPILE_TIME = $(shell date)
  9. CAMERA_COMPILE_BY = $(shell whoami | sed 's/\\/\\\\/')
  10. CAMERA_COMPILE_HOST = $(shell uname -n)
  11. cam_generated_h: $(shell find . -iname "*.c") $(shell find . -iname "*.h") $(shell find . -iname "*.mk")
  12. echo '#define CAMERA_COMPILE_TIME "$(CAMERA_COMPILE_TIME)"' > cam_generated_h
  13. echo '#define CAMERA_COMPILE_BY "$(CAMERA_COMPILE_BY)"' >> cam_generated_h
  14. echo '#define CAMERA_COMPILE_HOST "$(CAMERA_COMPILE_HOST)"' >> cam_generated_h
  15. modules: cam_generated_h
  16. modules dtbs:
  17. $(MAKE) -C $(KERNEL_SRC) M=$(M) modules $(KBUILD_OPTIONS)
  18. modules_install:
  19. $(MAKE) M=$(M) -C $(KERNEL_SRC) modules_install
  20. clean:
  21. $(MAKE) -C $(KERNEL_SRC) M=$(M) clean