[Scummvm-cvs-logs] SF.net SVN: scummvm: [30749] scummvm/branches/branch-0-11-0/backends/ platform/ds

agent-q at users.sourceforge.net agent-q at users.sourceforge.net
Sun Feb 3 02:02:17 CET 2008


Revision: 30749
          http://scummvm.svn.sourceforge.net/scummvm/?rev=30749&view=rev
Author:   agent-q
Date:     2008-02-02 17:02:16 -0800 (Sat, 02 Feb 2008)

Log Message:
-----------
DS: Applying assorted tidy-up patch submitted by Max

Modified Paths:
--------------
    scummvm/branches/branch-0-11-0/backends/platform/ds/arm7/Makefile
    scummvm/branches/branch-0-11-0/backends/platform/ds/arm7/source/main.cpp
    scummvm/branches/branch-0-11-0/backends/platform/ds/arm9/makefile
    scummvm/branches/branch-0-11-0/backends/platform/ds/arm9/source/gbampsave.h
    scummvm/branches/branch-0-11-0/backends/platform/ds/makefile

Modified: scummvm/branches/branch-0-11-0/backends/platform/ds/arm7/Makefile
===================================================================
--- scummvm/branches/branch-0-11-0/backends/platform/ds/arm7/Makefile	2008-02-02 22:45:31 UTC (rev 30748)
+++ scummvm/branches/branch-0-11-0/backends/platform/ds/arm7/Makefile	2008-02-03 01:02:16 UTC (rev 30749)
@@ -68,7 +68,7 @@
 # list of directories containing libraries, this must be the top level containing
 # include and lib
 #---------------------------------------------------------------------------------
-LIBDIRS	:=	/home/neil/devkitpror21/libnds home/neil/devkitpror21/libnds/nds
+LIBDIRS	:=	$(DEVKITPRO)/libnds $(DEVKITPRO)/libnds/nds
  
  
 #---------------------------------------------------------------------------------
@@ -106,7 +106,7 @@
 export OFILES	:=	$(MAPFILES:.map=.o) $(RAWFILES:.raw=.o) $(PALFILES:.pal=.o) $(BINFILES:.bin=.o) $(PCXFILES:.pcx=.o)\
 					$(CPPFILES:.cpp=.o) $(CFILES:.c=.o) $(SFILES:.s=.o)
  
-export INCLUDE	:=	$(foreach dir,$(INCLUDES),-I$(CURDIR)/$(dir)) -I- -I$(CURDIR)/../commoninclude\
+export INCLUDE	:=	$(foreach dir,$(INCLUDES),-I$(CURDIR)/$(dir)) -Iquote -I$(CURDIR)/../commoninclude\
 					$(foreach dir,$(LIBDIRS),-I$(dir)/include) \
 					$(foreach dir,$(LIBDIRS),-I$(dir)/include/nds)\
 					-I$(CURDIR)/$(BUILD) -I$(CURDIR)/source/libcartreset

Modified: scummvm/branches/branch-0-11-0/backends/platform/ds/arm7/source/main.cpp
===================================================================
--- scummvm/branches/branch-0-11-0/backends/platform/ds/arm7/source/main.cpp	2008-02-02 22:45:31 UTC (rev 30748)
+++ scummvm/branches/branch-0-11-0/backends/platform/ds/arm7/source/main.cpp	2008-02-03 01:02:16 UTC (rev 30749)
@@ -36,7 +36,7 @@
 #include <arm7/clock.h>
 #include <stdlib.h>
 #include <string.h>
-#include <registers_alt.h>
+//#include <registers_alt.h>	// not needed in current libnds
 #include <NDS/scummvm_ipc.h>
 //////////////////////////////////////////////////////////////////////
 #ifdef USE_DEBUGGER
@@ -261,6 +261,9 @@
   REG_SPICNT = SPI_ENABLE | SPI_BAUD_1MHz;
   REG_SPIDATA = enable? (result | data): (result & ~data);
   SerialWaitBusy();
