From 0a245e329a9af7df792981f1f35a70bbfaded8b9 Mon Sep 17 00:00:00 2001 From: jvech Date: Sun, 1 Jan 2023 20:18:25 -0500 Subject: feat: cli support and install rule added Now it is possible to use custom shaders and install the program on the system --- Makefile | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'Makefile') diff --git a/Makefile b/Makefile index a676b86..eec9109 100644 --- a/Makefile +++ b/Makefile @@ -7,6 +7,10 @@ SRCDIR = src OBJS = $(addprefix objs/,main.o shader.o linear.o obj.o) BIN = mverse +SHADERS_DIR = /usr/share/${BIN} +VERTEX = shaders/dummy.vsh +FRAGMENT = shaders/dummy.fsh + all: build $(OBJS): | $(OBJDIR) @@ -23,5 +27,19 @@ build: $(OBJS) run: ./${BIN} +install: build + install -Dm 644 ${VERTEX} -t ${SHADERS_DIR} + install -Dm 644 ${FRAGMENT} -t ${SHADERS_DIR} + install -D ${BIN} -t /usr/bin + @echo "========================================================" + @echo "To use the ${BIN} set the environment variables:" + @echo " MVERSE_VERTEX=${SHADERS_DIR}/$(notdir ${VERTEX})" + @echo " MVERSE_FRAGMENT=${SHADERS_DIR}/$(notdir ${FRAGMENT})" + @echo "========================================================" + +uninstall: + rm -f /usr/bin/${BIN} + rm -rvf ${SHADERS_DIR} + clean: @rm $(OBJS) -v -- cgit v1.2.3-70-g09d2