aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile18
1 files changed, 18 insertions, 0 deletions
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
Feel free to download, copy and edit any repo