[Scummvm-cvs-logs] SF.net SVN: scummvm:[50671] scummvm/trunk/backends/platform/ds

fingolfin at users.sourceforge.net fingolfin at users.sourceforge.net
Mon Jul 5 12:07:07 CEST 2010


Revision: 50671
          http://scummvm.svn.sourceforge.net/scummvm/?rev=50671&view=rev
Author:   fingolfin
Date:     2010-07-05 10:07:06 +0000 (Mon, 05 Jul 2010)

Log Message:
-----------
NDS: Enable compilation of backend specific files

Also tried to enable the conversion of .raw/.pal/.bin files,
but this does not currently work (probably something really
silly, but I don't have the time to debug this right now).

Modified Paths:
--------------
    scummvm/trunk/backends/platform/ds/ds.mk
    scummvm/trunk/backends/platform/ds/module.mk

Modified: scummvm/trunk/backends/platform/ds/ds.mk
===================================================================
--- scummvm/trunk/backends/platform/ds/ds.mk	2010-07-05 10:06:38 UTC (rev 50670)
+++ scummvm/trunk/backends/platform/ds/ds.mk	2010-07-05 10:07:06 UTC (rev 50671)
@@ -18,7 +18,7 @@
 #-mthumb -fno-gcse -fno-schedule-insns2
 
 
-OBJS := $(DATA_OBJS) $(LIBCARTRESET_OBJS) $(PORT_OBJS) $(COMPRESSOR_OBJS) $(FAT_OBJS)
+#OBJS := $(DATA_OBJS) $(LIBCARTRESET_OBJS) $(PORT_OBJS) $(COMPRESSOR_OBJS) $(FAT_OBJS)
 
 
 # TODO: Handle files in OPTLIST.
@@ -99,10 +99,10 @@
 $(ndsdir)/arm7/source/main.o: CPPFLAGS=
 
 # Rule for creating ARM7 .bin files from .elf files
-%.bin: %.elf
-	@echo ------
-	@echo Building $@...
-	$(OBJCOPY) -O binary  $< $@
+#%.bin: %.elf
+#	@echo ------
+#	@echo Building $@...
+#	$(OBJCOPY) -O binary  $< $@
 
 # Rule for creating ARM7 .elf files by linking .o files together with a special linker script
 %.elf:

Modified: scummvm/trunk/backends/platform/ds/module.mk
===================================================================
--- scummvm/trunk/backends/platform/ds/module.mk	2010-07-05 10:06:38 UTC (rev 50670)
+++ scummvm/trunk/backends/platform/ds/module.mk	2010-07-05 10:07:06 UTC (rev 50671)
@@ -59,10 +59,41 @@
 	#arm9/source/libcartreset/cartreset.o
 
 
-MODULE_OBJS :=
+#MODULE_OBJS := $(PORT_OBJS) $(DATA_OBJS) $(FAT_OBJS)
+MODULE_OBJS := $(DATA_OBJS) $(LIBCARTRESET_OBJS) $(PORT_OBJS) $(COMPRESSOR_OBJS) $(FAT_OBJS)
 
 
+#---------------------------------------------------------------------------------
+# canned command sequence for binary data
+#---------------------------------------------------------------------------------
+define bin2o
+	bin2s $< | $(AS) -mthumb -mthumb-interwork -o $(@)
+	echo "extern const u8" `(echo $(<F) | sed -e 's/^\([0-9]\)/_\1/' | tr . _)`"_end[];" > `(echo $(<F) | tr . _)`.h
+	echo "extern const u8" `(echo $(<F) | sed -e 's/^\([0-9]\)/_\1/' | tr . _)`"[];" >> `(echo $(<F) | tr . _)`.h
+	echo "extern const u32" `(echo $(<F) | sed -e 's/^\([0-9]\)/_\1/' | tr . _)`_size";" >> `(echo $(<F) | tr . _)`.h
+endef
 
+#---------------------------------------------------------------------------------
+%.o	:	%.bin
+#---------------------------------------------------------------------------------
+	@echo $(notdir $<)
+	@$(bin2o)
+
+#---------------------------------------------------------------------------------
+%.o	:	%.raw
+#---------------------------------------------------------------------------------
+	@echo $(notdir $<)
+	@$(bin2o)
+
+#---------------------------------------------------------------------------------
+%.o	:	%.pal
+#---------------------------------------------------------------------------------
+	@echo $(notdir $<)
+	@$(bin2o)
+
+
+
+
 # TODO: Should add more dirs to MODULE_DIRS so that "make distclean" can remove .deps dirs.
 MODULE_DIRS += \
 	backends/platform/ds/


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