fix: Make Crash When obj & bin Folders Not Exist

This commit is contained in:
Syntriax 2023-07-05 15:58:48 +03:00
parent dd504b053b
commit f1a02b6868
1 changed files with 5 additions and 2 deletions

View File

@ -1,8 +1,11 @@
includeF = -Iinclude
libraryF = -Llib -lSDL2
bin/main.exe: src/main.cpp obj/GameOfLife.o
g++ -std=c++17 -o bin/main.exe src/main.cpp obj/GameOfLife.o $(includeF) $(libraryF)
bin/main: pre-build src/main.cpp obj/GameOfLife.o
g++ -std=c++17 -o bin/main src/main.cpp obj/GameOfLife.o $(includeF) $(libraryF)
obj/GameOfLife.o: src/GameOfLife.cpp
g++ -std=c++17 -c -o obj/GameOfLife.o src/GameOfLife.cpp $(includeF) $(libraryF)
pre-build:
mkdir -p obj && mkdir -p bin