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
3 changed files with 28 additions and 13 deletions
12
Makefile
12
Makefile
|
@ -29,18 +29,6 @@ CXXFLAGS+= -pedantic -Wpointer-arith -Wcast-qual -Wconversion
|
||||||
CXXFLAGS+= -Wshadow -Wimplicit -Wundef -Wnon-virtual-dtor
|
CXXFLAGS+= -Wshadow -Wimplicit -Wundef -Wnon-virtual-dtor
|
||||||
CXXFLAGS+= -Wno-reorder -Wwrite-strings -fcheck-new -Wctor-dtor-privacy
|
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 #
|
# Misc stuff - you should never have to edit this #
|
||||||
#######################################################################
|
#######################################################################
|
||||||
|
|
|
@ -39,7 +39,7 @@ typedef DetectedGameList (*DetectFunc)(const FSList &fslist);
|
||||||
|
|
||||||
#ifdef UNIX
|
#ifdef UNIX
|
||||||
#include <dlfcn.h>
|
#include <dlfcn.h>
|
||||||
#define DYNAMIC_PLUGIN_PATH(name) (name "/lib" name ".so")
|
#define DYNAMIC_PLUGIN_PATH(name) (name "/" PLUGIN_PREFIX name PLUGIN_SUFFIX)
|
||||||
#else
|
#else
|
||||||
#ifdef __DC__
|
#ifdef __DC__
|
||||||
#include "dcloader.h"
|
#include "dcloader.h"
|
||||||
|
|
27
configure
vendored
27
configure
vendored
|
@ -761,11 +761,19 @@ fi
|
||||||
#
|
#
|
||||||
echocheck "Plugin support"
|
echocheck "Plugin support"
|
||||||
_mak_plugins=
|
_mak_plugins=
|
||||||
|
_def_plugin=
|
||||||
if test "$_build_plugins" = yes ; then
|
if test "$_build_plugins" = yes ; then
|
||||||
case $_host_os in
|
case $_host_os in
|
||||||
linux*)
|
linux*)
|
||||||
|
_def_plugin='
|
||||||
|
#define PLUGIN_PREFIX "lib"
|
||||||
|
#define PLUGIN_SUFFIX ".so"
|
||||||
|
'
|
||||||
_mak_plugins='
|
_mak_plugins='
|
||||||
BUILD_PLUGINS := 1
|
BUILD_PLUGINS := 1
|
||||||
|
PLUGIN_PREFIX := lib
|
||||||
|
PLUGIN_SUFFIX := .so
|
||||||
|
PLUGIN_EXTRA_DEPS := $(EXECUTABLE)
|
||||||
CXXFLAGS += -DDYNAMIC_MODULES
|
CXXFLAGS += -DDYNAMIC_MODULES
|
||||||
CXXFLAGS += -fpic
|
CXXFLAGS += -fpic
|
||||||
PLUGIN_LDFLAGS += -shared
|
PLUGIN_LDFLAGS += -shared
|
||||||
|
@ -775,8 +783,15 @@ LIBS += -ldl
|
||||||
'
|
'
|
||||||
;;
|
;;
|
||||||
freebsd*)
|
freebsd*)
|
||||||
|
_def_plugin='
|
||||||
|
#define PLUGIN_PREFIX "lib"
|
||||||
|
#define PLUGIN_SUFFIX ".so"
|
||||||
|
'
|
||||||
_mak_plugins='
|
_mak_plugins='
|
||||||
BUILD_PLUGINS := 1
|
BUILD_PLUGINS := 1
|
||||||
|
PLUGIN_PREFIX := lib
|
||||||
|
PLUGIN_SUFFIX := .so
|
||||||
|
PLUGIN_EXTRA_DEPS := $(EXECUTABLE)
|
||||||
CXXFLAGS += -DDYNAMIC_MODULES
|
CXXFLAGS += -DDYNAMIC_MODULES
|
||||||
CXXFLAGS += -fpic
|
CXXFLAGS += -fpic
|
||||||
PLUGIN_LDFLAGS += -shared
|
PLUGIN_LDFLAGS += -shared
|
||||||
|
@ -785,8 +800,15 @@ POST_OBJS_FLAGS := -Wl,-no-whole-archive
|
||||||
'
|
'
|
||||||
;;
|
;;
|
||||||
darwin*)
|
darwin*)
|
||||||
|
_def_plugin='
|
||||||
|
#define PLUGIN_PREFIX ""
|
||||||
|
#define PLUGIN_SUFFIX ".plugin"
|
||||||
|
'
|
||||||
_mak_plugins='
|
_mak_plugins='
|
||||||
BUILD_PLUGINS := 1
|
BUILD_PLUGINS := 1
|
||||||
|
PLUGIN_PREFIX :=
|
||||||
|
PLUGIN_SUFFIX := .plugin
|
||||||
|
PLUGIN_EXTRA_DEPS := $(EXECUTABLE)
|
||||||
CXXFLAGS += -DDYNAMIC_MODULES
|
CXXFLAGS += -DDYNAMIC_MODULES
|
||||||
PLUGIN_LDFLAGS += -bundle -bundle_loader $(EXECUTABLE) -exported_symbols_list "$(srcdir)/plugin.exp"
|
PLUGIN_LDFLAGS += -bundle -bundle_loader $(EXECUTABLE) -exported_symbols_list "$(srcdir)/plugin.exp"
|
||||||
PRE_OBJS_FLAGS := -all_load
|
PRE_OBJS_FLAGS := -all_load
|
||||||
|
@ -796,6 +818,8 @@ LIBS += -ldl
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
_build_plugins=no
|
_build_plugins=no
|
||||||
|
_mak_plugins=
|
||||||
|
_def_plugin=
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
fi
|
fi
|
||||||
|
@ -1095,6 +1119,9 @@ $_def_mt32emu
|
||||||
/* Whether we should use i386 assembly routines */
|
/* Whether we should use i386 assembly routines */
|
||||||
$_def_nasm
|
$_def_nasm
|
||||||
|
|
||||||
|
/* Plugin settings */
|
||||||
|
$_def_plugin
|
||||||
|
|
||||||
#endif /* CONFIG_H */
|
#endif /* CONFIG_H */
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue