Makefile 581 B

12345678910111213141516171819202122232425
  1. ifneq ($(KERNELRELEASE),)
  2. graphene-sgx-y := \
  3. gsgx_ioctl_1_6.o \
  4. gsgx_ioctl_1_7.o \
  5. gsgx_fsgsbase.o \
  6. gsgx_main.o
  7. obj-m += graphene-sgx.o
  8. else
  9. KDIR := /lib/modules/$(shell uname -r)/build
  10. PWD := $(shell pwd)
  11. default: isgx_version.h linux-sgx-driver
  12. $(MAKE) -C $(KDIR) SUBDIRS=$(PWD) CFLAGS_MODULE="-DDEBUG -g -O0" modules
  13. .INTERMEDIATE: link-sgx-driver
  14. link-sgx-driver:
  15. @./link-intel-driver.py
  16. isgx_version.h linux-sgx-driver: link-sgx-driver
  17. endif
  18. clean:
  19. rm -vrf linux-sgx-driver isgx_version.h
  20. rm -vrf *.o *.ko *.order *.symvers *.mod.c .tmp_versions .*o.cmd