diff options
author | Andre Heider | 2009-08-22 16:30:20 +0000 |
---|---|---|
committer | Andre Heider | 2009-08-22 16:30:20 +0000 |
commit | 523890784502b880b2b06b133135eff96c32fb76 (patch) | |
tree | 8ac159acdf9b324ab6cd799b34d6f35aefca027d | |
parent | c70a8745068095227cac1db6054d55db0a0405ad (diff) | |
download | scummvm-rg350-523890784502b880b2b06b133135eff96c32fb76.tar.gz scummvm-rg350-523890784502b880b2b06b133135eff96c32fb76.tar.bz2 scummvm-rg350-523890784502b880b2b06b133135eff96c32fb76.zip |
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
svn-id: r43657
-rw-r--r-- | Makefile | 2 | ||||
-rw-r--r-- | Makefile.common | 4 | ||||
-rwxr-xr-x | configure | 48 |
3 files changed, 23 insertions, 31 deletions
@@ -68,7 +68,7 @@ config.h config.mk: $(srcdir)/configure 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) diff --git a/Makefile.common b/Makefile.common index 2b00605318..81593edf9d 100644 --- a/Makefile.common +++ b/Makefile.common @@ -67,6 +67,7 @@ ifneq ($(findstring $(MAKEFLAGS),s),s) 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 @@ else $(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 $(<) @@ -29,6 +29,7 @@ SAVED_LDFLAGS=$LDFLAGS SAVED_CXX=$CXX SAVED_CXXFLAGS=$CXXFLAGS SAVED_CPPFLAGS=$CPPFLAGS +SAVED_ASFLAGS=$ASFLAGS # Use environment vars if set CXXFLAGS="$CXXFLAGS $CPPFLAGS" @@ -133,6 +134,7 @@ _nasm=auto _ranlib=ranlib _strip=strip _ar="ar cru" +_as="as" _windres=windres _win32path="C:/scummvm" _aos4path="Games:ScummVM" @@ -631,6 +633,7 @@ Some influential environment variables: 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 @@ EOF done # for parm in ... DEBFLAGS="-g" +DEBFLAGS_AS="-g" for ac_option in $@; do case "$ac_option" in @@ -731,6 +735,7 @@ for ac_option in $@; do ;; --disable-debug) DEBFLAGS="" + DEBFLAGS_AS="" ;; --enable-Werror) CXXFLAGS="$CXXFLAGS -Werror" @@ -790,6 +795,7 @@ for ac_option in $@; do done; CXXFLAGS="$CXXFLAGS $DEBFLAGS" +ASFLAGS="$ASFLAGS $DEBFLAGS_AS" guessed_host=`$_srcdir/config.guess` get_system_exe_extension $guessed_host @@ -886,6 +892,13 @@ esac 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 @@ if test -n "$_host"; then 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 @@ if test -n "$_host"; then 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 @@ if test -n "$_host"; then 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 @@ if test -n "$_host"; then 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 @@ if test -n "$_host"; then 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 @@ if test -n "$_host"; then 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 @@ if test -n "$_host"; then 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 @@ if test -n "$_host"; then _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 @@ if test -n "$_host"; then 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 @@ if test -n "$_host"; then 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 @@ if test -n "$_host"; then 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 @@ RANLIB := $_ranlib STRIP := $_strip AR := $_ar AS := $_as +ASFLAGS := $ASFLAGS WINDRES := $_windres WIN32PATH=$_win32path AOS4PATH=$_aos4path @@ -2375,6 +2362,7 @@ SAVED_LDFLAGS := $SAVED_LDFLAGS SAVED_CXX := $SAVED_CXX SAVED_CXXFLAGS := $SAVED_CXXFLAGS SAVED_CPPFLAGS := $SAVED_CPPFLAGS +SAVED_ASFLAGS := $SAVED_ASFLAGS EOF # |