Makefile 436 B

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