aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorkartofen <mladenovnasko0@gmail.com>2023-04-28 00:54:59 +0300
committerkartofen <mladenovnasko0@gmail.com>2023-04-28 00:54:59 +0300
commit7395f6ec5385cd4895755c0c48e878a01214ef1c (patch)
tree179d108430d6a6e580ab846f0ea0ea2af26921ae /Makefile
parent2c0f30c29b4b70a45ba01a0c32ae31ac7f75625b (diff)
added testing framework
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile11
1 files changed, 9 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index a4a8911..4278311 100644
--- a/Makefile
+++ b/Makefile
@@ -11,15 +11,16 @@ OBJS = $(SRCS:$(SRCD)/$(SUBD)/%.c=$(OBJD)/$(SUBD)/%.o)
DAEMON_TARGET_NAME := daemon
CLIENT_TARGET_NAME := client
MODULE_TARGET_NAME := keylogger.ko
+TESTS_TARGET_NAME := tests
KERNEL_NAME := kernel-$(shell uname -r)
INITFS_NAME := initramfs.img
export
-all: daemon client module
+all: daemon client module tests vm
-daemon client module:
+daemon client module tests:
$(MAKE) $(BIND)/$($(shell echo $@ | tr '[:lower:]' '[:upper:]')_TARGET_NAME) SUBD=$@
clean:
@@ -43,6 +44,12 @@ $(BIND)/%.ko: $(SRCS)
mv $(SRCD)/$(SUBD)/*.ko $@
make -C $(SRCD)/$(SUBD) clean
+# copy the test files
+$(BIND)/tests: $(SRCS)
+ mkdir -p $(BIND)
+ cp -r $(SRCD)/$(SUBD) $(BIND)
+
+
# VM things
vm: vm.sh $(BIND)/$(INITFS_NAME) $(BIND)/$(KERNEL_NAME)
./vm.sh run