-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
-Makefile for Wiz updated -Makefile for Cygwin Win32 renamed
- Loading branch information
Showing
3 changed files
with
535 additions
and
268 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,267 @@ | ||
#ZSNES_FX=1 | ||
#ASMCPU=1 | ||
#SPC700ASM=1 | ||
#NETPLAY=1 | ||
UNZIP=1 | ||
#GLIDE=1 | ||
#OPENGL=1 | ||
#THREAD_SOUND=1 | ||
CHEATS=1 | ||
#ASMKREED=1 | ||
#ZSNESC4=1 | ||
|
||
ifdef ZSNESFX | ||
FXOBJ=i386/fxemu2b.o i386/fxemu2.o i386/fxemu2c.o i386/fxtable.o i386/sfxproc.o i386/zsnes.o | ||
FXDEFINES=-DZSNES_FX -DEXECUTE_SUPERFX_PER_LINE | ||
FXDEPENDS=zsnes_fx | ||
FXNO_DEPENDS=c_fx | ||
else | ||
FXOBJ=fxinst.o fxemu.o fxdbg.o | ||
FXDEFINES=-DEXECUTE_SUPERFX_PER_LINE | ||
FXDEPENDS=c_fx | ||
FXNO_DEPENDS=zsnes_fx | ||
endif | ||
|
||
ifdef SPC700ASM | ||
SOUNDOBJ=spctool/spc700.o spctool/dsp.o spctool.o spctool/soundmod.o spc.o | ||
SOUNDDEFINES=-DSPCTOOL | ||
else | ||
SOUNDOBJ=spc700.o soundux.o apu.o | ||
#spc_decode.o | ||
SOUNDDEFINES=-DSPC700_C | ||
endif | ||
|
||
ifdef ASMCPU | ||
CPUOBJ=i386/cpuops.o i386/cpuexec.o i386/sa1ops.o | ||
else | ||
CPUOBJ=cpuops.o cpuexec.o | ||
endif | ||
|
||
ifdef ASMKREED | ||
KREEDOBJ=i386/2xSaImmx.o i386/bilinear.o 2xsai.o | ||
KREEDDEFINES=-DMMX | ||
else | ||
KREEDOBJ=2xsai.o | ||
KREEDDEFINES= | ||
endif | ||
|
||
ifdef ZSNESC4 | ||
C4OBJ=i386/C4.O i386/zsnesc4.o c4.o | ||
C4DEFINES=-DZSNES_C4 | ||
C4DEPENDS=zsnes_c4 | ||
C4NO_DEPENDS=c_c4 | ||
else | ||
C4OBJ=c4.o c4emu.o | ||
C4DEFINES= | ||
C4DEPENDS=c_c4 | ||
C4NO_DEPENDS=zsnes_c4 | ||
endif | ||
|
||
ifdef CHEATS | ||
CHEAT=cheats.o cheats2.o | ||
CHEATDEFINES=-DCHEATS | ||
endif | ||
|
||
OBJECTS=$(CPUOBJ) $(FXOBJ) $(C4OBJ) $(CHEAT) \ | ||
cpu.o tile.o gfx.o clip.o \ | ||
memmap.o ppu.o dma.o unix/menu.o unix/unix.o \ | ||
$(SOUNDOBJ) unix/svga.o \ | ||
sdd1.o sdd1emu.o dsp1.o sa1.o sa1cpu.o obc1.o \ | ||
snes9x.o snapshot.o data.o globals.o \ | ||
$(KREEDOBJ) | ||
|
||
ifdef NETPLAY | ||
OBJECTS += netplay.o server.o | ||
NETPLAYDEFINES=-DNETPLAY_SUPPORT | ||
endif | ||
|
||
ifdef UNZIP | ||
OBJECTS += loadzip.o unzip/unzip.o unzip/explode.o unzip/unreduce.o \ | ||
unzip/unshrink.o | ||
UNZIPDEFINES=-DUNZIP_SUPPORT | ||
endif | ||
|
||
ifdef THREAD_SOUND | ||
CPUDEFINES += -DUSE_THREADS | ||
EXTRALIBS += -lpthread | ||
endif | ||
|
||
ifdef GLIDE | ||
GLIDEOBJS = unix/glide.o | ||
GLIDEDEFINES = -DUSE_GLIDE | ||
GLIDELIBS = -lglide2x | ||
GLIDEDEPENDS=use_glide | ||
GLIDENO_DEPENDS=no_glide | ||
else | ||
GLIDEDEPENDS=no_glide | ||
GLIDENO_DEPENDS=use_glide | ||
endif | ||
|
||
ifdef OPENGL | ||
OPENGLOBJS = unix/opengl.o | ||
OPENGLDEFINES = -DUSE_OPENGL | ||
OPENGLLIBS = -lGL -lGLU -ldl | ||
OPENGLDEPENDS=use_opengl | ||
OPENGLNO_DEPENDS=no_opengl | ||
else | ||
OPENGLDEPENDS=no_opengl | ||
OPENGLNO_DEPENDS=use_opengl | ||
endif | ||
|
||
TOOLCHAINDIR := /gcc-4.2.4-glibc-2.7-eabi | ||
BINPATH := ${TOOLCHAINDIR}/bin | ||
|
||
ARCH := arm-gph-linux-gnueabi | ||
|
||
CCC := ${BINPATH}/$(ARCH)-g++ | ||
CC := ${BINPATH}/$(ARCH)-gcc | ||
STRIP := ${BINPATH}/$(ARCH)-strip | ||
AS := ${BINPATH}/$(ARCH)-as | ||
GASM := ${BINPATH}/$(ARCH)-g++ | ||
|
||
OPTIMISE = -mcpu=arm926ej-s -mtune=arm926ej-s -g -I. -I$(TOOLCHAINDIR)/$(ARCH)/include -O3 -D_ZAURUS -DUSE_SA1 | ||
OPTIMISE += -ffast-math -fexpensive-optimizations -finline -finline-functions -falign-functions=32 -falign-loops -falign-labels -falign-jumps -fomit-frame-pointer | ||
|
||
CCFLAGS = $(OPTIMISE) \ | ||
-I. \ | ||
-Iunzip \ | ||
-Isdl \ | ||
-D__linux \ | ||
-DZLIB \ | ||
-DVAR_CYCLES \ | ||
-DCPU_SHUTDOWN \ | ||
-DSPC700_SHUTDOWN \ | ||
$(FXDEFINES) \ | ||
$(C4DEFINES) \ | ||
$(CPUDEFINES) \ | ||
$(SOUNDDEFINES) \ | ||
$(NETPLAYDEFINES) \ | ||
$(UNZIPDEFINES) \ | ||
$(GLIDEDEFINES) \ | ||
$(OPENGLDEFINES) \ | ||
$(GUIDEFINES) \ | ||
$(KREEDDEFINES) \ | ||
$(CHEATDEFINES) \ | ||
|
||
CFLAGS = $(CCFLAGS) | ||
LDLIBS = -L$(TOOLCHAINDIR)/$(ARCH)/lib | ||
|
||
# SDL | ||
CFLAGS += $(shell $(BINPATH)/sdl-config --cflags) -I$(TOOLCHAINDIR)/$(ARCH)/include/SDL | ||
LDLIBS += $(shell $(BINPATH)/sdl-config --libs) -lSDL | ||
|
||
#------------------------------------------------------------------------------------------- | ||
|
||
.SUFFIXES: .o .cpp .c .cc .h .m .i .S .asm .obj | ||
|
||
ifdef GLIDE | ||
all: offsets gsnes9x | ||
else | ||
ifdef OPENGL | ||
all: offsets osnes9x | ||
else | ||
all: Snes9x4C.gpe | ||
endif | ||
endif | ||
|
||
$(FXDEPENDS): | ||
touch $(FXDEPENDS) | ||
$(RM) $(FXNO_DEPENDS) | ||
|
||
$(C4DEPENDS): | ||
touch $(C4DEPENDS) | ||
$(RM) $(C4_NODEPENDS) | ||
|
||
$(GLIDEDEPENDS): | ||
touch $(GLIDEDEPENDS) | ||
$(RM) $(GLIDENO_DEPENDS) | ||
|
||
$(OPENGLDEPENDS): | ||
touch $(OPENGLDEPENDS) | ||
$(RM) $(OPENGLNO_DEPENDS) | ||
|
||
Snes9x4C.gpe: $(OBJECTS) | ||
$(CC) -o $@ $(OBJECTS) $(EXTRALIBS) $(LDLIBS) -lstdc++ -lz -lpthread -lm -lgcov | ||
$(STRIP) Snes9x4C.gpe | ||
|
||
.cpp.o: | ||
$(CCC) -c $(CCFLAGS) $*.cpp -o $@ | ||
|
||
.c.o: | ||
$(CC) -c $(CCFLAGS) $*.c -o $@ | ||
|
||
.cpp.S: | ||
$(CCC) -S $(CCFLAGS) $*.cpp -o $@ | ||
|
||
.cpp.i: | ||
$(CCC) -E $(CCFLAGS) $*.cpp -o $@ | ||
|
||
.S.o: | ||
$(CCC) -c $(CCFLAGS) $*.S -o $@ | ||
|
||
.S.i: | ||
$(CCC) -c -E $(CCFLAGS) $*.S -o $@ | ||
|
||
.asm.o: | ||
$(NASM) -f elf $(FXDEFINES) -i . -i i386 -o $@ $*.asm | ||
|
||
clean: | ||
rm -f $(OBJECTS) offsets.o unix/unix.o unix/svga.o | ||
#release: CCFLAGS += -DNO_DEBUGGER | ||
|
||
release: clean all | ||
|
||
ppu.o: $(FXDEPENDS) | ||
cpu.o: $(FXDEPENDS) | ||
memmap.o: $(FXDEPENDS) | ||
globals.o: $(FXDEPENDS) | ||
i386/cpuexec.o: $(FXDEPENDS) | ||
snapshot.o: $(FXDEPENDS) | ||
snaporig.o: $(FXDEPENDS) | ||
|
||
unix/unix.o: $(GLIDEDEPENDS) $(OPENGLDEPENDS) | ||
unix/x11.o: $(GLIDEDEPENDS) $(OPENGLDEPENDS) | ||
unix/glide.o: $(GLIDEDEPENDS) | ||
gfx.o: $(GLIDEDEPENDS) $(OPENGLDEPENDS) | ||
unix/opengl.o: $(OPENGLDEPENDS) | ||
|
||
i386/cpuexec.o: i386/asmstruc.h i386/offsets.h | ||
i386/cpuops.o: i386/asmstruc.h i386/asmops.h i386/getset.S i386/asmaddr.h i386/offsets.h | ||
i386/spc700.o: i386/asmstruc.h i386/spcops.h i386/offsets.h | ||
cpuexec.o: cpuexec.h cpuops.h snes9x.h snapshot.h gfx.h \ | ||
memmap.h ppu.h debug.h port.h display.h apu.h spc700.h apu.h | ||
debug.o: cpuops.h cpuexec.h snes9x.h \ | ||
memmap.h ppu.h debug.h missing.h port.h display.h apu.h | ||
ppu.o: snes9x.h memmap.h ppu.h missing.h port.h cpuexec.h \ | ||
apu.h spc700.h fxemu.h fxinst.h sdd1.h | ||
dsp1.o: snes9x.h port.h dsp1.h | ||
sdd1.o: snes9x.h sdd1.h | ||
sdd1emu.o: sdd1emu.h | ||
sa1.o: sa1.h | ||
snapshot.o: snapshot.h memmap.h snes9x.h 65c816.h ppu.h \ | ||
cpuexec.h display.h apu.h spc700.h soundux.h | ||
snes96.o: port.h snes9x.h memmap.h | ||
memmap.o: cpuexec.h snes9x.h memmap.h ppu.h port.h cheats.h getset.h apu.h \ | ||
spc700.h | ||
unix.o: cpuexec.h snes9x.h port.h snapshot.h display.h apu.h gfx.h cheats.h soundux.h | ||
menu.o: cpuexec.h snes9x.h port.h snapshot.h display.h apu.h gfx.h | ||
x11.o: display.h snes9x.h memmap.h debug.h ppu.h snapshot.h gfx.h | ||
ggi.o: display.h snes9x.h memmap.h debug.h ppu.h snapshot.h gfx.h | ||
svga.o: display.h snes9x.h memmap.h debug.h ppu.h snapshot.h gfx.h soundux.h | ||
gfx.o: memmap.h snes9x.h ppu.h gfx.h display.h port.h | ||
tile.o: memmap.h snes9x.h ppu.h display.h gfx.h tile.h | ||
spc700.o: spc700.h apu.h apumem.h snes9x.h memmap.h | ||
apu.o: spc700.h apu.h apumem.h snes9x.h soundux.h | ||
soundux.o: snes9x.h soundux.h apu.h | ||
dma.o: ppu.h dma.h memmap.h getset.h snes9x.h port.h apu.h spc700.h sdd1.h sdd1emu.h | ||
cheats.o: cheats.h snes9x.h port.h memmap.h | ||
fxemu.o: fxemu.h fxinst.h | ||
fxinst.o: fxemu.h fxinst.h | ||
fxdbg.o: fxemu.h fxinst.h | ||
offsets.o: port.h snes9x.h memmap.h ppu.h apu.h cpuexec.h 65c816.h | ||
globals.o: memmap.h spc700.h apu.h cpuexec.h ppu.h cheats.h snes9x.h gfx.h \ | ||
missing.h dma.h dsp1.h soundux.h | ||
xf86.o: display.h snes9x.h memmap.h debug.h ppu.h snapshot.h gfx.h | ||
server.o: snes9x.h port.h memmap.h netplay.h | ||
netplay.o: snes9x.h port.h memmap.h netplay.h | ||
snaporig.o: cpuexec.h |
File renamed without changes.
Oops, something went wrong.