patch from Paul Gammans <paul.gammans@brunel.ac.uk> for cross compiling for MSW

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@6559 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2000-03-09 20:18:59 +00:00
parent 7b28757f5e
commit 3283290881
4 changed files with 457 additions and 364 deletions

758
configure vendored

File diff suppressed because it is too large Load Diff

View File

@@ -1319,6 +1319,7 @@ if eval "test $host != $build"; then
AR=$host_alias-ar AR=$host_alias-ar
RANLIB=$host_alias-ranlib RANLIB=$host_alias-ranlib
DLLTOOL=$host_alias-dlltool DLLTOOL=$host_alias-dlltool
RESCOMP=$host_alias-windres
LD=$host_alias-ld LD=$host_alias-ld
NM=$host_alias-nm NM=$host_alias-nm
STRIP=$host_alias-strip STRIP=$host_alias-strip
@@ -1555,6 +1556,11 @@ if test "$wxUSE_CYGWIN" = 1 || test "$wxUSE_MINGW" = 1 ; then
dnl --- This will bloat the executable, but it'll work for now... dnl --- This will bloat the executable, but it'll work for now...
LIBS="$LIBS -lkernel32 -luser32 -lgdi32 -lcomdlg32 -lwinspool -lwinmm -lshell32 -lcomctl32 -lctl3d32 -lcrtdll -ladvapi32 -lwsock32" LIBS="$LIBS -lkernel32 -luser32 -lgdi32 -lcomdlg32 -lwinspool -lwinmm -lshell32 -lcomctl32 -lctl3d32 -lcrtdll -ladvapi32 -lwsock32"
dnl add extra odbc libs if we have compiled in odbc
if test "$wxUSE_ODBC" = "yes" ; then
LIBS="$LIBS -lodbc32 -lole32 -loleaut32"
fi
dnl -mwindows is needed to avoid that spawning of a console window dnl -mwindows is needed to avoid that spawning of a console window
if test "$wxUSE_MINGW" = 1; then if test "$wxUSE_MINGW" = 1; then
LDFLAGS="$LDFLAGS -mwindows" LDFLAGS="$LDFLAGS -mwindows"
@@ -1568,6 +1574,18 @@ if test "$wxUSE_CYGWIN" = 1 || test "$wxUSE_MINGW" = 1 ; then
GENERICOBJS="\$(MSW_GENERICOBJS)" GENERICOBJS="\$(MSW_GENERICOBJS)"
UNIXOBJS= UNIXOBJS=
GUIDIST=MSW_DIST GUIDIST=MSW_DIST
dnl we should calculate these
RCINCSWITCH="--include-dir"
RCDEFSWITCH="--define"
RCPREPROCESSOR="--preprocessor \"\$(CC) -c -E -xc-header -DRC_INVOKED\""
RCINPUTSWITCH="-i"
RCOUTPUTSWITCH="-o"
RESFLAGS="$RCPREPROCESSOR $RCINCSWITCH \$(top_srcdir)/include $RCINCSWITCH \$(top_srcdir)/\$(program_dir) $RCDEFSWITCH __WIN32__ $RCDEFSWITCH __WIN95__ $RCDEFSWITCH __GNUWIN32__"
dnl set optinal RES_PROGRAM_OPT to RES_PROGRAM
RESPROGRAM="\$(RES_PROGRAM)"
fi fi
if test "$wxUSE_GTK" = 1; then if test "$wxUSE_GTK" = 1; then
@@ -3480,8 +3498,15 @@ dnl ---------------------------------------------------------------------------
dnl get the string with OS info - used by wxGetOsDescription() dnl get the string with OS info - used by wxGetOsDescription()
dnl --------------------------------------------------------------------------- dnl ---------------------------------------------------------------------------
if test "$cross_compiling" = "yes"; then
dnl Use best guess from host as we can't use uname when cross compiling
OSINFO="\"$host\""
else
dnl attualy work out OS version
OSINFO=`uname -s -r -m` OSINFO=`uname -s -r -m`
OSINFO="\"$OSINFO\"" OSINFO="\"$OSINFO\""
fi
AC_DEFINE_UNQUOTED(WXWIN_OS_DESCRIPTION, $OSINFO) AC_DEFINE_UNQUOTED(WXWIN_OS_DESCRIPTION, $OSINFO)
dnl --------------------------------------------------------------------------- dnl ---------------------------------------------------------------------------
@@ -3628,6 +3653,21 @@ AC_SUBST(EXTRADEFS)
AC_SUBST(LIBS) AC_SUBST(LIBS)
AC_SUBST(LD_LIBS) AC_SUBST(LD_LIBS)
dnl additional resurces settings
AC_SUBST(RCINPUTSWITCH)
AC_SUBST(RCOUTPUTSWITCH)
AC_SUBST(RESPROGRAM)
AC_SUBST(RESCOMP)
AC_SUBST(RESFLAGS)
dnl These seam to be missing
AC_SUBST(DLLTOOL)
AC_SUBST(AS)
AC_SUBST(NM)
AC_SUBST(LD)
AC_SUBST(MAKEINFO)
dnl MAKE_SET will be replaced with "MAKE=..." or nothing if make sets MAKE dnl MAKE_SET will be replaced with "MAKE=..." or nothing if make sets MAKE
dnl itself (this is macro is required if SUBDIRS variable is used in Makefile.am dnl itself (this is macro is required if SUBDIRS variable is used in Makefile.am
dnl - and we do use it) dnl - and we do use it)

