diff --git a/.gitignore b/.gitignore index a982578..bb28b08 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,4 @@ /build /.rsconscache +/freetype2gl3 +/freetype2gl3.exe diff --git a/Makefile b/Makefile index 82f9409..2b484f9 100644 --- a/Makefile +++ b/Makefile @@ -1,11 +1,15 @@ -.PHONY: default -default: - @rake $@ +ifeq ($(OS),Windows_NT) + GL_LIB := opengl32 +else + GL_LIB := GL +endif +CFLAGS := $(shell freetype-config --cflags) $(shell sdl2-config --cflags) +CXXFLAGS := $(CFLAGS) +LDFLAGS := -l$(GL_LIB) -ldl -lfreetype $(shell sdl2-config --libs) $(shell freetype-config --libs) -.PHONY: test -test: - @rake $@ +freetype2gl3: gl3w.o freetype2gl3.o + $(CXX) -o $@ $^ $(LDFLAGS) .PHONY: clean clean: - @rake $@ + -rm -f freetype2gl3 diff --git a/freetype2gl3.cc b/freetype2gl3.cc index 95b188a..d6595fb 100644 --- a/freetype2gl3.cc +++ b/freetype2gl3.cc @@ -1,5 +1,5 @@ #include "gl3w.h" -#include +#include #include #include #include FT_FREETYPE_H