mirror of
https://github.com/libretro/scummvm.git
synced 2025-01-30 23:43:10 +00:00
Configure the plugin prefix/suffix in the configure script; use that setting in plugins.cpp
svn-id: r16739
This commit is contained in:
parent
683e934908
commit
8525d73e9b
12
Makefile
12
Makefile
@ -29,18 +29,6 @@ CXXFLAGS+= -pedantic -Wpointer-arith -Wcast-qual -Wconversion
|
||||
CXXFLAGS+= -Wshadow -Wimplicit -Wundef -Wnon-virtual-dtor
|
||||
CXXFLAGS+= -Wno-reorder -Wwrite-strings -fcheck-new -Wctor-dtor-privacy
|
||||
|
||||
######################################################################
|
||||
# Plugin settings
|
||||
######################################################################
|
||||
|
||||
# Plugin prefix. Typically "lib" on Unix, and nothing everywhere else
|
||||
PLUGIN_PREFIX := lib
|
||||
# Plugin suffix. For static/shared libs this is typically ".so"/".a" on Unix,
|
||||
# ".dll"/".lib" on Windows, ".bundle"/".a" on OS X, etc.
|
||||
PLUGIN_SUFFIX := .so
|
||||
|
||||
PLUGIN_EXTRA_DEPS := $(EXECUTABLE)
|
||||
|
||||
#######################################################################
|
||||
# Misc stuff - you should never have to edit this #
|
||||
#######################################################################
|
||||
|
@ -39,7 +39,7 @@ typedef DetectedGameList (*DetectFunc)(const FSList &fslist);
|
||||
|
||||
#ifdef UNIX
|
||||
#include <dlfcn.h>
|
||||
#define DYNAMIC_PLUGIN_PATH(name) (name "/lib" name ".so")
|
||||
#define DYNAMIC_PLUGIN_PATH(name) (name "/" PLUGIN_PREFIX name PLUGIN_SUFFIX)
|
||||
#else
|
||||
#ifdef __DC__
|
||||
#include "dcloader.h"
|
||||
|
27
configure
vendored
27
configure
vendored
@ -761,11 +761,19 @@ fi
|
||||
#
|
||||
echocheck "Plugin support"
|
||||
_mak_plugins=
|
||||
_def_plugin=
|
||||
if test "$_build_plugins" = yes ; then
|
||||
case $_host_os in
|
||||
linux*)
|
||||
_def_plugin='
|
||||
#define PLUGIN_PREFIX "lib"
|
||||
#define PLUGIN_SUFFIX ".so"
|
||||
'
|
||||
_mak_plugins='
|
||||
BUILD_PLUGINS := 1
|
||||
PLUGIN_PREFIX := lib
|
||||
PLUGIN_SUFFIX := .so
|
||||
PLUGIN_EXTRA_DEPS := $(EXECUTABLE)
|
||||
CXXFLAGS += -DDYNAMIC_MODULES
|
||||
CXXFLAGS += -fpic
|
||||
PLUGIN_LDFLAGS += -shared
|
||||
@ -775,8 +783,15 @@ LIBS += -ldl
|
||||
'
|
||||
;;
|
||||
freebsd*)
|
||||
_def_plugin='
|
||||
#define PLUGIN_PREFIX "lib"
|
||||
#define PLUGIN_SUFFIX ".so"
|
||||
'
|
||||
_mak_plugins='
|
||||
BUILD_PLUGINS := 1
|
||||
PLUGIN_PREFIX := lib
|
||||
PLUGIN_SUFFIX := .so
|
||||
PLUGIN_EXTRA_DEPS := $(EXECUTABLE)
|
||||
CXXFLAGS += -DDYNAMIC_MODULES
|
||||
CXXFLAGS += -fpic
|
||||
PLUGIN_LDFLAGS += -shared
|
||||
@ -785,8 +800,15 @@ POST_OBJS_FLAGS := -Wl,-no-whole-archive
|
||||
'
|
||||
;;
|
||||
darwin*)
|
||||
_def_plugin='
|
||||
#define PLUGIN_PREFIX ""
|
||||
#define PLUGIN_SUFFIX ".plugin"
|
||||
'
|
||||
_mak_plugins='
|
||||
BUILD_PLUGINS := 1
|
||||
PLUGIN_PREFIX :=
|
||||
PLUGIN_SUFFIX := .plugin
|
||||
PLUGIN_EXTRA_DEPS := $(EXECUTABLE)
|
||||
CXXFLAGS += -DDYNAMIC_MODULES
|
||||
PLUGIN_LDFLAGS += -bundle -bundle_loader $(EXECUTABLE) -exported_symbols_list "$(srcdir)/plugin.exp"
|
||||
PRE_OBJS_FLAGS := -all_load
|
||||
@ -796,6 +818,8 @@ LIBS += -ldl
|
||||
;;
|
||||
*)
|
||||
_build_plugins=no
|
||||
_mak_plugins=
|
||||
_def_plugin=
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
@ -1095,6 +1119,9 @@ $_def_mt32emu
|
||||
/* Whether we should use i386 assembly routines */
|
||||
$_def_nasm
|
||||
|
||||
/* Plugin settings */
|
||||
$_def_plugin
|
||||
|
||||
#endif /* CONFIG_H */
|
||||
EOF
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user