82 lines
2.3 KiB
Plaintext
82 lines
2.3 KiB
Plaintext
$NetBSD: patch-ab,v 1.12 2016/04/27 12:34:58 leot Exp $
|
|
|
|
o Handle the various operating systems in the same way avoiding hardcoding
|
|
o Properly recognize glfw support
|
|
|
|
--- Makerules.orig 2016-04-06 12:06:53.000000000 +0000
|
|
+++ Makerules
|
|
@@ -43,46 +43,6 @@ ifeq "$(largefile)" "yes"
|
|
CFLAGS += -DFZ_LARGEFILE
|
|
endif
|
|
|
|
-# Windows (MINGW) build doesn't use system libraries.
|
|
-ifeq "$(OS)" "MINGW"
|
|
-
|
|
-HAVE_X11 ?= no
|
|
-
|
|
-# Mac OS X doesn't have pkg-config so we hard code paths.
|
|
-else ifeq "$(OS)" "MACOS"
|
|
-
|
|
-HAVE_X11 ?= yes
|
|
-HAVE_PTHREADS ?= yes
|
|
-
|
|
-# Mac OS X deprecated openssl, so the default is to not include it.
|
|
-HAVE_OPENSSL ?= no
|
|
-SYS_OPENSSL_CFLAGS =
|
|
-SYS_OPENSSL_LIBS =
|
|
-ifeq "$(HAVE_OPENSSL)" "yes"
|
|
-SYS_OPENSSL_CFLAGS = -DHAVE_OPENSSL
|
|
-SYS_OPENSSL_LIBS = -lcrypto
|
|
-endif
|
|
-
|
|
-SYS_CURL_DEPS = -lpthread
|
|
-
|
|
-SYS_X11_CFLAGS = -I/usr/X11R6/include
|
|
-SYS_X11_LIBS = -L/usr/X11R6/lib -lX11 -lXext
|
|
-
|
|
-SYS_FREETYPE_CFLAGS = $(shell freetype-config --cflags)
|
|
-SYS_FREETYPE_LIBS = $(shell freetype-config --libs)
|
|
-SYS_OPENJPEG_LIBS = -lopenjpeg
|
|
-SYS_JBIG2DEC_LIBS = -ljbig2dec
|
|
-SYS_JPEG_LIBS = -ljpeg
|
|
-SYS_ZLIB_LIBS = -lz
|
|
-
|
|
-CC = xcrun cc
|
|
-AR = xcrun ar
|
|
-LD = xcrun ld
|
|
-RANLIB_CMD = xcrun ranlib $@
|
|
-
|
|
-# Linux uses pkg-config for system libraries.
|
|
-else ifeq "$(OS)" "Linux"
|
|
-
|
|
HAVE_X11 ?= yes
|
|
HAVE_PTHREADS ?= yes
|
|
|
|
@@ -101,6 +61,17 @@ SYS_CURL_DEPS = -lpthread -lrt
|
|
SYS_X11_CFLAGS = $(shell pkg-config --cflags x11 xext)
|
|
SYS_X11_LIBS = $(shell pkg-config --libs x11 xext)
|
|
|
|
+ifeq "$(shell pkg-config --exists glut && echo yes)" "yes"
|
|
+SYS_GLUT_CFLAGS = $(shell pkg-config --cflags glut)
|
|
+SYS_GLUT_LIBS = $(shell pkg-config --libs glut)
|
|
+endif
|
|
+
|
|
+ifeq "$(shell pkg-config --exists glfw3 && echo yes)" "yes"
|
|
+HAVE_GLFW = yes
|
|
+SYS_GLFW_CFLAGS = $(shell pkg-config --cflags glfw3)
|
|
+SYS_GLFW_LIBS = $(shell pkg-config --libs glfw3)
|
|
+endif
|
|
+
|
|
SYS_HARFBUZZ_CFLAGS = $(shell pkg-config --cflags harfbuzz)
|
|
SYS_HARFBUZZ_LIBS = $(shell pkg-config --libs harfbuzz)
|
|
SYS_FREETYPE_CFLAGS = $(shell pkg-config --cflags freetype2)
|
|
@@ -111,8 +82,6 @@ SYS_JBIG2DEC_LIBS = -ljbig2dec
|
|
SYS_JPEG_LIBS = -ljpeg
|
|
SYS_ZLIB_LIBS = -lz
|
|
|
|
-endif
|
|
-
|
|
# The following section is an example of how to simply do cross-compilation
|
|
# using these Makefiles. It builds for a beagleboard running ARM linux,
|
|
# compiling on windows with the CodeSourcery G++ compilers.
|