blob: 4b12e7db5ca022f9e0fb7421f188107e2eb07c03 (
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
|
$NetBSD: patch-ab,v 1.7 2014/05/18 08:12:22 wiz Exp $
o Handle the various operating systems in the same way avoiding hardcoding
o Build and link with openjpeg-2.1
o libcurl (www/curl) support
--- Makerules.orig 2014-04-11 15:10:41.000000000 +0000
+++ Makerules
@@ -25,37 +25,6 @@ else
$(error unknown build setting: '$(build)')
endif
-# Windows (MINGW) build doesn't use system libraries.
-ifeq "$(OS)" "MINGW"
-
-# Mac OS X doesn't have pkg-config so we hard code paths.
-else ifeq "$(OS)" "MACOS"
-
-HAVE_X11 ?= yes
-
-SYS_OPENSSL_CFLAGS = -DHAVE_OPENSSL
-SYS_OPENSSL_LIBS = -lcrypto
-
-SYS_CURL_DEPS = -lpthread
-
-SYS_X11_CFLAGS = -I/usr/X11R6/include
-SYS_X11_LIBS = -L/usr/X11R6/lib -lX11 -lXext
-
-SYS_FREETYPE_CFLAGS = -I/usr/X11R6/include/freetype2
-SYS_FREETYPE_LIBS = -lfreetype
-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
ifeq "$(shell pkg-config --exists libcrypto && echo yes)" "yes"
@@ -63,22 +32,21 @@ SYS_OPENSSL_CFLAGS = -DHAVE_OPENSSL $(sh
SYS_OPENSSL_LIBS = $(shell pkg-config --libs libcrypto)
endif
-# TODO: use pkg-config for system CURL
+SYS_CURL_CFLAGS = $(shell pkg-config --cflags libcurl)
SYS_CURL_DEPS = -lpthread -lrt
+SYS_CURL_LIBS = $(shell pkg-config --libs libcurl)
SYS_X11_CFLAGS = $(shell pkg-config --cflags x11 xext)
SYS_X11_LIBS = $(shell pkg-config --libs x11 xext)
SYS_FREETYPE_CFLAGS = $(shell pkg-config --cflags freetype2)
SYS_FREETYPE_LIBS = $(shell pkg-config --libs freetype2)
-SYS_OPENJPEG_CFLAGS = $(shell pkg-config --cflags libopenjpeg1)
-SYS_OPENJPEG_LIBS = $(shell pkg-config --libs libopenjpeg1)
+SYS_OPENJPEG_CFLAGS = $(shell pkg-config --cflags libopenjp2)
+SYS_OPENJPEG_LIBS = $(shell pkg-config --libs libopenjp2)
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.
|