aboutsummaryrefslogtreecommitdiff
path: root/backends
diff options
context:
space:
mode:
authorMax Horn2008-09-14 22:24:35 +0000
committerMax Horn2008-09-14 22:24:35 +0000
commitfbfe30bf861af9b83325e0c7fecd4b0a68da5af9 (patch)
tree3c52afb8357cc56b2215d518d9a9cbb2de5cc578 /backends
parenta7076b1f89175b9092ef3962cfe8f4b10ee5b633 (diff)
downloadscummvm-rg350-fbfe30bf861af9b83325e0c7fecd4b0a68da5af9.tar.gz
scummvm-rg350-fbfe30bf861af9b83325e0c7fecd4b0a68da5af9.tar.bz2
scummvm-rg350-fbfe30bf861af9b83325e0c7fecd4b0a68da5af9.zip
DS: Removed legacy GCC 2.x build code (NDS/DevKitPro uses GCC 3 or newer anyway); thinned down INCLUDES some more; added a FIXME to the elf->bin rule
svn-id: r34548
Diffstat (limited to 'backends')
-rw-r--r--backends/platform/ds/arm9/makefile31
-rw-r--r--backends/platform/ds/arm9/source/dsmain.cpp5
2 files changed, 8 insertions, 28 deletions
diff --git a/backends/platform/ds/arm9/makefile b/backends/platform/ds/arm9/makefile
index bcbf8b8bea..cf82090df2 100644
--- a/backends/platform/ds/arm9/makefile
+++ b/backends/platform/ds/arm9/makefile
@@ -187,10 +187,10 @@ endif
LDFLAGS = -specs=ds_arm9.specs -mthumb-interwork -Wl,--wrap,time -mno-fpu -Wl,-Map,map.txt
-INCLUDES= -I./ -I$(portdir)/$(BUILD) -I$(srcdir) -I$(srcdir)/common -I$(portdir)/source \
- -I$(portdir)/data -I$(libndsdir)/include -I$(portdir)/../commoninclude\
- -I$(libndsdir)/include -I$(libndsdir)/include/nds -I$(srcdir)/engines -I$(portdir)/source/mad\
- -I$(portdir)/source/libcartreset -include $(srcdir)/common/scummsys.h
+INCLUDES= -I$(portdir)/$(BUILD) -I$(srcdir) -I$(srcdir)/engines \
+ -I$(portdir)/data -I$(portdir)/../commoninclude \
+ -I$(portdir)/source -I$(portdir)/source/mad -I$(portdir)/source/libcartreset \
+ -I$(libndsdir)/include -include $(srcdir)/common/scummsys.h
LIBS = -lm -L$(libndsdir)/lib -L$(portdir)/lib -lnds9
@@ -338,36 +338,17 @@ endef
##############
# Replacement rule for the one in makefile.common
##############
-ifndef HAVE_GCC3
-# If you use GCC, disable the above and enable this for intelligent
-# dependency tracking.
-#.cpp.o:
-%.o:%.cpp
- $(MKDIR) $(*D)/$(DEPDIR)
- $(CXX) -Wp,-MMD,"$(*D)/$(DEPDIR)/$(*F).d2" $(CXXFLAGS) $(CPPFLAGS) -c $(<) -o $*.o
-# $(ECHO) "$(*D)/" > $(*D)/$(DEPDIR)/$(*F).d
- $(CAT) "$(*D)/$(DEPDIR)/$(*F).d2" >> "$(*D)/$(DEPDIR)/$(*F).d"
- $(RM) "$(*D)/$(DEPDIR)/$(*F).d2"
-else
-# If you even have GCC 3.x, you can use this build rule, which is safer; the above
-# rule can get you into a bad state if you Ctrl-C at the wrong moment.
-# Also, with this GCC inserts additional dummy rules for the involved headers,
-# which ensures a smooth compilation even if said headers become obsolete.
-#.cpp.o:
-%.o:%.cpp
+%.o: %.cpp
# echo !!!!!!!!!!!! $(notdir $<)
# ifeq ( $(notdir $<), $(findstring $(notdir $<), $(OPTLIST)) )
# OPTFLAG=-O3
# else
# OPTFLAG=-Os
# endif
-
# export OPTFLAG = ;
# echo !!!!!!!! $(OPTFLAG)
-
$(MKDIR) $(*D)/$(DEPDIR)
$(CXX) -Wp,-MMD,"$(*D)/$(DEPDIR)/$(*F).d",-MQ,"$@",-MP $(if $(findstring $(notdir $<), $(OPTLIST)), $(OPT_SPEED), $(OPT_SIZE)) $(CXXFLAGS) $(CPPFLAGS) -c $(<) -o $*.o
-endif
#---------------------------------------------------------------------------------
@@ -417,6 +398,7 @@ endif
padbin 16 $(basename $@).ds.gba
#---------------------------------------------------------------------------------
+# FIXME: The following rule hardcodes the input & output filename -- shouldn't it use $< and $@ instead?
%.bin: %.elf
$(OBJCOPY) -S scummvm.elf scummvm-stripped.elf
$(OBJCOPY) -O binary scummvm-stripped.elf scummvm.bin
@@ -424,4 +406,3 @@ endif
#%.o: %.s
# $(MKDIR) $(*D)/$(DEPDIR)
# $(CXX) -Wp,-MMD,"$(*D)/$(DEPDIR)/$(*F).d",-MQ,"$@",-MP $(CXXFLAGS) $(CPPFLAGS) -c $(<) -o $*.o
-
diff --git a/backends/platform/ds/arm9/source/dsmain.cpp b/backends/platform/ds/arm9/source/dsmain.cpp
index f4706807f7..ce22ac8e71 100644
--- a/backends/platform/ds/arm9/source/dsmain.cpp
+++ b/backends/platform/ds/arm9/source/dsmain.cpp
@@ -65,6 +65,7 @@
//#define USE_LIBCARTRESET
#include <nds.h>
+#include <nds/registers_alt.h>
//#include <ARM9/console.h> //basic print funcionality
@@ -75,13 +76,11 @@
#include "icons_raw.h"
#include "fat/gba_nds_fat.h"
#include "fat/disc_io.h"
-#include "common/config-manager.h"
-#include "engines/scumm/scumm.h"
+//#include "common/config-manager.h"
#include "keyboard_raw.h"
#include "keyboard_pal_raw.h"
#define V16(a, b) ((a << 12) | b)
#include "touchkeyboard.h"
-#include "registers_alt.h"
//#include "compact_flash.h"
#include "dsoptions.h"
#ifdef USE_DEBUGGER