Makefile 611 B

123456789101112131415161718192021222324252627
  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. .PHONY: default
  12. default: isgx_version.h linux-sgx-driver
  13. $(MAKE) -C $(KDIR) SUBDIRS=$(PWD) CFLAGS_MODULE="-DDEBUG -g -O0" modules
  14. .INTERMEDIATE: link-sgx-driver
  15. link-sgx-driver:
  16. @./link-intel-driver.py
  17. isgx_version.h linux-sgx-driver: link-sgx-driver
  18. endif
  19. .PHONY: clean
  20. clean:
  21. rm -vrf linux-sgx-driver isgx_version.h
  22. rm -vrf *.o *.ko *.order *.symvers *.mod.c .tmp_versions .*o.cmd