<using module="wxwin"/>
<include file="config.bkl"/>
-
+
+ <include file="plugins_deps.bkl"/>
<!-- ================================================================== -->
<!-- wxWindows version numbers: -->
<!-- =============================================================== -->
<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)
</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>
</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>
<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"/>
<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>
<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>
wx/joystick.h
wx/laywin.h
wx/sashwin.h
+ wx/sound.h
wx/splash.h
wx/taskbar.h
wx/tipdlg.h
<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>
</set>
+<!-- ====================================================================== -->
+<!-- Misc plugin sources: -->
+<!-- ====================================================================== -->
+
+<set var="UNIX_SOUND_SRC_SDL" hints="files">
+ src/unix/sound_sdl.cpp
+</set>
<!-- ====================================================================== -->
<!-- Define sources for specific libraries: -->
$(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>
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>
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>
</lib>
<set var="MSVC6PRJ_MERGED_TARGETS" append="1">xml=xmllib+xmldll</set>
-
+
</makefile>
--- /dev/null
+<?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>
--- /dev/null
+<?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>
</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>
'xml' : '$(EXTRALIBS_XML)',
'html' : '$(EXTRALIBS_HTML)',
'odbc' : '$(EXTRALIBS_ODBC)',
+ 'adv' : '$(PLUGIN_ADV_EXTRALIBS)',
}
def mkLibName(wxid):
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)