summaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rwxr-xr-xMakefile8
1 files changed, 5 insertions, 3 deletions
diff --git a/Makefile b/Makefile
index 61df48c..ceb5477 100755
--- a/Makefile
+++ b/Makefile
@@ -4,6 +4,8 @@ PWD := $(shell pwd)
TARGETS = build test/eviction test/access test/kvm test/sev test/sev-es test/sevstep
TARGETS += test/aes-detect_guest test/aes-detect_host
+CFLAGS = -I . -I test -Wunused-variable -Wunknown-pragmas
+
all: $(TARGETS)
clean:
@@ -13,7 +15,7 @@ $(LINUX)/arch/x86/kvm/cachepc:
ln -sf $(PWD)/cachepc $@
build: $(LINUX)/arch/x86/kvm/cachepc
- $(MAKE) -C $(LINUX) -j6 M=arch/x86/kvm
+ $(MAKE) -C $(LINUX) -j6 M=arch/x86/kvm M=crypto
load:
sudo rmmod kvm_amd || true
@@ -22,10 +24,10 @@ load:
sudo insmod $(LINUX)/arch/x86/kvm/kvm-amd.ko
test/aes-detect_%: test/aes-detect_%.c test/aes-detect.c
- clang -o $@ $< -I . -I test/libkcapi/lib -L test/libkcapi/.libs -lkcapi -static
+ clang -o $@ $< $(CFLAGS) -I test/libkcapi/lib -L test/libkcapi/.libs -lkcapi -static
test/%: test/%.c cachepc/uapi.h
- clang -o $@ $< -fsanitize=address -I . -I test -Wunused-variable
+ clang -o $@ $< $(CFLAGS) -fsanitize=address
update:
git -C $(LINUX) diff 0aaa1e599bee256b3b15643bbb95e80ce7aa9be5 -G. > patch.diff