From 22496fcc35642073886bbd85677d8478c5e401ff Mon Sep 17 00:00:00 2001 From: CrispyPin Date: Wed, 3 May 2023 22:09:59 +0200 Subject: [PATCH] link executable properly so it can be started from other directories --- Makefile | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/Makefile b/Makefile index dcb1dd9..256e98a 100644 --- a/Makefile +++ b/Makefile @@ -1,18 +1,18 @@ VERSION=v0.2.2 -CC := g++ -# CC := clang++ + +CXX := g++ +# CXX := clang++ +CPPFLAGS := -g -Wall -std=c++17 LFLAGS := -lX11 -lXrandr -lXtst -lglfw -lGL -LIBS := openvr/libopenvr_api.so -SRC := src/*.cpp -OUT := ./sinpin_vr -CPPFLAGS := -Wall -std=c++17 $(LFLAGS) $(LIBS) $(SRC) -o $(OUT) +OVR := -Lopenvr -lopenvr_api +TARGET := ./sinpin_vr build: - $(CC) -g $(CPPFLAGS) + $(CXX) src/*.cpp $(CPPFLAGS) $(LFLAGS) -Wl,-rpath,'$$ORIGIN/openvr' $(OVR) -o $(TARGET) release: build zip -r sinpin_vr-$(VERSION).zip sinpin_vr bindings openvr/libopenvr_api.so run: build - $(OUT) + $(TARGET)