From 71571e3a00d57279f57bbcc979aa821c8f1e65be Mon Sep 17 00:00:00 2001 From: cinnaboot Date: Mon, 22 Nov 2021 14:22:02 -0500 Subject: [PATCH] update makefile to put binary in "bin/" --- Makefile | 4 +++- src/main.cpp | 4 ++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index a3b74f9..efa10f0 100644 --- a/Makefile +++ b/Makefile @@ -5,7 +5,8 @@ CXXFLAGS = -std=c++11 -g -ggdb3 -Wall -Isrc/ -I/usr/include/SDL2 LDFLAGS = -lSDL2 -lGLEW -lGL OBJDIR = build SRCDIR = src -BIN = shader_testing +BINDIR = bin +BIN = $(BINDIR)/shader_testing SOURCES = $(wildcard $(SRCDIR)/*.cpp) @@ -26,6 +27,7 @@ $(NDBG_OBJS): $(OBJDIR)/%.o : $(SRCDIR)/%.cc $(CXX) -std=c++11 -Wall -Isrc/ -c $< -o $@ $(BIN): $(OBJECTS) $(NDBG_OBJS) + mkdir -p $(BINDIR) $(CXX) -o $@ $(LDFLAGS) $^ clean: diff --git a/src/main.cpp b/src/main.cpp index 89f89e4..6e2dfae 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -577,8 +577,8 @@ main() if (!addShaderProgram(arena, rs->gl_ctx, - "data/shader.vert", - "data/shader.frag", + "../data/shader.vert", + "../data/shader.frag", "default")) { std::cout << "error loading shader program\n";