OpenGLProject/Makefile

18 lines
293 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
main: $(objfiles)
$(CXX) $(LDFLAGS) -o main $(objfiles) $(LDLIBS)
obj/%.o: src/%.cpp
mkdir -p obj
$(CXX) $(CXXFLAGS) -o $@ $<