mirror of
https://github.com/CTCaer/RetroArch.git
synced 2024-12-11 20:44:24 +00:00
68 lines
1.4 KiB
Makefile
68 lines
1.4 KiB
Makefile
TARGET = ssnes.exe
|
|
OBJ = ssnes.o file.o driver.o conf/config_file.o settings.o dynamic.o
|
|
|
|
CC = gcc
|
|
CXX = g++
|
|
|
|
HAVE_SRC = 1
|
|
HAVE_SDL = 1
|
|
HAVE_XML = 1
|
|
libsnes ?= -lsnes
|
|
|
|
LIBS =
|
|
DEFINES = -I.
|
|
LDFLAGS = -L. -static-libgcc -s
|
|
|
|
SRC_LIBS = -lsamplerate-0
|
|
SDL_LIBS = -lSDLmain -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
|
|
|
|
LIBS += $(libsnes)
|
|
|
|
CFLAGS = -Wall -O3 -std=gnu99 -I.
|
|
|
|
all: $(TARGET) ssnes-joyconfig.exe
|
|
|
|
$(TARGET): $(OBJ)
|
|
$(CXX) -o $@ $(OBJ) $(LIBS) $(LDFLAGS)
|
|
|
|
ssnes-joyconfig.exe: conf/config_file.o tools/ssnes-joyconfig.o
|
|
$(CC) -o ssnes-joyconfig.exe $(SDL_LIBS) $(LDFLAGS) conf/config_file.o tools/ssnes-joyconfig.o
|
|
|
|
%.o: %.c
|
|
$(CC) $(CFLAGS) $(DEFINES) -c -o $@ $<
|
|
|
|
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 hqflt/snes_ntsc/*.o
|
|
rm -f $(TARGET)
|
|
rm -f ssnes-joyconfig.exe
|
|
rm -f tools/*
|
|
|
|
dist: all
|
|
zip -r ssnes-win32.zip $(TARGET) ssnes.cfg snes.dll libxml2.dll iconv.dll zlib1.dll SDL.dll libsamplerate-0.dll ssnes-joyconfig.exe
|
|
|
|
.PHONY: all install uninstall clean dist
|