librw/tests/gl/Makefile.mingw

23 lines
568 B
Makefile
Raw Normal View History

2015-01-17 20:51:04 +00:00
BUILDDIR = build
SRC = main.cpp glshader.cpp math.cpp camera.cpp
OBJ = $(patsubst %.cpp, $(BUILDDIR)/%.o, $(SRC))
DEP = $(patsubst %.cpp, $(BUILDDIR)/%.d, $(SRC))
RWDIR=$(HOME)/src/librw
LDLIBS=-static -lglfw3 -lglew32 -lopengl32 -lgdi32
CFLAGS=-g -I$(RWDIR) -Wall -Wextra -DGLEW_STATIC
2015-01-20 20:49:57 +00:00
rwtest: $(OBJ) $(RWDIR)/librw-opengl.a
2015-01-17 20:51:04 +00:00
$(CXX) $^ $(LDLIBS) -o $@
$(BUILDDIR)/%.o: %.cpp
2015-01-20 20:49:57 +00:00
@mkdir -p $(@D)
2015-01-17 20:51:04 +00:00
$(CXX) $(CFLAGS) -c $< -o $@
$(BUILDDIR)/%.d: %.cpp
2015-01-20 20:49:57 +00:00
@mkdir -p $(@D)
2015-01-17 20:51:04 +00:00
$(CXX) -MM -MT '$(patsubst %.cpp,$(BUILDDIR)%.o,$<)' $(CFLAGS) $< > $@
dep: $(DEP)
-include $(DEP)