librw/tools/gl/Makefile

31 lines
771 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
2015-08-27 15:45:54 +01:00
INC := -I/usr/local/include
LDLIBS=-L/usr/local/lib -pthread -lX11 -lXrandr -lXi -lXxf86vm -lGL -lGLEW -lm
2015-07-11 22:48:11 +01:00
STATICLIBS= $(RWDIR)/librw-opengl.a /usr/local/lib/libglfw3.a
2015-07-11 22:48:11 +01:00
#LDLIBS=-pthread -lGL -lGLEW -lglfw
#STATICLIBS=$(RWDIR)/librw-opengl.a
2015-01-17 20:51:04 +00:00
CFLAGS=-g -I$(RWDIR) -Wall -Wextra
2015-06-10 21:29:48 +01:00
rwtest: $(OBJ) $(STATICLIBS)
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-08-27 15:45:54 +01:00
$(CXX) $(CFLAGS) $(INC) -c $< -o $@
2015-01-17 20:51:04 +00:00
$(BUILDDIR)/%.d: %.cpp
2015-01-20 20:49:57 +00:00
@mkdir -p $(@D)
2015-08-27 15:45:54 +01:00
$(CXX) -MM -MT '$(patsubst %.cpp,$(BUILDDIR)%.o,$<)' $(CFLAGS) $(INC) $< > $@
2015-01-17 20:51:04 +00:00
clean:
rm $(BUILDDIR)/* rwtest
-include $(DEP)