changes to make building plugins possible; build wxSound SDL plugin on Unix
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@25458 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
f93ca9fd7e
commit
c79241a238
@ -10,7 +10,8 @@
|
||||
<using module="wxwin"/>
|
||||
|
||||
<include file="config.bkl"/>
|
||||
|
||||
|
||||
<include file="plugins_deps.bkl"/>
|
||||
|
||||
<!-- ================================================================== -->
|
||||
<!-- wxWindows version numbers: -->
|
||||
@ -464,9 +465,9 @@ $(TAB)copy "$(DOLLAR)(InputPath)" $(SETUPHDIR)\wx\setup.h
|
||||
<!-- =============================================================== -->
|
||||
|
||||
<if cond="WX_STABLE_BRANCH=='1'">
|
||||
<set var="PLUGIN_VERSION">
|
||||
<set var="PLUGIN_VERSION0">
|
||||
<if cond="PLATFORM_UNIX=='1'">
|
||||
-$(WXVER_MAJOR).$(WXVER_MINOR)
|
||||
$(WXVER_MAJOR).$(WXVER_MINOR)
|
||||
</if>
|
||||
<if cond="PLATFORM_UNIX=='0'">
|
||||
$(WXVER_MAJOR)$(WXVER_MINOR)
|
||||
@ -474,32 +475,50 @@ $(TAB)copy "$(DOLLAR)(InputPath)" $(SETUPHDIR)\wx\setup.h
|
||||
</set>
|
||||
</if>
|
||||
<if cond="WX_STABLE_BRANCH=='0'">
|
||||
<set var="PLUGIN_VERSION">
|
||||
<set var="PLUGIN_VERSION0">
|
||||
<if cond="PLATFORM_UNIX=='1'">
|
||||
-$(WXVER_MAJOR).$(WXVER_MINOR).$(WXVER_RELEASE)
|
||||
$(WXVER_MAJOR).$(WXVER_MINOR).$(WXVER_RELEASE)
|
||||
</if>
|
||||
<if cond="PLATFORM_UNIX=='0'">
|
||||
$(WXVER_MAJOR)$(WXVER_MINOR)$(WXVER_RELEASE)
|
||||
</if>
|
||||
</set>
|
||||
</if>
|
||||
<set var="PLUGVERDELIM">
|
||||
<if cond="PLATFORM_UNIX=='1'">-</if>
|
||||
<if cond="PLATFORM_UNIX=='0'"></if>
|
||||
</set>
|
||||
<set var="PLUGIN_VERSION">$(PLUGVERDELIM)$(PLUGIN_VERSION0)</set>
|
||||
|
||||
<set var="PLUGINSUFFIX">
|
||||
<if cond="UNICODE=='0' and BUILD=='release'"></if>
|
||||
<if cond="UNICODE=='0' and BUILD=='debug'">_d</if>
|
||||
<if cond="UNICODE=='1' and BUILD=='release'">_u</if>
|
||||
<if cond="UNICODE=='1' and BUILD=='debug'">_ud</if>
|
||||
</set>
|
||||
|
||||
<set var="PLUGINS_INST_DIR" make_var="1">
|
||||
$(LIBDIR)/wx/$(PLUGIN_VERSION0)
|
||||
</set>
|
||||
|
||||
<define-rule name="wx-base-plugin" extends="module">
|
||||
<template>
|
||||
<dllname>
|
||||
$(id)$(addPrefixIfNotEmpty('_',WXNAMESUFFIX))$(PLUGIN_VERSION)$(WXCOMPILER)
|
||||
$(id)$(PLUGINSUFFIX)$(PLUGIN_VERSION)$(WXCOMPILER)
|
||||
</dllname>
|
||||
<define>WXUSINGDLL</define>
|
||||
<define>wxUSE_GUI=0</define>
|
||||
<install-to>$(PLUGINS_INST_DIR)</install-to>
|
||||
</template>
|
||||
</define-rule>
|
||||
|
||||
<define-rule name="wx-gui-plugin" extends="module">
|
||||
<template template="wx">
|
||||
<dllname>
|
||||
$(id)_$(PORTNAME)$(WXUNIVNAME)$(WXNAMESUFFIX)$(PLUGIN_VERSION)$(WXCOMPILER)
|
||||
$(id)_$(PORTNAME)$(WXUNIVNAME)$(PLUGINSUFFIX)$(PLUGIN_VERSION)$(WXCOMPILER)
|
||||
</dllname>
|
||||
<define>WXUSINGDLL</define>
|
||||
<install-to>$(PLUGINS_INST_DIR)</install-to>
|
||||
</template>
|
||||
</define-rule>
|
||||
|
||||
|
@ -100,6 +100,20 @@ Acts according to DEBUG_INFO by default.
|
||||
</description>
|
||||
</option>
|
||||
|
||||
<if cond="FORMAT=='autoconf'"> <!-- FIXME - temporary -->
|
||||
<option name="USE_PLUGINS">
|
||||
<values>0,1</values>
|
||||
<default-value>1</default-value>
|
||||
<description>
|
||||
Build parts of the library as dynamically loadable plugins
|
||||
(only supported in multilib build)?
|
||||
</description>
|
||||
</option>
|
||||
</if>
|
||||
<if cond="FORMAT!='autoconf'">
|
||||
<set var="USE_PLUGINS">0</set> <!-- FIXME - temporary -->
|
||||
</if>
|
||||
|
||||
<option name="USE_GUI">
|
||||
<values>0,1</values>
|
||||
<values-description>Base,GUI</values-description>
|
||||
@ -181,6 +195,7 @@ compiled .lib files and setup.h under the lib/ toplevel directory.
|
||||
<option name="EXTRALIBS_ODBC"/>
|
||||
<option name="EXTRALIBS_GUI"/>
|
||||
<option name="EXTRALIBS_OPENGL"/>
|
||||
<option name="EXTRALIBS_SDL"/>
|
||||
<option name="HOST_SUFFIX"/>
|
||||
<option name="SAMPLES_RPATH_FLAG"/>
|
||||
<option name="SAMPLES_RPATH_POSTLINK"/>
|
||||
@ -188,6 +203,10 @@ compiled .lib files and setup.h under the lib/ toplevel directory.
|
||||
<set var="TOP_SRCDIR">$(top_srcdir)/</set>
|
||||
<set var="RUNTIME_LIBS">dynamic</set>
|
||||
<set var="WXTOPDIR"/> <!-- to be overriden on bakefile cmd line -->
|
||||
|
||||
<option name="WITH_PLUGIN_SDL">
|
||||
<values>0,1</values>
|
||||
</option>
|
||||
</if>
|
||||
|
||||
|
||||
@ -223,6 +242,9 @@ it if SHARED=1 unless you know what you are doing.
|
||||
<if cond="COMPILER=='vc'">opengl32.lib glu32.lib</if>
|
||||
<if cond="COMPILER=='gcc'">-lopengl32 -lglu32</if>
|
||||
</set>
|
||||
<set var="EXTRALIBS_SDL"/>
|
||||
|
||||
<set var="WITH_PLUGIN_SDL">0</set>
|
||||
|
||||
<set var="SRCDIR">
|
||||
<if cond="BUILDING_LIB=='1'">..$(DIRSEP)..</if>
|
||||
|
@ -1993,6 +1993,7 @@ IMPORTANT: please read docs/tech/tn0016.txt before modifying this file!
|
||||
wx/joystick.h
|
||||
wx/laywin.h
|
||||
wx/sashwin.h
|
||||
wx/sound.h
|
||||
wx/splash.h
|
||||
wx/taskbar.h
|
||||
wx/tipdlg.h
|
||||
@ -2033,13 +2034,13 @@ IMPORTANT: please read docs/tech/tn0016.txt before modifying this file!
|
||||
<set var="ADVANCED_UNIX_SRC" hints="files">
|
||||
src/common/taskbarcmn.cpp
|
||||
src/unix/joystick.cpp
|
||||
src/unix/sound.cpp
|
||||
src/unix/taskbarx11.cpp
|
||||
src/unix/wave.cpp
|
||||
</set>
|
||||
<set var="ADVANCED_UNIX_HDR" hints="files">
|
||||
wx/unix/joystick.h
|
||||
wx/unix/sound.h
|
||||
wx/unix/taskbarx11.h
|
||||
wx/unix/wave.h
|
||||
</set>
|
||||
|
||||
|
||||
@ -2165,6 +2166,13 @@ IMPORTANT: please read docs/tech/tn0016.txt before modifying this file!
|
||||
</set>
|
||||
|
||||
|
||||
<!-- ====================================================================== -->
|
||||
<!-- Misc plugin sources: -->
|
||||
<!-- ====================================================================== -->
|
||||
|
||||
<set var="UNIX_SOUND_SRC_SDL" hints="files">
|
||||
src/unix/sound_sdl.cpp
|
||||
</set>
|
||||
|
||||
<!-- ====================================================================== -->
|
||||
<!-- Define sources for specific libraries: -->
|
||||
@ -2337,5 +2345,20 @@ IMPORTANT: please read docs/tech/tn0016.txt before modifying this file!
|
||||
$(NET_CMN_SRC) $(NET_UNIX_SRC) $(NET_WIN32_SRC)
|
||||
$(XML_SRC) $(ODBC_SRC)
|
||||
</set>
|
||||
|
||||
|
||||
|
||||
<!-- ================================================================ -->
|
||||
<!-- Define where plugins sources go if USE_PLUGINS=0 -->
|
||||
<!-- ================================================================ -->
|
||||
|
||||
<!-- wxAdv sources -->
|
||||
<set var="PLUGIN_ADV_SRC">
|
||||
<if cond="FORMAT=='autoconf' and PLATFORM_UNIX=='1' and USE_PLUGINS=='0'">
|
||||
$(UNIX_SOUND_SRC_SDL)
|
||||
</if>
|
||||
</set>
|
||||
|
||||
<set var="PLUGIN_MONOLIB_SRC">$(PLUGIN_ADV_SRC)</set>
|
||||
|
||||
</makefile>
|
||||
|
@ -15,17 +15,18 @@
|
||||
cond="SHARED=='1' and MONOLITHIC=='1'">
|
||||
<define>wxUSE_BASE=1</define>
|
||||
<define>WXMAKINGDLL</define>
|
||||
<sources>$(MONOLIB_SRC)</sources>
|
||||
<sources>$(MONOLIB_SRC) $(PLUGIN_MONOLIB_SRC)</sources>
|
||||
<ldlibs>$(EXTRALIBS_XML)</ldlibs>
|
||||
<ldlibs>$(EXTRALIBS_HTML)</ldlibs>
|
||||
<ldlibs>$(EXTRALIBS_ODBC)</ldlibs>
|
||||
<ldlibs>$(PLUGIN_MONOLIB_EXTRALIBS)</ldlibs>
|
||||
<msvc-headers>$(ALL_HEADERS)</msvc-headers>
|
||||
</dll>
|
||||
|
||||
<lib id="monolib" template="wx_lib"
|
||||
cond="SHARED=='0' and MONOLITHIC=='1'">
|
||||
<define>wxUSE_BASE=1</define>
|
||||
<sources>$(MONOLIB_SRC)</sources>
|
||||
<sources>$(MONOLIB_SRC) $(PLUGIN_MONOLIB_SRC)</sources>
|
||||
<msvc-headers>$(ALL_HEADERS)</msvc-headers>
|
||||
</lib>
|
||||
|
||||
|
@ -79,15 +79,16 @@
|
||||
cond="SHARED=='1' and USE_GUI=='1' and MONOLITHIC=='0'">
|
||||
<define>WXUSINGDLL</define>
|
||||
<define>WXMAKINGDLL_ADV</define>
|
||||
<sources>$(ADVANCED_SRC)</sources>
|
||||
<sources>$(ADVANCED_SRC) $(PLUGIN_ADV_SRC)</sources>
|
||||
<msvc-headers>$(ADVANCED_HDR)</msvc-headers>
|
||||
<library>coredll</library>
|
||||
<library>basedll</library>
|
||||
<ldlibs>$(PLUGIN_ADV_EXTRALIBS)</ldlibs>
|
||||
</dll>
|
||||
|
||||
<lib id="advlib" template="wx_lib"
|
||||
cond="SHARED=='0' and USE_GUI=='1' and MONOLITHIC=='0'">
|
||||
<sources>$(ADVANCED_SRC)</sources>
|
||||
<sources>$(ADVANCED_SRC) $(PLUGIN_ADV_SRC)</sources>
|
||||
<msvc-headers>$(ADVANCED_HDR)</msvc-headers>
|
||||
</lib>
|
||||
|
||||
@ -190,5 +191,5 @@
|
||||
</lib>
|
||||
|
||||
<set var="MSVC6PRJ_MERGED_TARGETS" append="1">xml=xmllib+xmldll</set>
|
||||
|
||||
|
||||
</makefile>
|
||||
|
16
build/bakefiles/plugins.bkl
Normal file
16
build/bakefiles/plugins.bkl
Normal file
@ -0,0 +1,16 @@
|
||||
<?xml version="1.0" ?>
|
||||
<!-- $Id$ -->
|
||||
|
||||
<makefile>
|
||||
|
||||
<!-- ================================================================ -->
|
||||
<!-- Unix audio plugins -->
|
||||
<!-- ================================================================ -->
|
||||
|
||||
<wx-base-plugin id="sound_sdl" cond="WITH_PLUGIN_SDL=='1'">
|
||||
<sources>$(UNIX_SOUND_SRC_SDL)</sources>
|
||||
<ldlibs>$(EXTRALIBS_SDL)</ldlibs>
|
||||
</wx-base-plugin>
|
||||
|
||||
|
||||
</makefile>
|
21
build/bakefiles/plugins_deps.bkl
Normal file
21
build/bakefiles/plugins_deps.bkl
Normal file
@ -0,0 +1,21 @@
|
||||
<?xml version="1.0" ?>
|
||||
<!-- $Id$ -->
|
||||
|
||||
<makefile>
|
||||
|
||||
<!-- Additional dependencies of core libraries if plugins are
|
||||
disabled (these would be deps of the plugins if they were
|
||||
enabled): -->
|
||||
|
||||
<set var="PLUGIN_ADV_EXTRALIBS">
|
||||
<if cond="USE_PLUGINS=='0'">
|
||||
$(EXTRALIBS_SDL)
|
||||
</if>
|
||||
</set>
|
||||
|
||||
|
||||
<!-- monolithic library must link against all this: -->
|
||||
|
||||
<set var="PLUGIN_MONOLIB_EXTRALIBS">$(PLUGIN_ADV_EXTRALIBS)</set>
|
||||
|
||||
</makefile>
|
@ -12,21 +12,22 @@
|
||||
</phony>
|
||||
|
||||
<set var="BUILDING_LIB">1</set>
|
||||
|
||||
|
||||
<!-- common rules, names etc. for wx: -->
|
||||
<include file="common.bkl"/>
|
||||
|
||||
|
||||
<!-- list of files sorted into categories: -->
|
||||
<include file="files.bkl"/>
|
||||
|
||||
|
||||
<!-- wxWindows variant where everything is in one library: -->
|
||||
<include file="monolithic.bkl"/>
|
||||
<!-- ...and when there are multiple libraries: -->
|
||||
<include file="multilib.bkl"/>
|
||||
<!-- OpenGL canvas is built as separate library in both cases: -->
|
||||
<include file="opengl.bkl"/>
|
||||
|
||||
|
||||
<!-- Dynamically loadable plugins: -->
|
||||
<include file="plugins.bkl"/>
|
||||
|
||||
<!-- Samples target (not dependency of 'all'): -->
|
||||
<subproject id="samples">
|
||||
<installable>no</installable>
|
||||
|
@ -43,6 +43,7 @@ EXTRALIBS = {
|
||||
'xml' : '$(EXTRALIBS_XML)',
|
||||
'html' : '$(EXTRALIBS_HTML)',
|
||||
'odbc' : '$(EXTRALIBS_ODBC)',
|
||||
'adv' : '$(PLUGIN_ADV_EXTRALIBS)',
|
||||
}
|
||||
|
||||
def mkLibName(wxid):
|
||||
@ -142,4 +143,4 @@ def headersOnly(files):
|
||||
|
||||
def makeDspDependency(lib):
|
||||
"""Returns suitable entry for <depends-on-dsp> for main libs."""
|
||||
return '%s:$(nativePaths(WXTOPDIR))build\msw\wx_%s.dsp' % (lib,lib)
|
||||
return '%s:$(nativePaths(WXTOPDIR))build\\msw\\wx_%s.dsp' % (lib,lib)
|
||||
|
Loading…
Reference in New Issue
Block a user