Makefile 679 B

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