smb3 and addams family hacks
[fceu.git] / Makefile.gp2x
index a86f8c5..0b17061 100644 (file)
@@ -23,8 +23,8 @@ asm_6502=1
 
 all:           fceu
 
-gpfce: fceu
-       cp fceu gpfce
+gpfce.gpe: fceu
+       cp fceu $@
 
 include zlib/Makefile
 
@@ -54,15 +54,25 @@ include Makefile.base
 ${B}main.o:            ${B}main.c ${B}main.h ${B}usage.h ${B}input.c
 ${B}gp2x.o:            ${B}gp2x.c ${B}gp2x.h
 ${B}throttle.o:         ${B}throttle.c ${B}main.h ${B}throttle.h
+${B}menu.o:            ${B}rev.h
 ppu.o:                 ppu.c ppu.h
 
-include Makefile.common
+${B}rev.h: FORCE
+       @if [ -f $@ ]; then prevrev=`cat $@`; else prevrev="00"; fi; \
+       if [ "`which svn`" != "" ]; then \
+               rev=`svn update|tail -n 1|sed 's/.*\ \(.*\)\./\1/g'|sed "s/'//g"`; \
+       fi; \
+       if [ "$$rev"  = "" ]; then rev="0"; fi; \
+       if [ "$$rev" != "$$prevrev" ]; then \
+               echo "$$rev" > $@; \
+       fi
+
+.PHONY: FORCE
 
-#x6502.o:      x6502.c x6502.h ops.h fce.h sound.h
-#      $(CC) $(CFLAGS) -finline-limit=60000 -c $< -o $@
+include Makefile.common
 
 up: fceu
-       cp -v fceu /mnt/gp2x/mnt/sd/emus/Gpfce_v02/gpfce
+       cp -v fceu /mnt/gp2x/mnt/sd/emus/gpfce/gpfce
 
 # ----------- release -----------
 ifneq ($(findstring rel,$(MAKECMDGOALS)),)
@@ -71,7 +81,7 @@ $(error need VER)
 endif
 endif
 
-rel: gpfce
-       zip -9 -j Gpfce_v$(VER).zip $^ drivers/gp2x/mmuhack.o out_gp2x/*
+rel: gpfce.gpe
+       zip -9 -j gpfce_v$(VER).zip $^ drivers/gp2x/mmuhack.o