random warning fixes
[fceu.git] / Makefile.sdl
index e9a2ecf..792ed5d 100644 (file)
@@ -1,10 +1,10 @@
-CROSS  = 
-CC     = $(CROSS)gcc
-STRIP  = $(CROSS)strip
-TFLAGS  = -Winline -Izlib -DLSB_FIRST -DUNIX -DPSS_STYLE=1 -DHAVE_ASPRINTF -DZLIB -DFRAMESKIP -D_REENTRANT `sdl-config --cflags`
+#CROSS_COMPILE =
+CC     = $(CROSS_COMPILE)gcc
+STRIP  = $(CROSS_COMPILE)strip
+TFLAGS  += -Winline -Izlib -DLSB_FIRST -DUNIX -DPSS_STYLE=1 -DHAVE_ASPRINTF -DZLIB -DFRAMESKIP -D_REENTRANT `sdl-config --cflags`
+TFLAGS  += -Wno-pointer-sign -Wno-parentheses
 RM     = rm -f
 C      = drivers/common/
-G      = drivers/gp2x/
 L      = drivers/libpicofe/
 
 DEBUG   = 1
@@ -24,19 +24,16 @@ endif
 
 all:           fceu
 
-gpfce.gpe: fceu
-       cp fceu $@
-
 include zlib/Makefile
 
-OBJDRIVER = drivers/gp2x_test/minimal.o drivers/gp2x_test/throttle.o \
-       ${G}gp2x.o ${G}main.o ${G}gp2x-sound.o ${G}gp2x-video.o \
-       ${G}usbjoy.o ${G}menu.o \
-       ${L}fonts.o ${L}readpng.o ${L}linux/plat.o \
+OBJDRIVER = drivers/sdl/sdl.o drivers/sdl/throttle.o \
+       ${L}fonts.o ${L}readpng.o ${L}input.o ${L}config_file.o ${L}in_sdl.o \
+       ${L}linux/plat.o ${L}linux/sndout_oss.o \
+       ${C}main.o ${C}menu.o ${C}sound-oss.o \
        ${C}cheat.o ${C}config.o ${C}args.o ${C}vidblit.o ${C}unix-netplay.o \
        ${UNZIPOBJS} \
        ppu.o movie.o fceu098.o ppu098.o
-LDRIVER                += -lm -lz -lpng `sdl-config --libs`
+LDRIVER += -lm -lz -lpng `sdl-config --libs`
 
 OBJDRIVER += x6502.o
 
@@ -44,21 +41,18 @@ x6502.o: x6502.c x6502.h ops.h fce.h sound.h dprintf.h
 
 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}rev.h
-${B}throttle.o:         ${B}throttle.c ${B}main.h ${B}throttle.h
+${C}menu.o:            ${C}revision.h
 ppu.o:                 ppu.c ppu.h
 
-${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
+drivers/sdl/sdl.o: ${L}menu.h
+${L}menu.h:
+       @echo "please run: git submodule init; git submodule update"
+       @false
 
+${C}revision.h: FORCE
+       @(git describe || echo) | sed -e 's/.*/#define REV "\0"/' > $@_
+       @diff -q $@_ $@ > /dev/null 2>&1 || cp $@_ $@
+       @rm $@_
 .PHONY: FORCE
 
 include Makefile.common