View File

@@ -56,6 +56,10 @@ MAKEINFO = @MAKEINFO@
SHARED_LD = @SHARED_LD@ SHARED_LD = @SHARED_LD@
RESFLAGS = @RESFLAGS@
RESCOMP = @RESCOMP@
DLLTOOL = @DLLTOOL@
########################### Flags ################################# ########################### Flags #################################
# #

View File

@@ -6,6 +6,8 @@
# The binary program extension, if any, including dots (e.g. '.exe') # The binary program extension, if any, including dots (e.g. '.exe')
PROGRAM_EXT = @PROGRAM_EXT@ PROGRAM_EXT = @PROGRAM_EXT@
BIN_PROGRAM = $(PROGRAM)$(PROGRAM_EXT) BIN_PROGRAM = $(PROGRAM)$(PROGRAM_EXT)
RES_PROGRAM = $(PROGRAM)_resources.o
RES_PROGRAM_OPT = @RESPROGRAM@
.c.o : .c.o :
$(CCC) -c $(CFLAGS) -o $@ $< $(CCC) -c $(CFLAGS) -o $@ $<
@@ -26,8 +28,11 @@ include $(top_builddir)/src/make.env
all: $(BIN_PROGRAM) install_dirs install_data all: $(BIN_PROGRAM) install_dirs install_data
$(BIN_PROGRAM): $(OBJECTS) $(top_builddir)/lib/@WX_TARGET_LIBRARY@ $(BIN_PROGRAM): $(OBJECTS) $(top_builddir)/lib/@WX_TARGET_LIBRARY@ $(RES_PROGRAM_OPT)
$(CC) $(LDFLAGS) -o $(BIN_PROGRAM) $(OBJECTS) $(LDLIBS) $(LIBRARIES) $(CC) $(LDFLAGS) -o $(BIN_PROGRAM) $(OBJECTS) $(LDLIBS) $(LIBRARIES) $(RES_PROGRAM_OPT)
$(RES_PROGRAM): $(PROGRAM).rc
$(RESCOMP) $(RCINPUTSWITCH) $(top_srcdir)/$(program_dir)/$(PROGRAM).rc $(RCOUTPUTSWITCH) $(PROGRAM)_resources.o $(RESFLAGS)
install_dirs: install_dirs:
@list='$(DATADIRS)'; for p in $$list; do \ @list='$(DATADIRS)'; for p in $$list; do \
@@ -42,4 +47,4 @@ install_data:
done done
clean: clean:
rm -f $(OBJECTS) $(BIN_PROGRAM) core rm -f $(OBJECTS) $(BIN_PROGRAM) $(RES_PROGRAM) core