OpenGLProject/Makefile

18 lines
290 B
Makefile

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