refactor packaging

This commit is contained in:
Crispy 2023-05-04 22:27:47 +02:00
parent 22496fcc35
commit 2c0386b141
5 changed files with 11 additions and 5 deletions

1
.gitignore vendored
View file

@ -1,3 +1,4 @@
sinpin_vr sinpin_vr
.vscode/ .vscode/
*.zip *.zip
*.tar.xz

View file

@ -1,17 +1,22 @@
VERSION=v0.2.2 VERSION=v0.2.3
CXX := g++ CXX := g++
# CXX := clang++ # CXX := clang++
CPPFLAGS := -g -Wall -std=c++17 CPPFLAGS := -g -Wall -std=c++17
LFLAGS := -lX11 -lXrandr -lXtst -lglfw -lGL LFLAGS := -lX11 -lXrandr -lXtst -lglfw -lGL
OVR := -Lopenvr -lopenvr_api OVR := -Llib -lopenvr_api
TARGET := ./sinpin_vr TARGET := ./sinpin_vr
build: build:
$(CXX) src/*.cpp $(CPPFLAGS) $(LFLAGS) -Wl,-rpath,'$$ORIGIN/openvr' $(OVR) -o $(TARGET) $(CXX) src/*.cpp $(CPPFLAGS) $(LFLAGS) -Wl,-rpath,'$$ORIGIN/lib' $(OVR) -o $(TARGET)
release: build release: build
zip -r sinpin_vr-$(VERSION).zip sinpin_vr bindings openvr/libopenvr_api.so mkdir -p sinpin-vr/lib
cp lib/libopenvr_api.so sinpin-vr/lib
cp -r bindings sinpin-vr
cp sinpin_vr sinpin-vr
tar -caf sinpin-vr-$(VERSION).tar.xz sinpin-vr
rm -rf sinpin-vr
run: build run: build
$(TARGET) $(TARGET)

View file

@ -1,6 +1,6 @@
#pragma once #pragma once
#include "../openvr/openvr.h" #include "../lib/openvr.h"
#include <glm/glm.hpp> #include <glm/glm.hpp>
typedef vr::TrackedDeviceIndex_t TrackerID; typedef vr::TrackedDeviceIndex_t TrackerID;