summaryrefslogtreecommitdiffstatshomepage
path: root/makefile
diff options
context:
space:
mode:
authorGravatarGravatar R. Belmont <rb6502@users.noreply.github.com>2012-03-29 21:56:18 +0000
committerGravatarGravatar R. Belmont <rb6502@users.noreply.github.com>2012-03-29 21:56:18 +0000
commit647311cde14cdfd10c9b87c0b7d91e084e905697 (patch)
tree1099e22bd6df0da85dd77c607c331f42546fdc50 /makefile
parentf7a94cda02c0664c3e89f6a70e7c297ccbb72a78 (diff)
Allow compilation with compatible system-installed versions of libjpeg and libflac [wallyweek, R. Belmont]
Diffstat (limited to 'makefile')
-rw-r--r--makefile37
1 files changed, 32 insertions, 5 deletions
diff --git a/makefile b/makefile
index 07f802b3e4a..eb6e573258b 100644
--- a/makefile
+++ b/makefile
@@ -211,6 +211,12 @@ BUILD_EXPAT = 1
# uncomment next line to build zlib as part of MAME build
BUILD_ZLIB = 1
+# uncomment next line to build libflac as part of MAME build
+BUILD_FLAC = 1
+
+# uncomment next line to build jpeglib as part of MAME build
+BUILD_JPEGLIB = 1
+
# uncomment next line to include the symbols
# SYMBOLS = 1
@@ -411,7 +417,14 @@ DEFS += -DUSE_NETWORK
endif
# need to ensure FLAC functions are statically linked
+ifeq ($(BUILD_FLAC),1)
DEFS += -DFLAC__NO_DLL
+endif
+
+# define USE_SYSTEM_JPEGLIB if library shipped with MAME is not used
+ifneq ($(BUILD_JPEGLIB),1)
+DEFS += -DUSE_SYSTEM_JPEGLIB
+endif
@@ -620,14 +633,31 @@ LIBS += -lz
ZLIB =
endif
+# add flac library
+ifeq ($(BUILD_FLAC),1)
+INCPATH += -I$(SRC)/lib/util
+FLAC_LIB = $(OBJ)/libflac.a
+# $(OBJ)/libflac++.a
+else
+LIBS += -lFLAC
+FLAC_LIB =
+endif
+
+# add jpeglib image library
+ifeq ($(BUILD_JPEGLIB),1)
+INCPATH += -I$(SRC)/lib/libjpeg
+JPEG_LIB = $(OBJ)/libjpeg.a
+else
+LIBS += -ljpeg
+JPEG_LIB =
+endif
+
# add SoftFloat floating point emulation library
SOFTFLOAT = $(OBJ)/libsoftfloat.a
# add formats emulation library
FORMATS_LIB = $(OBJ)/libformats.a
-JPEG_LIB = $(OBJ)/libjpeg.a
-
#-------------------------------------------------
# 'default' target needs to go here, before the
# include files which define additional targets
@@ -637,9 +667,6 @@ default: maketree buildtools emulator
all: default tools
-FLAC_LIB = $(OBJ)/libflac.a
-# $(OBJ)/libflac++.a
-
7Z_LIB = $(OBJ)/lib7z.a