+  
+  // FIXME: This function should either return something, or have a comment
+  // explaining why it is valid for it to not return something. :-)
 }
 
 /*

Modified: scummvm/branches/branch-0-11-0/backends/platform/ds/arm9/makefile
===================================================================
--- scummvm/branches/branch-0-11-0/backends/platform/ds/arm9/makefile	2008-02-02 22:45:31 UTC (rev 30748)
+++ scummvm/branches/branch-0-11-0/backends/platform/ds/arm9/makefile	2008-02-03 01:02:16 UTC (rev 30749)
@@ -1,11 +1,21 @@
+
+DEFINES     := -DHAVE_CONFIG_H
+LDFLAGS     :=
+INCLUDES    := -I. -I$(srcdir) -I$(srcdir)/engines
+LIBS        :=
+OBJS        :=
+DEPDIR      := .deps
+  
+MODULES     :=
+MODULE_DIRS :=
+
 #BUILD_PLUGINS = 1
-#libndsdir = $(DEVKITPRO)/libnds
-libndsdir = /home/neil/devkitpror21/libnds
+libndsdir = $(DEVKITPRO)/libnds
+#libndsdir = /home/neil/devkitpror21/libnds
+  
 
-# Select the build you want by uncommenting one of the following lines:
 
 
-
 ifeq ($(SCUMM_BUILD),a)
         DS_BUILD_A = 1
 endif
@@ -35,6 +45,8 @@
 endif
 
 
+# Select the build you want by uncommenting one of the following lines:
+
 #DS_BUILD_A = 1
 #DS_BUILD_B = 1
 #DS_BUILD_C = 1
@@ -76,7 +88,9 @@
 # NOTE: The header and libs for the debugger is assumed to be in the libnds
 # folder.
 
-VPATH = $(srcdir)
+vpath %.h $(srcdir)
+vpath %.cpp $(srcdir)
+vpath %.s $(srcdir)
 
 # Command to build libmad is:
 # ./configure --host=arm-elf --enable-speed --enable-sso -enable-fpm=arm CFLAGS='-specs=ds_arm9.specs -mthumb-interwork'
@@ -314,11 +328,13 @@
 
 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)/source/compressor -I$(portdir)/source/fat \
-			-I$(srcdir)/backends/fs  -I$(srcdir)/backends/fs/ds -I$(portdir)/data -I$(libndsdir)/include -I$(portdir)/../commoninclude\
-			-I$(srcdir)/scumm -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. -I$(portdir)/$(BUILD) \
+			-I$(srcdir) -I$(srcdir)/engines -I$(srcdir)/common -I$(srcdir)/backends/fs -I$(srcdir)/backends/fs/ds  \
+			-I$(portdir)/source -I$(portdir)/source/compressor -I$(portdir)/source/fat \
+			-I$(portdir)/source/mad -I$(portdir)/source/libcartreset \
+			-I$(portdir)/data -I$(portdir)/../commoninclude \
+			-I$(libndsdir)/include -I$(libndsdir)/include/nds \
+			-include $(srcdir)/common/scummsys.h
 
 LIBS	= -lm -L$(libndsdir)/lib -L$(portdir)/lib -lnds9
 ifdef USE_MAD
@@ -400,11 +416,10 @@
 #-mthumb -fno-gcse -fno-schedule-insns2
 
 
-			
 OBJS := $(DATA_OBJS) $(LIBCARTRESET_OBJS) $(PORT_OBJS) $(COMPRESSOR_OBJS) $(FAT_OBJS) 
-		
 
-		
+
+
 MODULE_DIRS += .
 
 ndsall:
@@ -413,7 +428,8 @@
 
 include $(srcdir)/Makefile.common
 
-clean:
+clean: clean-nds
+clean-nds:
 	$(RM) $(OBJS) $(EXECUTABLE)
 	rm -fr $(BUILD)
 
@@ -462,23 +478,9 @@
 
 ##############
 # Replacement rule for the one in makefile.common
+# FIXME: Why does this compile the source code twice?
 ##############
-ifndef HAVE_GCC3
-# If you use GCC, disable the above and enable this for intelligent
-# dependency tracking. 
 .cpp.o:
-
-	$(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:
 #	echo !!!!!!!!!!!! $(notdir $<)
 #	ifeq ( $(notdir $<), $(findstring $(notdir $<), $(OPTLIST)) )
 #	 OPTFLAG=-O3
@@ -492,9 +494,7 @@
 	$(MKDIR) $(*D)/$(DEPDIR)
 	$(CXX) -Wp,-MMD,"$(*D)/$(DEPDIR)/$(*F).d",-MQ,"$@",-MP $(CXXFLAGS) $(CPPFLAGS) -c $(<) -o $*.o
 	$(CXX) -MMD -MF "$(*D)/$(DEPDIR)/$(*F).d" $(if $(findstring $(notdir $<), $(OPTLIST)), $(OPT_SPEED), $(OPT_SIZE)) $(CXXFLAGS) $(CPPFLAGS) -c $(<) -o $*.o 
-endif
 
-
 #---------------------------------------------------------------------------------
  
 #---------------------------------------------------------------------------------
@@ -534,6 +534,7 @@
 	@$(bin2o)
 
 #---------------------------------------------------------------------------------
+# FIXME: The following rule hardcodes the input filename -- shouldn't it use $< instead?
 %.nds: %.bin
 	@echo ndstool -c $@ -9 scummvm.bin $(ARM7BIN) -b ../../$(LOGO) "$(shell basename $@);ScummVM $(VERSION);DS Port"
 	ndstool -c $@ -9 scummvm.bin $(ARM7BIN) -b ../../$(LOGO) "$(shell basename $@);ScummVM $(VERSION);DS Port"
@@ -542,11 +543,12 @@
 	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
 
-#%.o: %.s
-#	$(MKDIR) $(*D)/$(DEPDIR)
-#	$(CXX) -Wp,-MMD,"$(*D)/$(DEPDIR)/$(*F).d",-MQ,"$@",-MP $(CXXFLAGS) $(CPPFLAGS) -c $(<) -o $*.o
-	
+%.o: %.s
+	$(MKDIR) $(*D)
+	#$(MKDIR) $(*D)/$(DEPDIR)
+	$(AS) $(ASFLAGS) -o  $*.o $<

Modified: scummvm/branches/branch-0-11-0/backends/platform/ds/arm9/source/gbampsave.h
===================================================================
--- scummvm/branches/branch-0-11-0/backends/platform/ds/arm9/source/gbampsave.h	2008-02-02 22:45:31 UTC (rev 30748)
+++ scummvm/branches/branch-0-11-0/backends/platform/ds/arm9/source/gbampsave.h	2008-02-03 01:02:16 UTC (rev 30749)
@@ -24,7 +24,6 @@
 #define _GBAMPSAVE_H_
 
 #include "system.h"
-#include "backends/saves/default/default-saves.h"
 #include "ds-fs.h"
 
 #define SAVE_BUFFER_SIZE 100000

Modified: scummvm/branches/branch-0-11-0/backends/platform/ds/makefile
===================================================================
--- scummvm/branches/branch-0-11-0/backends/platform/ds/makefile	2008-02-02 22:45:31 UTC (rev 30748)
+++ scummvm/branches/branch-0-11-0/backends/platform/ds/makefile	2008-02-03 01:02:16 UTC (rev 30749)
@@ -13,6 +13,7 @@
 
 all:
 	@for i in $(SUBDIRS); do if test -d $$i; then make -C $$i; fi; done;
+
 clean:
 	@for i in $(SUBDIRS); do if test -d $$i; then make -C $$i clean; fi; done;
 


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