$NetBSD: patch-ab,v 1.9 2014/06/15 19:15:51 wiz Exp $ o Handle the various operating systems in the same way avoiding hardcoding o Build and link with openjpeg-2.1 --- Makerules.orig 2014-06-10 15:09:28.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" @@ -81,8 +50,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.