obj-m += wendy.o
OUT_DIR := build

.PHONY: all kern_mod install rm clean reader writer tester dirprepare

all: kern_mod reader writer tester

kern_mod:
	make -C wendy_mod

install: kern_mod
	make -C wendy_mod install

rm:
	make -C wendy_mod uninstall

reader: dirprepare
	gcc pipe_read.c -o $(OUT_DIR)/pread

writer: dirprepare
	gcc pipe_write.c -o $(OUT_DIR)/pwrite

tester: dirprepare
	g++ --std=c++20 pipe_tester.cpp -o $(OUT_DIR)/tester

dirprepare:
	mkdir -p $(OUT_DIR)

clean:
	make -C wendy_mod clean
	rm -rf $(OUT_DIR)

