mirror of
https://github.com/libretro/RetroArch.git
synced 2024-11-24 08:30:16 +00:00
94 lines
1.9 KiB
Makefile
94 lines
1.9 KiB
Makefile
TARGET = ssnes.exe
|
|
JTARGET = ssnes-joyconfig.exe
|
|
OBJ = ssnes.o file.o driver.o conf/config_file.o settings.o dynamic.o message.o
|
|
JOBJ = conf/config_file.o tools/main-stub.o tools/ssnes-joyconfig.o
|
|
|
|
CC = gcc
|
|
CXX = g++
|
|
|
|
HAVE_SRC = 1
|
|
HAVE_SDL = 1
|
|
HAVE_XML = 1
|
|
HAVE_FREETYPE = 1
|
|
libsnes ?= -lsnes
|
|
|
|
LIBS =
|
|
DEFINES = -I. -DHAVE_CONFIGFILE
|
|
LDFLAGS = -L. -static-libgcc -s
|
|
|
|
SRC_LIBS = -lsamplerate-0
|
|
SDL_LIBS = -lSDL
|
|
SDL_CFLAGS = -ISDL
|
|
|
|
ifeq ($(HAVE_SRC), 1)
|
|
LIBS += $(SRC_LIBS)
|
|
DEFINES += $(SRC_CFLAGS) -DHAVE_SRC
|
|
endif
|
|
|
|
ifeq ($(HAVE_SDL), 1)
|
|
OBJ += gfx/gl.o input/sdl.o audio/sdl.o audio/buffer.o
|
|
LIBS += $(SDL_LIBS) -lopengl32
|
|
DEFINES += $(SDL_CFLAGS) -DHAVE_SDL
|
|
endif
|
|
|
|
ifeq ($(HAVE_XML), 1)
|
|
OBJ += gfx/shader_glsl.o
|
|
DEFINES += $(XML_CFLAGS) -DHAVE_XML
|
|
LIBS += -lxml2
|
|
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
|
|
|
|
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
|
|
zip -r ssnes-win32-0.2.zip $(TARGET) ssnes.cfg snes.dll libxml2.dll iconv.dll zlib1.dll SDL.dll libsamplerate-0.dll freetype6.dll $(JTARGET)
|
|
|
|
libs:
|
|
wget https://github.com/downloads/Themaister/SSNES/SSNES-win32-libs.zip --no-check-certificate
|
|
unzip SSNES-win32-libs.zip
|
|
|
|
.PHONY: all install uninstall clean dist
|