+ <!-- Get MAJOR and MINOR version numbers -->
+ <set var="WX_VERSION_MAJOR" make_var="1">
+ $(DOLLAR)(shell echo $(DOLLAR)(WX_VERSION) | cut -c1,1)
+ </set>
+ <set var="WX_VERSION_MINOR" make_var="1">
+ $(DOLLAR)(shell echo $(DOLLAR)(WX_VERSION) | cut -c2,2)
+ </set>
+
+
+ <!--
+ Using the GNU format creates a configurable makefile just like
+ a win32 makefile: i.e. a makefile where you can select the wanted
+ wxWidgets build using the WX_* options.
+
+ The difference with win32 makefiles is that WX_PORT, WX_UNICODE and
+ WX_SHARED options have a smart default value which is created using
+ the installed wx-config or the wx-config given using WX_CONFIG option
+ -->
+ <set var="WX_CONFIG_UNICODE_FLAG">
+ <if cond="WX_UNICODE=='0'">--unicode=no</if>
+ <if cond="WX_UNICODE=='1'">--unicode=yes</if>
+ </set>
+ <set var="WX_CONFIG_SHARED_FLAG">
+ <if cond="WX_SHARED=='0'">--static=yes</if>
+ <if cond="WX_SHARED=='1'">--static=no</if>
+ </set>
+ <set var="WX_CONFIG_PORT_FLAG">
+ --toolkit=$(WX_PORT)
+ </set>
+ <set var="WX_CONFIG_VERSION_FLAG">
+ --version=$(WX_VERSION_MAJOR).$(WX_VERSION_MINOR)
+ </set>
+
+ <set var="WX_CONFIG_FLAGS" make_var="1">
+ $(WX_CONFIG_UNICODE_FLAG) $(WX_CONFIG_SHARED_FLAG)
+ $(WX_CONFIG_PORT_FLAG) $(WX_CONFIG_VERSION_FLAG)
+ </set>
+
+ <set var="DEFAULT_CXX">`$(DOLLAR)(WX_CONFIG) --cxx`</set>
+ <set var="WX_CFLAGS">`$(DOLLAR)(WX_CONFIG) --cflags $(WX_CONFIG_FLAGS)`</set>
+ <set var="WX_CXXFLAGS">`$(DOLLAR)(WX_CONFIG) --cxxflags $(WX_CONFIG_FLAGS)`</set>
+ <set var="WX_CPPFLAGS">`$(DOLLAR)(WX_CONFIG) --cppflags $(WX_CONFIG_FLAGS)`</set>
+ <set var="WX_RESCOMP">`$(DOLLAR)(WX_CONFIG) --rescomp $(WX_CONFIG_FLAGS)`</set>
+
+ <!--
+ VERY IMPORTANT: before starting to build all targets of the generated makefile,
+ we need to check if the selected wxWidgets build exists; we do
+ that simply creating the following target; if it fails the make
+ program will halt with the wx-config error message...
+ -->
+ <if cond="WX_TEST_FOR_SELECTED_WXBUILD=='1'">
+ <action id="test_for_selected_wxbuild">
+ <dependency-of>all</dependency-of>
+
+ <!-- Use @ to hide to the user that we're running wx-config... -->
+ <command>@$(DOLLAR)(WX_CONFIG) $(WX_CONFIG_FLAGS)</command>
+ </action>
+ </if>
+
+ <!-- we need these vars but the trick used in the default values above