summaryrefslogtreecommitdiff
path: root/Makerules
diff options
context:
space:
mode:
authorTor Andersson <tor.andersson@artifex.com>2015-02-24 11:57:01 +0100
committerTor Andersson <tor.andersson@artifex.com>2015-10-06 11:21:22 +0200
commite9f86e83bf50f5a80847d45ee5f682fb92f35ba1 (patch)
tree92c9532c8f1c53087756e201ab002624cc05e81f /Makerules
parent7b3c88e3d06ace9ce98166e8f1751f7c194bee8e (diff)
downloadmupdf-e9f86e83bf50f5a80847d45ee5f682fb92f35ba1.tar.xz
glut: Simple viewer using GLUT and fixed function OpenGL.
Diffstat (limited to 'Makerules')
-rw-r--r--Makerules14
1 files changed, 14 insertions, 0 deletions
diff --git a/Makerules b/Makerules
index 20dfeb5c..bb066dc4 100644
--- a/Makerules
+++ b/Makerules
@@ -32,10 +32,17 @@ endif
# Windows (MINGW) build doesn't use system libraries.
ifeq "$(OS)" "MINGW"
+HAVE_X11 ?= no
+HAVE_GLUT ?= yes
+
+SYS_GLUT_CFLAGS = -DFREEGLUT_STATIC -Ithirdparty/freeglut/include
+SYS_GLUT_LIBS = -Lthirdparty/freeglut/lib -lfreeglut_static -lopengl32 -lgdi32 -lwinmm
+
# Mac OS X doesn't have pkg-config so we hard code paths.
else ifeq "$(OS)" "MACOS"
HAVE_X11 ?= yes
+HAVE_GLUT ?= yes
SYS_OPENSSL_CFLAGS = -DHAVE_OPENSSL
SYS_OPENSSL_LIBS = -lcrypto
@@ -44,6 +51,8 @@ SYS_CURL_DEPS = -lpthread
SYS_X11_CFLAGS = -I/usr/X11R6/include
SYS_X11_LIBS = -L/usr/X11R6/lib -lX11 -lXext
+SYS_GLUT_CFLAGS = -Wno-deprecated-declarations
+SYS_GLUT_LIBS = -framework GLUT -framework OpenGL
SYS_FREETYPE_CFLAGS = -I/usr/X11R6/include/freetype2
SYS_FREETYPE_LIBS = -lfreetype
@@ -61,6 +70,7 @@ RANLIB_CMD = xcrun ranlib $@
else ifeq "$(OS)" "Linux"
HAVE_X11 ?= yes
+HAVE_GLUT ?= yes
ifeq "$(shell pkg-config --exists libcrypto && echo yes)" "yes"
SYS_OPENSSL_CFLAGS = -DHAVE_OPENSSL $(shell pkg-config --cflags libcrypto)
@@ -77,6 +87,9 @@ SYS_CURL_DEPS = -lpthread -lrt
SYS_X11_CFLAGS = $(shell pkg-config --cflags x11 xext)
SYS_X11_LIBS = $(shell pkg-config --libs x11 xext)
+SYS_GLUT_CFLAGS =
+SYS_GLUT_LIBS = -lglut -lGL
+
SYS_FREETYPE_CFLAGS = $(shell pkg-config --cflags freetype2)
SYS_FREETYPE_LIBS = $(shell pkg-config --libs freetype2)
SYS_OPENJPEG_CFLAGS = $(shell pkg-config --cflags libopenjp2)
@@ -197,4 +210,5 @@ endif
# TODO: If crosscompiling, why not just call "make libs" instead of this exception?
ifeq "$(CROSSCOMPILE)" "yes"
HAVE_X11 ?= no
+HAVE_GLUT ?= no
endif