Makefile 554 B

1234567891011121314151617181920212223
  1. # If KERNELRELEASE is defined, we've been invoked from the
  2. # kernel build system and can use its language.
  3. ifneq ($(KERNELRELEASE),)
  4. obj-m := graphene-ipc.o
  5. # Otherwise we were called directly from the command
  6. # line; invoke the kernel build system.
  7. else
  8. KERNELDIR ?= /lib/modules/$(shell uname -r)/build
  9. PWD := $(shell pwd)
  10. .PHONY: default
  11. default:
  12. $(MAKE) -C $(KERNELDIR) M=$(PWD) modules
  13. graphene-ipc.i: graphene-ipc.c
  14. $(MAKE) -C $(KERNELDIR) M=$(PWD) $@
  15. .PHONY: clean
  16. clean:
  17. $(MAKE) -C $(KERNELDIR) M=$(PWD) clean
  18. rm -rf *.o.ur-safe
  19. endif