[Scummvm-cvs-logs] SF.net SVN: scummvm:[43657] scummvm/trunk
dhewg at users.sourceforge.net
dhewg at users.sourceforge.net
Sat Aug 22 18:30:20 CEST 2009
Revision: 43657
http://scummvm.svn.sourceforge.net/scummvm/?rev=43657&view=rev
Author: dhewg
Date: 2009-08-22 16:30:20 +0000 (Sat, 22 Aug 2009)
Log Message:
-----------
configure support for AS and ASFLAGS, and .s files in Makefile. If a port has set _host_alias, default to the default GNU tools ranlib, strip, ar, as and windres
Modified Paths:
--------------
scummvm/trunk/Makefile
scummvm/trunk/Makefile.common
scummvm/trunk/configure
Modified: scummvm/trunk/Makefile
===================================================================
--- scummvm/trunk/Makefile 2009-08-22 16:23:59 UTC (rev 43656)
+++ scummvm/trunk/Makefile 2009-08-22 16:30:20 UTC (rev 43657)
@@ -68,7 +68,7 @@
ifeq "$(findstring config.mk,$(MAKEFILE_LIST))" "config.mk"
@echo "Running $(srcdir)/configure with the last specified parameters"
@sleep 2
- LDFLAGS="$(SAVED_LDFLAGS)" CXX="$(SAVED_CXX)" CXXFLAGS="$(SAVED_CXXFLAGS)" CPPFLAGS="$(SAVED_CPPFLAGS)" \
+ LDFLAGS="$(SAVED_LDFLAGS)" CXX="$(SAVED_CXX)" CXXFLAGS="$(SAVED_CXXFLAGS)" CPPFLAGS="$(SAVED_CPPFLAGS)" ASFLAGS="$(SAVED_ASFLAGS)" \
$(srcdir)/configure $(SAVED_CONFIGFLAGS)
else
$(error You need to run $(srcdir)/configure before you can run make. Check $(srcdir)/configure --help for a list of parameters)
Modified: scummvm/trunk/Makefile.common
===================================================================
--- scummvm/trunk/Makefile.common 2009-08-22 16:23:59 UTC (rev 43656)
+++ scummvm/trunk/Makefile.common 2009-08-22 16:30:20 UTC (rev 43657)
@@ -67,6 +67,7 @@
ifneq ($(VERBOSE_BUILD),1)
ifneq ($(VERBOSE_BUILD),yes)
QUIET_CXX = @echo ' ' C++ ' ' $@;
+QUIET_AS = @echo ' ' AS ' ' $@;
QUIET_NASM = @echo ' ' NASM ' ' $@;
QUIET_AR = @echo ' ' AR ' ' $@;
QUIET_RANLIB = @echo ' ' RANLIB ' ' $@;
@@ -116,6 +117,9 @@
$(QUIET_CXX)$(CXX) -Wp,-MMD,"$(*D)/$(DEPDIR)/$(*F).d",-MQ,"$@",-MP $(OBJCFLAGS) -c $(<) -o $*.o
endif
+%.o: %.s
+ $(QUIET_AS)$(AS) $(ASFLAGS) $(<) -o $*.o
+
ifdef HAVE_NASM
%.o: %.asm
$(QUIET_NASM)$(NASM) -O1 $(NASMFLAGS) -g -o $*.o $(<)
Modified: scummvm/trunk/configure
===================================================================
--- scummvm/trunk/configure 2009-08-22 16:23:59 UTC (rev 43656)
+++ scummvm/trunk/configure 2009-08-22 16:30:20 UTC (rev 43657)
@@ -29,6 +29,7 @@
SAVED_CXX=$CXX
SAVED_CXXFLAGS=$CXXFLAGS
SAVED_CPPFLAGS=$CPPFLAGS
+SAVED_ASFLAGS=$ASFLAGS
# Use environment vars if set
CXXFLAGS="$CXXFLAGS $CPPFLAGS"
@@ -133,6 +134,7 @@
_ranlib=ranlib
_strip=strip
_ar="ar cru"
+_as="as"
_windres=windres
_win32path="C:/scummvm"
_aos4path="Games:ScummVM"
@@ -631,6 +633,7 @@
CXXFLAGS C++ compiler flags
CPPFLAGS C++ preprocessor flags, e.g. -I<include dir> if you have
headers in a nonstandard directory <include dir>
+ ASFLAGS assembler flags
EOF
exit 0
@@ -638,6 +641,7 @@
done # for parm in ...
DEBFLAGS="-g"
+DEBFLAGS_AS="-g"
for ac_option in $@; do
case "$ac_option" in
@@ -731,6 +735,7 @@
;;
--disable-debug)
DEBFLAGS=""
+ DEBFLAGS_AS=""
;;
--enable-Werror)
CXXFLAGS="$CXXFLAGS -Werror"
@@ -790,6 +795,7 @@
done;
CXXFLAGS="$CXXFLAGS $DEBFLAGS"
+ASFLAGS="$ASFLAGS $DEBFLAGS_AS"
guessed_host=`$_srcdir/config.guess`
get_system_exe_extension $guessed_host
@@ -886,6 +892,13 @@
if test -z "$_host_alias"; then
_host_alias="$_host_cpu-$_host_os"
+else
+ # if _host_alias was set, default to the standard GNU tools
+ _ranlib=$_host_alias-ranlib
+ _strip=$_host_alias-strip
+ _ar="$_host_alias-ar cru"
+ _as="$_host_alias-as"
+ _windres=$_host_alias-windres
fi
#
@@ -1236,6 +1249,7 @@
echo "Cross-compiling to $_host, forcing endianness, alignment and type sizes"
DEFINES="$DEFINES -DUNIX -DMOTOEZX -DUSE_ARM_SMUSH_ASM"
#not true for all ARM systems, but the interesting ones are all LE. Most (if not all) BE arm devices don't have a screen
+ ASFLAGS="$ASFLAGS -mfpu=vfp"
_endian=little
_need_memalign=yes
type_1_byte='char'
@@ -1243,16 +1257,13 @@
type_4_byte='int'
add_line_to_config_mk 'USE_ARM_SOUND_ASM = 1'
add_line_to_config_mk 'USE_ARM_SMUSH_ASM = 1'
- _ar="$_host_alias-ar cru"
- _as="$_host_alias-as -mfpu=vfp"
- _ranlib=$_host_alias-ranlib
- _strip=$_host_alias-strip
_backend="linuxmoto"
;;
motomagx)
echo "Cross-compiling to $_host, forcing endianness, alignment and type sizes"
DEFINES="$DEFINES -DUNIX -DMOTOMAGX -DUSE_ARM_SMUSH_ASM"
#not true for all ARM systems, but the interesting ones are all LE. Most (if not all) BE arm devices don't have a screen
+ ASFLAGS="$ASFLAGS -mfpu=vfp"
_endian=little
_need_memalign=yes
type_1_byte='char'
@@ -1260,10 +1271,6 @@
type_4_byte='int'
add_line_to_config_mk 'USE_ARM_SOUND_ASM = 1'
add_line_to_config_mk 'USE_ARM_SMUSH_ASM = 1'
- _ar="$_host_alias-ar cru"
- _as="$_host_alias-as -mfpu=vfp"
- _ranlib=$_host_alias-ranlib
- _strip=$_host_alias-strip
_backend="linuxmoto"
;;
bfin*)
@@ -1283,8 +1290,6 @@
type_1_byte='char'
type_2_byte='short'
type_4_byte='int'
- _ar="$_host_alias-ar cru"
- _ranlib=$_host_alias-ranlib
add_line_to_config_mk 'USE_ARM_SOUND_ASM = 1'
add_line_to_config_mk 'USE_ARM_SMUSH_ASM = 1'
add_line_to_config_mk 'USE_ARM_GFX_ASM = 1'
@@ -1298,14 +1303,13 @@
echo "Cross-compiling to $_host, forcing endianness, alignment and type sizes"
DEFINES="$DEFINES -DUNIX -DGP2X -DNDEBUG -DUSE_ARM_SMUSH_ASM -DUSE_ARM_GFX_ASM -DUSE_ARM_SCALER_ASM -DUSE_ARM_COSTUME_ASM"
CXXFLAGS="$CXXFLAGS -march=armv4t"
+ ASFLAGS="$ASFLAGS -mfloat-abi=soft"
LDFLAGS="$LDFLAGS -static"
_endian=little
_need_memalign=yes
type_1_byte='char'
type_2_byte='short'
type_4_byte='int'
- _ar="$_host_alias-ar cru"
- _ranlib=$_host_alias-ranlib
add_line_to_config_mk 'USE_ARM_SOUND_ASM = 1'
add_line_to_config_mk 'USE_ARM_SMUSH_ASM = 1'
add_line_to_config_mk 'USE_ARM_GFX_ASM = 1'
@@ -1370,9 +1374,6 @@
add_line_to_config_mk 'USE_ARM_SMUSH_ASM = 1'
_backend="iphone"
_build_hq_scalers="no"
- _ar="$_host_alias-ar cru"
- _ranlib=$_host_alias-ranlib
- _strip=$_host_alias-strip
;;
wince)
echo "Cross-compiling to $_host, forcing endianness, alignment and type sizes"
@@ -1389,10 +1390,6 @@
add_line_to_config_mk 'USE_ARM_COSTUME_ASM = 1'
add_line_to_config_mk 'USE_ARM_SCALER_ASM = 1'
_backend="wince"
- _ar="$_host_alias-ar cru"
- _ranlib=$_host_alias-ranlib
- _strip=$_host_alias-strip
- _windres=$_host_alias-windres
_mt32emu="no"
add_line_to_config_mk 'include $(srcdir)/backends/platform/wince/wince.mk'
;;
@@ -1410,8 +1407,6 @@
_build_hq_scalers="no"
_mad="yes"
_zlib="yes"
- _ar="$_host_alias-ar cru"
- _ranlib=$_host_alias-ranlib
add_line_to_config_mk 'include $(srcdir)/backends/platform/dc/dreamcast.mk'
;;
wii)
@@ -1421,9 +1416,6 @@
type_1_byte='char'
type_2_byte='short'
type_4_byte='int'
- _ar="$_host_alias-ar cru"
- _ranlib=$_host_alias-ranlib
- _strip=$_host_alias-strip
_backend="wii"
_build_hq_scalers="no"
add_line_to_config_mk 'GAMECUBE = 0'
@@ -1441,9 +1433,6 @@
type_1_byte='char'
type_2_byte='short'
type_4_byte='int'
- _ar="$_host_alias-ar cru"
- _ranlib=$_host_alias-ranlib
- _strip=$_host_alias-strip
_backend="wii"
_build_hq_scalers="no"
_mt32emu="no"
@@ -1479,9 +1468,6 @@
type_1_byte='char'
type_2_byte='short'
type_4_byte='int'
- _ar="$_host_alias-ar cru"
- _ranlib=$_host_alias-ranlib
- _strip=$_host_alias-strip
_backend="psp"
_build_scalers="no"
_build_hq_scalers="no"
@@ -2343,6 +2329,7 @@
STRIP := $_strip
AR := $_ar
AS := $_as
+ASFLAGS := $ASFLAGS
WINDRES := $_windres
WIN32PATH=$_win32path
AOS4PATH=$_aos4path
@@ -2375,6 +2362,7 @@
SAVED_CXX := $SAVED_CXX
SAVED_CXXFLAGS := $SAVED_CXXFLAGS
SAVED_CPPFLAGS := $SAVED_CPPFLAGS
+SAVED_ASFLAGS := $SAVED_ASFLAGS
EOF
#
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Scummvm-git-logs
mailing list