RetroArch/Makefile.win64

143 lines
2.8 KiB
Makefile
Raw Normal View History

2011-05-11 10:13:55 +00:00
TARGET = ssnes.exe
JTARGET = ssnes-joyconfig.exe
2011-05-15 14:54:43 +00:00
OBJ = ssnes.o file.o driver.o conf/config_file.o settings.o dynamic.o message.o rewind.o movie.o autosave.o gfx/gfx_common.o ups.o strl.o screenshot.o
2011-05-11 10:13:55 +00:00
JOBJ = conf/config_file.o tools/main-stub.o tools/ssnes-joyconfig.o
CC = gcc
CXX = g++
HAVE_SRC = 0
HAVE_SDL = 1
HAVE_XML = 1
HAVE_FREETYPE = 1
HAVE_XAUDIO = 1
HAVE_RSOUND = 0
2011-05-11 15:52:16 +00:00
HAVE_DYLIB = 1
2011-05-11 10:13:55 +00:00
HAVE_NETPLAY = 1
HAVE_FBO = 1
2011-05-18 20:40:42 +00:00
HAVE_CG = 0
HAVE_IMLIB = 0
2011-05-11 10:13:55 +00:00
libsnes ?= -lsnes
LIBS = -lm
DEFINES = -I. -DHAVE_CONFIGFILE
LDFLAGS = -L. -static-libgcc -s
SRC_LIBS = -lsamplerate-0
SDL_LIBS = -lmingw32 -lSDL -lSDLmain -lwinmm -mwindows -lm -luser32 -lgdi32 -lwinmm -ldxguid
SDL_CFLAGS = -ISDL
ifeq ($(HAVE_SRC), 1)
LIBS += $(SRC_LIBS)
DEFINES += $(SRC_CFLAGS) -DHAVE_SRC
else
OBJ += audio/hermite.o
endif
ifeq ($(HAVE_SDL), 1)
OBJ += gfx/sdl.o gfx/gl.o input/sdl.o audio/sdl.o audio/buffer.o
LIBS += $(SDL_LIBS) -lopengl32
DEFINES += $(SDL_CFLAGS) -DHAVE_SDL
endif
2011-05-18 20:40:42 +00:00
ifeq ($(HAVE_CG), 1)
OBJ += gfx/shader_cg.o
LIBS += -lcg -lcgGL
DEFINES += -DHAVE_CG
endif
2011-05-11 10:13:55 +00:00
ifeq ($(HAVE_XAUDIO), 1)
OBJ += audio/xaudio.o
DEFINES += -DHAVE_XAUDIO
endif
ifeq ($(HAVE_RSOUND), 1)
OBJ += audio/rsound.o
DEFINES += -DHAVE_RSOUND
LIBS += -lrsound
endif
ifeq ($(HAVE_XML), 1)
OBJ += gfx/shader_glsl.o gfx/image.o gfx/snes_state.o sha256.o cheats.o
2011-05-11 10:13:55 +00:00
DEFINES += $(XML_CFLAGS) -DHAVE_XML -DLIBXML_STATIC
LIBS += -lxml2 -lz -lws2_32
endif
2011-05-11 15:52:16 +00:00
ifeq ($(HAVE_DYLIB), 1)
DEFINES += -DHAVE_DYLIB
2011-05-11 10:13:55 +00:00
endif
ifeq ($(HAVE_NETPLAY), 1)
DEFINES += -DHAVE_NETPLAY
OBJ += netplay.o
LIBS += -lws2_32
endif
ifeq ($(HAVE_FREETYPE), 1)
OBJ += gfx/fonts.o
DEFINES += -DHAVE_FREETYPE -Ifreetype2
LIBS += -lz -lfreetype6
endif
ifeq ($(DYNAMIC), 1)
DEFINES += -DHAVE_DYNAMIC
else
LIBS += $(libsnes)
endif
ifeq ($(HAVE_FBO), 1)
DEFINES += -DHAVE_FBO
endif
2011-05-11 15:52:16 +00:00
ifeq ($(HAVE_DYLIB), 1)
2011-05-14 23:46:11 +00:00
OBJ += gfx/ext.o audio/ext.o
2011-05-11 15:52:16 +00:00
endif
ifeq ($(HAVE_IMLIB), 1)
LIBS += -lImlib2
DEFINES += -DHAVE_IMLIB
endif
2011-05-11 15:52:16 +00:00
2011-05-11 10:13:55 +00:00
ifneq ($(V),1)
Q := @
endif
CFLAGS = -Wall -O3 -std=gnu99 -I.
all: $(TARGET) $(JTARGET)
$(TARGET): $(OBJ)
$(Q)$(CXX) -o $@ $(OBJ) $(LIBS) $(LDFLAGS)
@$(if $(Q), $(shell echo echo LD $@),)
%.o: %.c
$(Q)$(CC) $(CFLAGS) $(DEFINES) -c -o $@ $<
@$(if $(Q), $(shell echo echo CC $<),)
$(JTARGET): $(JOBJ)
$(Q)$(CC) -o $@ $(JOBJ) $(SDL_LIBS) $(LDFLAGS)
@$(if $(Q), $(shell echo echo LD $@),)
clean:
rm -f *.o
rm -f audio/*.o
rm -f conf/*.o
rm -f gfx/*.o
rm -f record/*.o
rm -f hqflt/*.o
rm -f input/*.o
rm -f hqflt/snes_ntsc/*.o
rm -f $(TARGET)
rm -f ssnes-joyconfig.exe
rm -f tools/*.o
dist: all
2011-05-15 20:18:36 +00:00
zip -r ssnes-win64-0.5.zip $(TARGET) ssnes.cfg snes.dll xaudio-c.dll README.win32.txt $(JTARGET)
2011-05-11 10:13:55 +00:00
libs:
2011-05-11 10:19:33 +00:00
wget https://github.com/downloads/Themaister/SSNES/ssnes-win64-libs.zip --no-check-certificate
unzip ssnes-win64-libs.zip
2011-05-11 10:13:55 +00:00
.PHONY: all install uninstall clean dist libs