OpenGLProject/Makefile
2024-04-23 13:15:47 -06:00

18 lines
308 B
Makefile

CXX := g++
CXXFLAGS := -std=c++11 -c
LDFLAGS := -g
LDLIBS= -lglfw
srcfiles := $(wildcard src/*.cpp)
objfiles := $(subst src,obj,$(subst .cpp,.o,$(srcfiles)))
all: main.out
main.out: $(objfiles)
$(CXX) $(LDFLAGS) -o $@ $(objfiles) $(LDLIBS)
obj/%.o: src/%.cpp
mkdir -p obj
$(CXX) $(CXXFLAGS) -o $@ $<