Makefile 1.1 KB

1234567891011121314151617181920212223242526272829303132
  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_EXTRA_SYMBOLS := \
  7. $(OUT_DIR)/../sm8650-modules/qcom/opensource/mmrm-driver/Module.symvers \
  8. $(OUT_DIR)/../sm8650-modules/qcom/opensource/securemsm-kernel/Module.symvers
  9. all: modules
  10. CAMERA_COMPILE_TIME = $(shell date)
  11. CAMERA_COMPILE_BY = $(shell whoami | sed 's/\\/\\\\/')
  12. CAMERA_COMPILE_HOST = $(shell uname -n)
  13. cam_generated_h: $(shell find . -iname "*.c") $(shell find . -iname "*.h") $(shell find . -iname "*.mk")
  14. echo '#define CAMERA_COMPILE_TIME "$(CAMERA_COMPILE_TIME)"' > cam_generated_h
  15. echo '#define CAMERA_COMPILE_BY "$(CAMERA_COMPILE_BY)"' >> cam_generated_h
  16. echo '#define CAMERA_COMPILE_HOST "$(CAMERA_COMPILE_HOST)"' >> cam_generated_h
  17. modules: cam_generated_h
  18. modules dtbs:
  19. $(MAKE) -C $(KERNEL_SRC) M=$(M) modules $(KBUILD_OPTIONS)
  20. modules_install:
  21. $(MAKE) M=$(M) -C $(KERNEL_SRC) modules_install
  22. clean:
  23. $(MAKE) -C $(KERNEL_SRC) M=$(M) clean