2010-09-25 17:46:12 +02:00
|
|
|
@S9XDEBUGGER@
|
|
|
|
@S9XNETPLAY@
|
|
|
|
@S9XZIP@
|
|
|
|
@S9XJMA@
|
|
|
|
|
|
|
|
# Fairly good and special-char-safe descriptor of the os being built on.
|
|
|
|
OS = `uname -s -r -m|sed \"s/ /-/g\"|tr \"[A-Z]\" \"[a-z]\"|tr \"/()\" \"___\"`
|
|
|
|
BUILDDIR = .
|
|
|
|
|
2015-08-12 03:27:56 +02:00
|
|
|
OBJECTS = ../apu/apu.o ../apu/bapu/dsp/sdsp.o ../apu/bapu/dsp/SPC_DSP.o ../apu/bapu/smp/smp.o ../apu/bapu/smp/smp_state.o ../bsx.o ../c4.o ../c4emu.o ../cheats.o ../cheats2.o ../clip.o ../conffile.o ../controls.o ../cpu.o ../cpuexec.o ../cpuops.o ../crosshairs.o ../dma.o ../dsp.o ../dsp1.o ../dsp2.o ../dsp3.o ../dsp4.o ../fxinst.o ../fxemu.o ../gfx.o ../globals.o ../logger.o ../memmap.o ../movie.o ../obc1.o ../ppu.o ../stream.o ../sa1.o ../sa1cpu.o ../screenshot.o ../sdd1.o ../sdd1emu.o ../seta.o ../seta010.o ../seta011.o ../seta018.o ../snapshot.o ../snes9x.o ../spc7110.o ../srtc.o ../tile.o ../filter/2xsai.o ../filter/blit.o ../filter/epx.o ../filter/hq2x.o ../filter/snes_ntsc.o ../statemanager.o unix.o x11.o
|
2010-11-28 14:35:41 +01:00
|
|
|
DEFS = -DMITSHM
|
2010-09-25 17:46:12 +02:00
|
|
|
|
|
|
|
ifdef S9XDEBUGGER
|
2011-01-16 09:15:13 +01:00
|
|
|
OBJECTS += ../debug.o ../fxdbg.o
|
2010-09-25 17:46:12 +02:00
|
|
|
endif
|
|
|
|
|
|
|
|
ifdef S9XNETPLAY
|
|
|
|
OBJECTS += ../netplay.o ../server.o
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifdef S9XZIP
|
|
|
|
OBJECTS += ../loadzip.o ../unzip/ioapi.o ../unzip/unzip.o
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifdef S9XJMA
|
|
|
|
OBJECTS += ../jma/7zlzma.o ../jma/crc32.o ../jma/iiostrm.o ../jma/inbyte.o ../jma/jma.o ../jma/lzma.o ../jma/lzmadec.o ../jma/s9x-jma.o ../jma/winout.o
|
|
|
|
endif
|
|
|
|
|
|
|
|
CCC = @CXX@
|
|
|
|
CC = @CC@
|
|
|
|
GASM = @CXX@
|
2012-02-09 02:15:23 +01:00
|
|
|
INCLUDES = -I. -I.. -I../apu/ -I../apu/bapu -I../unzip/ -I../jma/ -I../filter/
|
2010-09-25 17:46:12 +02:00
|
|
|
|
|
|
|
CCFLAGS = @S9XFLGS@ @S9XDEFS@ $(DEFS)
|
|
|
|
CFLAGS = $(CCFLAGS)
|
|
|
|
|
2011-01-16 09:15:13 +01:00
|
|
|
.SUFFIXES: .o .cpp .c .cc .h .m .i .s .obj
|
2010-09-25 17:46:12 +02:00
|
|
|
|
|
|
|
all: Makefile configure snes9x
|
|
|
|
|
|
|
|
Makefile: configure Makefile.in
|
|
|
|
@echo "Makefile is older than configure or in-file. Run configure or touch Makefile."
|
|
|
|
exit 1
|
|
|
|
|
|
|
|
configure: configure.ac
|
|
|
|
@echo "configure is older than in-file. Run autoconf or touch configure."
|
|
|
|
exit 1
|
|
|
|
|
|
|
|
snes9x: $(OBJECTS)
|
|
|
|
$(CCC) $(INCLUDES) -o $@ $(OBJECTS) -lm @S9XLIBS@
|
|
|
|
|
|
|
|
../jma/s9x-jma.o: ../jma/s9x-jma.cpp
|
|
|
|
$(CCC) $(INCLUDES) -c $(CCFLAGS) -fexceptions $*.cpp -o $@
|
|
|
|
../jma/7zlzma.o: ../jma/7zlzma.cpp
|
|
|
|
$(CCC) $(INCLUDES) -c $(CCFLAGS) -fexceptions $*.cpp -o $@
|
|
|
|
../jma/crc32.o: ../jma/crc32.cpp
|
|
|
|
$(CCC) $(INCLUDES) -c $(CCFLAGS) -fexceptions $*.cpp -o $@
|
|
|
|
../jma/iiostrm.o: ../jma/iiostrm.cpp
|
|
|
|
$(CCC) $(INCLUDES) -c $(CCFLAGS) -fexceptions $*.cpp -o $@
|
|
|
|
../jma/inbyte.o: ../jma/inbyte.cpp
|
|
|
|
$(CCC) $(INCLUDES) -c $(CCFLAGS) -fexceptions $*.cpp -o $@
|
|
|
|
../jma/jma.o: ../jma/jma.cpp
|
|
|
|
$(CCC) $(INCLUDES) -c $(CCFLAGS) -fexceptions $*.cpp -o $@
|
|
|
|
../jma/lzma.o: ../jma/lzma.cpp
|
|
|
|
$(CCC) $(INCLUDES) -c $(CCFLAGS) -fexceptions $*.cpp -o $@
|
|
|
|
../jma/lzmadec.o: ../jma/lzmadec.cpp
|
|
|
|
$(CCC) $(INCLUDES) -c $(CCFLAGS) -fexceptions $*.cpp -o $@
|
|
|
|
../jma/winout.o: ../jma/winout.cpp
|
|
|
|
$(CCC) $(INCLUDES) -c $(CCFLAGS) -fexceptions $*.cpp -o $@
|
|
|
|
|
|
|
|
.cpp.o:
|
|
|
|
$(CCC) $(INCLUDES) -c $(CCFLAGS) $*.cpp -o $@
|
|
|
|
|
|
|
|
.c.o:
|
|
|
|
$(CC) $(INCLUDES) -c $(CCFLAGS) $*.c -o $@
|
|
|
|
|
|
|
|
.cpp.S:
|
|
|
|
$(GASM) $(INCLUDES) -S $(CCFLAGS) $*.cpp -o $@
|
|
|
|
|
|
|
|
.cpp.i:
|
|
|
|
$(GASM) $(INCLUDES) -E $(CCFLAGS) $*.cpp -o $@
|
|
|
|
|
|
|
|
.S.o:
|
|
|
|
$(GASM) $(INCLUDES) -c $(CCFLAGS) $*.S -o $@
|
|
|
|
|
|
|
|
.S.i:
|
|
|
|
$(GASM) $(INCLUDES) -c -E $(CCFLAGS) $*.S -o $@
|
|
|
|
|
|
|
|
.s.o:
|
|
|
|
@echo Compiling $*.s
|
|
|
|
sh-elf-as -little $*.s -o $@
|
|
|
|
|
|
|
|
.obj.o:
|
|
|
|
cp $*.obj $*.o
|
|
|
|
|
|
|
|
clean:
|
|
|
|
rm -f $(OBJECTS)
|