| @@ -1,14 +1,14 @@ | | | @@ -1,14 +1,14 @@ |
1 | $NetBSD: patch-ab,v 1.14 2017/04/12 13:03:08 leot Exp $ | | 1 | $NetBSD: patch-ab,v 1.15 2017/05/19 18:00:38 fhajny Exp $ |
2 | | | 2 | |
3 | o Handle the various operating systems in the same way avoiding hardcoding | | 3 | o Handle the various operating systems in the same way avoiding hardcoding |
4 | o Properly recognize glfw support | | 4 | o Properly recognize glfw support |
5 | | | 5 | |
6 | --- Makerules.orig 2017-04-05 11:02:21.000000000 +0000 | | 6 | --- Makerules.orig 2017-04-05 11:02:21.000000000 +0000 |
7 | +++ Makerules | | 7 | +++ Makerules |
8 | @@ -64,54 +64,6 @@ ifeq "$(largefile)" "yes" | | 8 | @@ -64,54 +64,6 @@ ifeq "$(largefile)" "yes" |
9 | CFLAGS += -DFZ_LARGEFILE | | 9 | CFLAGS += -DFZ_LARGEFILE |
10 | endif | | 10 | endif |
11 | | | 11 | |
12 | -# Windows (MINGW) build doesn't use system libraries. | | 12 | -# Windows (MINGW) build doesn't use system libraries. |
13 | -ifeq "$(OS)" "MINGW" | | 13 | -ifeq "$(OS)" "MINGW" |
14 | - | | 14 | - |
| @@ -50,37 +50,45 @@ o Properly recognize glfw support | | | @@ -50,37 +50,45 @@ o Properly recognize glfw support |
50 | -SYS_ZLIB_LIBS := -lz | | 50 | -SYS_ZLIB_LIBS := -lz |
51 | - | | 51 | - |
52 | -CC := xcrun cc | | 52 | -CC := xcrun cc |
53 | -AR := xcrun ar | | 53 | -AR := xcrun ar |
54 | -LD := xcrun ld | | 54 | -LD := xcrun ld |
55 | -RANLIB_CMD := xcrun ranlib $@ | | 55 | -RANLIB_CMD := xcrun ranlib $@ |
56 | - | | 56 | - |
57 | -# Linux uses pkg-config for system libraries. | | 57 | -# Linux uses pkg-config for system libraries. |
58 | -else ifeq "$(OS)" "Linux" | | 58 | -else ifeq "$(OS)" "Linux" |
59 | - | | 59 | - |
60 | HAVE_PTHREAD := yes | | 60 | HAVE_PTHREAD := yes |
61 | SYS_PTHREAD_CFLAGS := | | 61 | SYS_PTHREAD_CFLAGS := |
62 | SYS_PTHREAD_LIBS := -lpthread | | 62 | SYS_PTHREAD_LIBS := -lpthread |
63 | @@ -140,6 +92,14 @@ SYS_X11_CFLAGS := $(shell pkg-config --c | | 63 | @@ -132,7 +84,6 @@ SYS_CURL_CFLAGS += $(shell pkg-config -- |
| | | 64 | SYS_CURL_DEPS += $(shell pkg-config --libs openssl) |
| | | 65 | endif |
| | | 66 | endif |
| | | 67 | -SYS_CURL_DEPS += -lpthread -lrt |
| | | 68 | |
| | | 69 | ifeq "$(shell pkg-config --exists x11 xext && echo yes)" "yes" |
| | | 70 | HAVE_X11 := yes |
| | | 71 | @@ -140,6 +91,14 @@ SYS_X11_CFLAGS := $(shell pkg-config --c |
64 | SYS_X11_LIBS := $(shell pkg-config --libs x11 xext) | | 72 | SYS_X11_LIBS := $(shell pkg-config --libs x11 xext) |
65 | endif | | 73 | endif |
66 | | | 74 | |
67 | +ifeq "$(shell pkg-config --exists glfw3 && pkg-config --exists gl && echo yes)" "yes" | | 75 | +ifeq "$(shell pkg-config --exists glfw3 && pkg-config --exists gl && echo yes)" "yes" |
68 | +HAVE_GLFW := yes | | 76 | +HAVE_GLFW := yes |
69 | +SYS_GLFW_CFLAGS := $(shell pkg-config --cflags glfw3) | | 77 | +SYS_GLFW_CFLAGS := $(shell pkg-config --cflags glfw3) |
70 | +SYS_GLFW_CFLAGS += $(shell pkg-config --cflags gl) | | 78 | +SYS_GLFW_CFLAGS += $(shell pkg-config --cflags gl) |
71 | +SYS_GLFW_LIBS := $(shell pkg-config --libs glfw3) | | 79 | +SYS_GLFW_LIBS := $(shell pkg-config --libs glfw3) |
72 | +SYS_GLFW_LIBS += $(shell pkg-config --libs gl) | | 80 | +SYS_GLFW_LIBS += $(shell pkg-config --libs gl) |
73 | +endif | | 81 | +endif |
74 | + | | 82 | + |
75 | ifeq "$(shell pkg-config --exists harfbuzz && echo yes)" "yes" | | 83 | ifeq "$(shell pkg-config --exists harfbuzz && echo yes)" "yes" |
76 | SYS_HARFBUZZ_CFLAGS := $(shell pkg-config --cflags harfbuzz) | | 84 | SYS_HARFBUZZ_CFLAGS := $(shell pkg-config --cflags harfbuzz) |
77 | SYS_HARFBUZZ_LIBS := $(shell pkg-config --libs harfbuzz) | | 85 | SYS_HARFBUZZ_LIBS := $(shell pkg-config --libs harfbuzz) |
78 | @@ -159,8 +119,6 @@ SYS_JBIG2DEC_LIBS := -ljbig2dec | | 86 | @@ -159,8 +118,6 @@ SYS_JBIG2DEC_LIBS := -ljbig2dec |
79 | SYS_LIBJPEG_LIBS := -ljpeg | | 87 | SYS_LIBJPEG_LIBS := -ljpeg |
80 | SYS_ZLIB_LIBS := -lz | | 88 | SYS_ZLIB_LIBS := -lz |
81 | | | 89 | |
82 | -endif | | 90 | -endif |
83 | - | | 91 | - |
84 | # The following section is an example of how to simply do cross-compilation | | 92 | # The following section is an example of how to simply do cross-compilation |
85 | # using these Makefiles. It builds for a beagleboard running ARM linux, | | 93 | # using these Makefiles. It builds for a beagleboard running ARM linux, |
86 | # compiling on windows with the CodeSourcery G++ compilers. | | 94 | # compiling on windows with the CodeSourcery G++ compilers. |