Makefile 696 B

1234567891011121314151617181920212223242526272829303132
  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_isp
  9. obj-m +=$(TARGET).o
  10. $(TARGET)-objs += bm_isp_driver.o
  11. EXTRA_CFLAGS += -I$(PWD)/./
  12. EXTRA_CFLAGS += -I$(PWD)/../common
  13. KBUILD_CFLAGS += -O0
  14. ifeq ($(BUILD_TYPE),DEBUG)
  15. EXTRA_CFLAGS += -DDEBUG
  16. endif
  17. PWD :=$(shell pwd)
  18. all:
  19. make -C $(KERNEL) M=$(PWD) modules
  20. modules_install:
  21. make -C $(KERNEL_SRC) M=$(SRC) modules_install
  22. clean:
  23. rm -rf $($(TARGET)-objs)
  24. if [ -d "$(KERNEL)" ]; then \
  25. make -C $(KERNEL) M=`pwd` clean; \
  26. fi