OSX build options

This commit is contained in:
James Turk 2016-10-06 23:46:48 -04:00
parent 189e89ae21
commit 4e8b9c2fa3
2 changed files with 13 additions and 1 deletions

View File

@ -39,7 +39,11 @@
#ifndef GLFT_FONT_HPP
#define GLFT_FONT_HPP
#ifdef __APPLE__
#include <OpenGL/gl.h>
#else
#include <GL/gl.h>
#endif
#include <ft2build.h>
#include FT_FREETYPE_H

View File

@ -1,5 +1,13 @@
UNAME := $(shell uname)
ifeq ($(UNAME), Darwix)
GL := -framework OpenGL
else
GL := -lGL -lXrandr
endif
test: test.cpp GLFT_Font.cpp
g++ GLFT_Font.cpp test.cpp -o test -Wall -pedantic -lglfw -lGL -lfreetype -pthread -lXrandr `freetype-config --cflags`
g++ GLFT_Font.cpp test.cpp -o test -Wall -pedantic -lglfw $(GL) -lfreetype -pthread `freetype-config --cflags`
glftfont.tar.gz:
tar -czf glftfont.tar.gz GLFT_Font.cpp GLFT_Font.hpp index.html README test.cpp Makefile