mirror of
https://github.com/libretro/RetroArch
synced 2024-12-29 12:31:05 +00:00
59 lines
1.0 KiB
Makefile
59 lines
1.0 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
|
|
libsnes = -lsnes
|
|
|
|
LIBS =
|
|
DEFINES = -I. -DHAVE_SRC -DHAVE_SDL
|
|
LDFLAGS = -L.
|
|
|
|
SRC_LIBS = -lsamplerate-0
|
|
SDL_LIBS = -lSDLmain -lSDL
|
|
|
|
ifeq ($(HAVE_SRC), 1)
|
|
LIBS += $(SRC_LIBS)
|
|
DEFINES += $(SRC_CFLAGS)
|
|
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)
|
|
endif
|
|
|
|
LIBS += $(libsnes)
|
|
|
|
CFLAGS = -Wall -O3 -g -std=gnu99 -I.
|
|
|
|
all: $(TARGET)
|
|
|
|
$(TARGET): $(OBJ)
|
|
$(CXX) -o $@ $(OBJ) $(LIBS) $(LDFLAGS)
|
|
|
|
%.o: %.c
|
|
$(CC) $(CFLAGS) $(DEFINES) -c -o $@ $<
|
|
|
|
install: $(TARGET)
|
|
install -m755 $(TARGET) $(DESTDIR)$(PREFIX)/bin
|
|
install -m644 ssnes.cfg $(DESTDIR)/etc/ssnes.cfg
|
|
|
|
uninstall: $(TARGET)
|
|
rm -rf $(DESTDIR)/$(PREFIX)/bin/$(TARGET)
|
|
|
|
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)
|
|
|
|
.PHONY: all install uninstall clean
|