change to build on Windows

This commit is contained in:
Josh Holtrop 2014-06-10 13:20:44 -04:00
parent a1d57b3f66
commit 0a115cea0d
3 changed files with 14 additions and 8 deletions

2
.gitignore vendored
View File

@ -1,2 +1,4 @@
/build
/.rsconscache
/freetype2gl3
/freetype2gl3.exe

View File

@ -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

View File

@ -1,5 +1,5 @@
#include "gl3w.h"
#include <SDL2/SDL.h>
#include <SDL.h>
#include <iostream>
#include <ft2build.h>
#include FT_FREETYPE_H