</template>
<template id="wx_sample" template="wx_util">
- <ldflags>$(SAMPLES_RPATH_FLAG)</ldflags>
+ <if cond="FORMAT=='autoconf'">
+ <ldflags>$(SAMPLES_RPATH_FLAG)</ldflags>
+ <__command>$(LF)$(SAMPLES_RPATH_POSTLINK)</__command>
+ </if>
</template>
<template id="wx_sample_console" template="wx_util_console">
- <ldflags>$(SAMPLES_RPATH_FLAG)</ldflags>
+ <if cond="FORMAT=='autoconf'">
+ <ldflags>$(SAMPLES_RPATH_FLAG)</ldflags>
+ <__command>$(SAMPLES_RPATH_POSTLINK)</__command>
+ </if>
</template>
<option name="EXTRALIBS_ODBC"/>
<option name="EXTRALIBS_GUI"/>
<option name="EXTRALIBS_OPENGL"/>
- <option name="SAMPLES_RPATH_FLAG"/>
<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="TOOLKIT">MSW</set>
<set var="TOOLKIT_LOWERCASE">$(TOOLKIT.lower())</set>
<set var="TOOLKIT_VERSION"/>
- <set var="SAMPLES_RPATH_FLAG"/>
<set var="HOST_SUFFIX"/>
<set var="EXTRALIBS"/>
<set var="EXTRALIBS_XML"/>
case "${host}" in
*-*-linux* | *-*-gnu* )
SAMPLES_RPATH_FLAG="-Wl,-rpath,\$(top_builddir)lib"
- SAMPLES_RPATH_POSTLINK="\"libnames=\`cd \$(LIBDIRNAME) ; ls -1 | grep '\.so\.[0-9][0-9]*\$'\` ; \\\\
-inst_cmd='install_name_tool ' ; \\\\
-for i in \$libnames ; do \\\\
- inst_cmd=\"\$inst_cmd -change \$(prefix)/lib/\\$i \$(LIBDIRNAME)/\\$i\" ; \\\\
-done ; \\\\
-echo \$inst_cmd\""
-
- ;;
*-*-solaris2* )
if test "$GCC" = yes ; then
;;
powerpc-*-darwin* )
- SAMPLES_RPATH_POSTLINK="libnames=\`cd \$(LIBDIRNAME) ; ls -1 | grep '\.so\.0-90-9*\$'\` ; \\
-inst_cmd='install_name_tool ' ; \\
-for i in \$libnames ; do \\
- inst_cmd=\"\$inst_cmd -change \$(prefix)/lib/\\$i \$(LIBDIRNAME)/\\$i\" ; \\
-done ; \\
-echo \$inst_cmd "
+ SAMPLES_RPATH_POSTLINK="\$(top_builddir)change-install-names \$(LIBDIRNAME) \$(prefix) \$@"
+ cat <<EOF >change-install-names
+#!/bin/sh
+libnames=\`cd \${1} ; ls -1 | grep '\.[0-9][0-9]*\.dylib\$'\`
+inst_cmd="install_name_tool "
+for i in \${libnames} ; do
+ inst_cmd="\${inst_cmd} -change \${2}/lib/\${i} \${1}/\${i}"
+done
+\${inst_cmd} \${3}
+EOF
+ chmod +x change-install-names
;;
esac
PROGRAM_EXT=
SO_SUFFIX=so
SAMPLES_RPATH_FLAG=
+SAMPLES_RPATH_POSTLINK=
dnl to support a new system, you need to add its canonical name (as determined
dnl by config.sub or specified by the configure command line) to this "case"
case "${host}" in
*-*-linux* | *-*-gnu* )
SAMPLES_RPATH_FLAG="-Wl,-rpath,\$(top_builddir)lib"
- ;;
*-*-solaris2* )
if test "$GCC" = yes ; then
SAMPLES_RPATH_FLAG="-R\$(top_builddir)lib"
fi
;;
+
+ powerpc-*-darwin* )
+ SAMPLES_RPATH_POSTLINK="\$(top_builddir)change-install-names \$(LIBDIRNAME) \$(prefix) \$@"
+ cat <<EOF >change-install-names
+#!/bin/sh
+libnames=\`cd \${1} ; ls -1 | grep '\.[[0-9]][[0-9]]*\.dylib\$'\`
+inst_cmd="install_name_tool "
+for i in \${libnames} ; do
+ inst_cmd="\${inst_cmd} -change \${2}/lib/\${i} \${1}/\${i}"
+done
+\${inst_cmd} \${3}
+EOF
+ chmod +x change-install-names
+ ;;
+
esac
dnl set target to shared if not explicitly chose static before
AC_SUBST(TOOLKIT_LOWERCASE)
AC_SUBST(TOOLKIT_VERSION)
AC_SUBST(SAMPLES_RPATH_FLAG)
+AC_SUBST(SAMPLES_RPATH_POSTLINK)
AC_SUBST(HOST_SUFFIX)
AC_BAKEFILE
LDFLAGS_GUI = @LDFLAGS_GUI@
RESCOMP = @RESCOMP@
SAMPLES_RPATH_FLAG = @SAMPLES_RPATH_FLAG@
+SAMPLES_RPATH_POSTLINK = @SAMPLES_RPATH_POSTLINK@
SETFILE = @SETFILE@
TOOLCHAIN_NAME = @TOOLCHAIN_NAME@
TOOLKIT = @TOOLKIT@
all: minimal$(EXEEXT)
clean:
- rm -rf ./.deps
+ rm -rf ./.deps ./.pch
rm -f ./*.o
rm -f minimal$(EXEEXT)
distclean: clean
- rm -f configure config.cache config.log config.status
- rm -f bk-deps shared-ld-sh
+ rm -f configure config.cache config.log config.status bk-deps bk-make-pch shared-ld-sh Makefile
install: all
$(CXX) -o $@ $(MINIMAL_OBJECTS) $(LDFLAGS) -L$(LIBDIRNAME) $(LDFLAGS_GUI) $(SAMPLES_RPATH_FLAG) $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) $(__LIB_ZLIB_p) $(__LIB_ODBC_p) $(__LIB_REGEX_p) $(__LIB_EXPAT_p) $(EXTRALIBS) $(EXTRALIBS_GUI)
$(__minimal___mac_rezcmd)
$(__minimal___mac_setfilecmd)
+ $(SAMPLES_RPATH_POSTLINK)
minimal_minimal.o: $(srcdir)/minimal.cpp
$(CXXC) -c -o $@ $(MINIMAL_CXXFLAGS) $<