fix: Make Crash When obj & bin Folders Not Exist
This commit is contained in:
parent
dd504b053b
commit
f1a02b6868
7
makefile
7
makefile
|
@ -1,8 +1,11 @@
|
||||||
includeF = -Iinclude
|
includeF = -Iinclude
|
||||||
libraryF = -Llib -lSDL2
|
libraryF = -Llib -lSDL2
|
||||||
|
|
||||||
bin/main.exe: src/main.cpp obj/GameOfLife.o
|
bin/main: pre-build src/main.cpp obj/GameOfLife.o
|
||||||
g++ -std=c++17 -o bin/main.exe src/main.cpp obj/GameOfLife.o $(includeF) $(libraryF)
|
g++ -std=c++17 -o bin/main src/main.cpp obj/GameOfLife.o $(includeF) $(libraryF)
|
||||||
|
|
||||||
obj/GameOfLife.o: src/GameOfLife.cpp
|
obj/GameOfLife.o: src/GameOfLife.cpp
|
||||||
g++ -std=c++17 -c -o obj/GameOfLife.o src/GameOfLife.cpp $(includeF) $(libraryF)
|
g++ -std=c++17 -c -o obj/GameOfLife.o src/GameOfLife.cpp $(includeF) $(libraryF)
|
||||||
|
|
||||||
|
pre-build:
|
||||||
|
mkdir -p obj && mkdir -p bin
|
||||||
|
|
Loading…
Reference in New Issue