blob: ae6c049801c41cf47ac3ea64ae1dfbaa5fdab314 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
|
$NetBSD: patch-ab,v 1.15 2017/05/19 18:00:38 fhajny Exp $
o Handle the various operating systems in the same way avoiding hardcoding
o Properly recognize glfw support
--- Makerules.orig 2017-04-05 11:02:21.000000000 +0000
+++ Makerules
@@ -64,54 +64,6 @@ ifeq "$(largefile)" "yes"
CFLAGS += -DFZ_LARGEFILE
endif
-# Windows (MINGW) build doesn't use system libraries.
-ifeq "$(OS)" "MINGW"
-
-WINDRES := windres
-HAVE_X11 ?= no
-HAVE_WIN32 := yes
-CC=gcc
-# Add flags required for Harfbuzz because of missing strdup
-CFLAGS+= -U__STRICT_ANSI__
-
-# Mac OS X doesn't have pkg-config so we hard code paths.
-else ifeq "$(OS)" "MACOS"
-
-HAVE_X11 ?= no
-
-HAVE_PTHREAD := yes
-SYS_PTHREAD_CFLAGS :=
-SYS_PTHREAD_LIBS := -lpthread
-
-# Mac OS X deprecated libcrypto, so the default is to not include it.
-HAVE_LIBCRYTO := no
-SYS_LIBCRYPTO_CFLAGS :=
-SYS_LIBCRYPTO_LIBS :=
-ifeq "$(HAVE_LIBCRYPTO)" "yes"
-SYS_LIBCRYPTO_CFLAGS := -DHAVE_LIBCRYPTO
-SYS_LIBCRYPTO_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_LIBJPEG_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_PTHREAD := yes
SYS_PTHREAD_CFLAGS :=
SYS_PTHREAD_LIBS := -lpthread
@@ -132,7 +84,6 @@ SYS_CURL_CFLAGS += $(shell pkg-config --
SYS_CURL_DEPS += $(shell pkg-config --libs openssl)
endif
endif
-SYS_CURL_DEPS += -lpthread -lrt
ifeq "$(shell pkg-config --exists x11 xext && echo yes)" "yes"
HAVE_X11 := yes
@@ -140,6 +91,14 @@ SYS_X11_CFLAGS := $(shell pkg-config --c
SYS_X11_LIBS := $(shell pkg-config --libs x11 xext)
endif
+ifeq "$(shell pkg-config --exists glfw3 && pkg-config --exists gl && echo yes)" "yes"
+HAVE_GLFW := yes
+SYS_GLFW_CFLAGS := $(shell pkg-config --cflags glfw3)
+SYS_GLFW_CFLAGS += $(shell pkg-config --cflags gl)
+SYS_GLFW_LIBS := $(shell pkg-config --libs glfw3)
+SYS_GLFW_LIBS += $(shell pkg-config --libs gl)
+endif
+
ifeq "$(shell pkg-config --exists harfbuzz && echo yes)" "yes"
SYS_HARFBUZZ_CFLAGS := $(shell pkg-config --cflags harfbuzz)
SYS_HARFBUZZ_LIBS := $(shell pkg-config --libs harfbuzz)
@@ -159,8 +118,6 @@ SYS_JBIG2DEC_LIBS := -ljbig2dec
SYS_LIBJPEG_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.
|