Advertisement
Phoenix1355

Untitled

Sep 21st, 2018
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Make 0.92 KB | None | 0 0
  1. # -------------------------------------- #
  2. # Makefile
  3. #
  4. # @author   Christian H. Bohlbro
  5. #           Nikolaj André Jensen
  6. #           Mikkel O. Laursen
  7. # @date     2018.09.14
  8. # @version  0.1
  9. # -------------------------------------- #
  10.  
  11. # Check if this is being included from the kernel Makefile.
  12. ifeq ($(KERNELRELEASE),)
  13. # If KERNELDIR is not set
  14. ifeq ($(KERNELDIR),)
  15.     # Assign KERNELDIR to default path
  16.     KERNELDIR = ~/sources/rpi-4.14
  17. endif
  18. # If CCPREFIX is not set
  19. ifeq ($(CCPREFIX),)
  20.     CCPREFIX = arm-poky-linux-gnueabi-
  21. endif
  22.   # Pass the curretn directory to sub-makes as argument
  23.   PWD := $(shell pwd)
  24.  
  25. modules:
  26.     $(MAKE) ARCH=arm CROSS_COMPILE=$(CCPREFIX) -C $(KERNELDIR) M=$(PWD) modules
  27.  
  28. clean:
  29.     rm -rf *.o *~ core .depend .*.cmd *.ko *.mod.c .tmp_versions modules.order Module.symvers
  30.  
  31. .PHONY: modules clean
  32.  
  33. else
  34.     ccflags-y := -DDEBUG -g -std=gnu99 -Wno-declaration-after-statement -Werror
  35.     obj-m := sw2.o
  36. endif
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement