fixed makefile

This commit is contained in:
VisualGMQ 2022-01-30 21:35:04 +08:00
parent 96bb3c3611
commit cbb7200289
2 changed files with 10 additions and 6 deletions

View File

@ -1,18 +1,22 @@
GLFW_DEP = -L./libs/glfw/ -lglfw
GLAD_DEP = -I./libs/glad/include
STB_IMAGE_DEP = -I./libs/stb_image
SRC = $(wildcard ./*.cpp) ./libs/glad/src/gl.c ./libs/stb_image/stbi_image.cpp
SRC = $(wildcard ./*.cpp) glad.o # ./libs/stb_image/stbi_image.cpp
CPP_FLAGS = -std=c++17
game.out: $(SRC)
$(CXX) $^ ${GLFW_DEP} -o $@ ${GLAD_DEP} ${STB_IMAGE_DEP} ${CPP_FLAGS}
game.out: ${SRC}
$(CXX) $^ ${GLFW_DEP} -o $@ ${GLAD_DEP} ${CPP_FLAGS} #${STB_IMAGE_DEP}
glad.o: ./libs/glad/src/gl.c
$(CC) $^ -c -o $@ ${GLAD_DEP}
.PHONY:clean pack
clean:
-rm -rf output
-rm *.o
-rm *.out
pack:
-rm -r output
-rm -rf output
-mkdir output
-mv game.out output/
-cp libs/glfw/libglfw.3.dylib output/

View File

@ -2,7 +2,7 @@
#include "glad/gl.h"
#include "GLFW/glfw3.h"
#include "stb_image.h"
// #include "stb_image.h"
#include <string>
#include <exception>
#include <vector>