summaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorLouis Burda <quent.burda@gmail.com>2022-08-13 16:44:04 +0200
committerLouis Burda <quent.burda@gmail.com>2022-08-13 16:45:08 +0200
commit98babf91dcf166bc7644a3d70a90dac272f12a75 (patch)
tree529acab95367ae6ed35eddf0731ee82f73c94842 /Makefile
parent88d598bc2894c28d8dd9c2259c5c8cbe2ec7ce55 (diff)
downloadcachepc-98babf91dcf166bc7644a3d70a90dac272f12a75.tar.gz
cachepc-98babf91dcf166bc7644a3d70a90dac272f12a75.zip
Reorder repo into module and tests
Diffstat (limited to 'Makefile')
-rwxr-xr-xMakefile14
1 files changed, 4 insertions, 10 deletions
diff --git a/Makefile b/Makefile
index 19c2879..a4a5caf 100755
--- a/Makefile
+++ b/Makefile
@@ -3,7 +3,7 @@ PWD := $(shell pwd)
.PHONY: all reset clean prepare build
-all: reset clean prepare build
+all: reset clean prepare build test/eviction test/access test/kvm
clean:
$(MAKE) -C $(KERNEL_SOURCE) SUBDIRS=arch/x86/kvm clean
@@ -12,7 +12,7 @@ reset:
git -C $(KERNEL_SOURCE) reset --hard
$(KERNEL_SOURCE)/arch/x86/kvm/svm/cachepc:
- ln -s $(PWD)/src $@
+ ln -sf $(PWD)/kmod $@
prepare: $(KERNEL_SOURCE)/arch/x86/kvm/svm/cachepc
git -C $(KERNEL_SOURCE) apply $(PWD)/patch.diff
@@ -27,14 +27,8 @@ load:
sudo insmod $(KERNEL_SOURCE)/arch/x86/kvm/kvm.ko
sudo insmod $(KERNEL_SOURCE)/arch/x86/kvm/kvm-amd.ko
-read: read.c
- $(CC) -o $@ $<
-
-access: access.c src/cachepc_user.h
- $(CC) -o $@ $< -I src
-
-test: load read
- @./read
+test/%: test/%.c kmod/cachepc_user.h
+ $(CC) -o $@ $< -I kmod
update:
git -C $(KERNEL_SOURCE) diff > patch.diff