From cbb7200289544b58a949086528b63b8b918f81f5 Mon Sep 17 00:00:00 2001 From: VisualGMQ <2142587070@qq.com> Date: Sun, 30 Jan 2022 21:35:04 +0800 Subject: [PATCH] fixed makefile --- Makefile | 14 +++++++++----- pch.hpp | 2 +- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/Makefile b/Makefile index 20e753e..8a0c982 100644 --- a/Makefile +++ b/Makefile @@ -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/ diff --git a/pch.hpp b/pch.hpp index 93e1038..3b928e7 100644 --- a/pch.hpp +++ b/pch.hpp @@ -2,7 +2,7 @@ #include "glad/gl.h" #include "GLFW/glfw3.h" -#include "stb_image.h" +// #include "stb_image.h" #include #include #include