better way of dealing with EXTRALIBS_xxx

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@23457 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Václav Slavík
2003-09-09 22:15:25 +00:00
parent 39d85e3caa
commit 22cef5668d
24 changed files with 248 additions and 218 deletions

View File

@@ -486,6 +486,7 @@ $(TAB)copy "$(DOLLAR)(InputPath)" $(SETUPHDIR)\wx\setup.h
<!-- Link against one wxWin library. Value must be literal! -->
<define-tag name="wx-lib" rules="exe,dll,module">
<sys-lib>$(wxwin.libToLink(value))</sys-lib>
<ldlibs>$(wxwin.extraLdflags(value))</ldlibs>
<if cond="FORMAT=='msvc6prj' and MONOLITHIC=='0'">
<depends-on-dsp>$(wxwin.makeDspDependency(value))</depends-on-dsp>
</if>

View File

@@ -199,11 +199,15 @@ it if SHARED=1 unless you know what you are doing.
<set var="TOOLKIT_LOWERCASE">$(TOOLKIT.lower())</set>
<set var="TOOLKIT_VERSION"/>
<set var="HOST_SUFFIX"/>
<set var="EXTRACFLAGS"/>
<set var="EXTRALIBS"/>
<set var="EXTRALIBS_XML"/>
<set var="EXTRALIBS_ODBC"/>
<set var="EXTRALIBS_GUI"/>
<set var="EXTRACFLAGS"/>
<set var="EXTRALIBS_OPENGL">
<if cond="COMPILER=='wat'">opengl32.lib glu32.lib</if>
<if cond="COMPILER=='gcc'">-lopengl32 -lglu32</if>
</set>
<set var="SRCDIR">
<if cond="BUILDING_LIB=='1'">..$(DIRSEP)..</if>

View File

@@ -29,16 +29,7 @@
<!-- link against the wxWin library in monolithic build: -->
<sys-lib>$(WXLIB_MONO)</sys-lib>
<if cond="FORMAT=='autoconf'">
<ldflags>$(EXTRALIBS_OPENGL)</ldflags>
</if>
<!-- system libraries on windows: -->
<if cond="FORMAT!='autoconf'">
<if cond="COMPILER=='wat' or COMPILER=='gcc'">
<sys-lib>opengl32</sys-lib>
<sys-lib>glu32</sys-lib>
</if>
</if>
<ldlibs>$(EXTRALIBS_OPENGL)</ldlibs>
</dll>
<lib id="gllib" template="wx_lib"

View File

@@ -37,6 +37,12 @@ MAIN_LIBS = ['mono', 'base', 'core', 'adv', 'html', 'xml', 'net',
# List of library names/ids for categories with different names:
LIBS_NOGUI = ['xml', 'net', 'odbc']
LIBS_GUI = ['core', 'adv', 'html', 'gl', 'dbgrid']
# Additional libraries that must be linked in:
EXTRALIBS = {
'gl' : '$(EXTRALIBS_OPENGL)',
'xml' : '$(EXTRALIBS_XML)',
'odbc' : '$(EXTRALIBS_ODBC)',
}
def mkLibName(wxid):
"""Returns string that can be used as library name, including name
@@ -75,6 +81,11 @@ def libToLink(wxlibname):
else:
return mkLibName(wxlibname)
def extraLdflags(wxlibname):
if wxlibname in EXTRALIBS:
return EXTRALIBS[wxlibname]
else:
return ''
wxVersion = None
VERSION_FILE = '../../include/wx/version.h'