OpenGLProject/Makefile

18 lines
308 B
Makefile
Raw Normal View History

CXX := g++
CXXFLAGS := -std=c++11 -c
LDFLAGS := -g
2024-04-23 11:37:02 -06:00
LDLIBS= -lglfw
2024-04-23 13:15:47 -06:00
srcfiles := $(wildcard src/*.cpp)
objfiles := $(subst src,obj,$(subst .cpp,.o,$(srcfiles)))
2024-04-23 07:46:02 -06:00
all: main.out
2024-04-23 07:46:02 -06:00
main.out: $(objfiles)
2024-04-23 13:15:47 -06:00
$(CXX) $(LDFLAGS) -o $@ $(objfiles) $(LDLIBS)
obj/%.o: src/%.cpp
mkdir -p obj
$(CXX) $(CXXFLAGS) -o $@ $<