2010-05-29 15:01:11 +00:00
|
|
|
include config.mk
|
2010-05-28 12:04:50 +00:00
|
|
|
|
2010-05-26 19:27:37 +00:00
|
|
|
TARGET = ssnes
|
|
|
|
|
2011-01-03 19:46:50 +00:00
|
|
|
OBJ = ssnes.o file.o driver.o conf/config_file.o settings.o dynamic.o record/ffemu.o
|
2010-11-19 20:26:31 +00:00
|
|
|
|
2011-01-03 19:46:50 +00:00
|
|
|
LIBS = -lsamplerate -lavformat -lavutil -lavcodec -lswscale
|
2010-12-30 13:26:12 +00:00
|
|
|
LIBS = -lsamplerate
|
2011-01-05 16:42:58 +00:00
|
|
|
DEFINES =
|
2010-05-28 12:04:50 +00:00
|
|
|
|
2010-12-30 01:56:56 +00:00
|
|
|
ifeq ($(HAVE_RSOUND), 1)
|
2010-12-24 01:18:39 +00:00
|
|
|
OBJ += audio/rsound.o
|
2010-05-28 12:04:50 +00:00
|
|
|
LIBS += -lrsound
|
|
|
|
endif
|
2010-12-30 01:56:56 +00:00
|
|
|
ifeq ($(HAVE_OSS), 1)
|
2010-12-24 01:18:39 +00:00
|
|
|
OBJ += audio/oss.o
|
2010-05-28 12:33:18 +00:00
|
|
|
endif
|
2010-12-30 01:56:56 +00:00
|
|
|
ifeq ($(HAVE_ALSA), 1)
|
2010-12-24 01:18:39 +00:00
|
|
|
OBJ += audio/alsa.o
|
2010-05-28 13:41:38 +00:00
|
|
|
LIBS += -lasound
|
|
|
|
endif
|
2010-12-30 01:56:56 +00:00
|
|
|
ifeq ($(HAVE_ROAR), 1)
|
2010-12-24 01:18:39 +00:00
|
|
|
OBJ += audio/roar.o
|
2010-08-16 19:20:07 +00:00
|
|
|
LIBS += -lroar
|
|
|
|
endif
|
2010-12-30 01:56:56 +00:00
|
|
|
ifeq ($(HAVE_AL), 1)
|
2010-12-24 01:18:39 +00:00
|
|
|
OBJ += audio/openal.o
|
2010-08-25 20:40:43 +00:00
|
|
|
LIBS += -lopenal
|
|
|
|
endif
|
2011-01-01 02:53:30 +00:00
|
|
|
ifeq ($(HAVE_JACK),1)
|
|
|
|
OBJ += audio/jack.o
|
|
|
|
LIBS += -ljack
|
|
|
|
endif
|
2010-05-28 12:04:50 +00:00
|
|
|
|
2010-12-30 02:02:30 +00:00
|
|
|
ifeq ($(HAVE_GLFW), 1)
|
2010-12-24 01:18:39 +00:00
|
|
|
OBJ += gfx/gl.o
|
2010-11-12 22:09:43 +00:00
|
|
|
LIBS += -lglfw
|
2010-05-28 12:04:50 +00:00
|
|
|
endif
|
2010-11-12 22:09:43 +00:00
|
|
|
|
2010-12-30 01:56:56 +00:00
|
|
|
ifeq ($(HAVE_CG), 1)
|
2011-01-05 16:22:12 +00:00
|
|
|
OBJ += gfx/shader_cg.o
|
2010-11-12 22:09:43 +00:00
|
|
|
LIBS += -lCg -lCgGL
|
|
|
|
endif
|
|
|
|
|
2011-01-05 16:42:58 +00:00
|
|
|
ifeq ($(HAVE_XML), 1)
|
|
|
|
OBJ += gfx/shader_glsl.o
|
|
|
|
LIBS += $(XML_LIBS)
|
|
|
|
DEFINES += $(XML_CFLAGS)
|
|
|
|
endif
|
|
|
|
|
2010-12-30 01:56:56 +00:00
|
|
|
ifeq ($(HAVE_FILTER), 1)
|
2010-06-27 13:46:23 +00:00
|
|
|
OBJ += hqflt/hq.o
|
2010-08-19 13:26:58 +00:00
|
|
|
OBJ += hqflt/grayscale.o
|
2010-08-19 21:44:12 +00:00
|
|
|
OBJ += hqflt/bleed.o
|
2010-08-28 14:36:15 +00:00
|
|
|
OBJ += hqflt/ntsc.o
|
|
|
|
OBJ += hqflt/snes_ntsc/snes_ntsc.o
|
2010-05-29 14:59:57 +00:00
|
|
|
endif
|
2010-05-28 12:04:50 +00:00
|
|
|
|
2010-12-30 13:26:12 +00:00
|
|
|
ifeq ($(HAVE_DYNAMIC), 1)
|
2010-12-30 12:54:49 +00:00
|
|
|
LIBS += -ldl
|
2010-12-30 13:26:12 +00:00
|
|
|
else
|
|
|
|
LIBS += $(libsnes)
|
2010-12-30 12:54:49 +00:00
|
|
|
endif
|
|
|
|
|
2010-12-30 13:11:56 +00:00
|
|
|
CFLAGS = -Wall -O3 -g -std=gnu99 -I.
|
2010-05-26 19:27:37 +00:00
|
|
|
|
2010-12-30 01:56:56 +00:00
|
|
|
all: $(TARGET) config.mk
|
|
|
|
|
|
|
|
config.mk: configure qb/*
|
|
|
|
@echo "config.mk is outdated or non-existing. Run ./configure again."
|
2010-12-30 02:23:12 +00:00
|
|
|
@exit 1
|
2010-05-28 12:04:50 +00:00
|
|
|
|
2010-06-27 13:46:23 +00:00
|
|
|
ssnes: $(OBJ)
|
2010-11-19 20:26:31 +00:00
|
|
|
$(CXX) -o $@ $(OBJ) $(LIBS) $(CFLAGS)
|
2010-06-27 13:46:23 +00:00
|
|
|
|
|
|
|
%.o: %.c config.h config.mk
|
2011-01-05 16:42:58 +00:00
|
|
|
$(CC) $(CFLAGS) $(DEFINES) -c -o $@ $<
|
2010-05-28 12:04:50 +00:00
|
|
|
|
|
|
|
install: $(TARGET)
|
2010-12-30 04:51:11 +00:00
|
|
|
install -m755 $(TARGET) $(DESTDIR)/$(PREFIX)/bin
|
|
|
|
install -m644 ssnes.cfg $(DESTDIR)/etc/ssnes.cfg
|
2010-05-28 12:04:50 +00:00
|
|
|
|
|
|
|
uninstall: $(TARGET)
|
2010-12-30 04:51:11 +00:00
|
|
|
rm -rf $(DESTDIR)/$(PREFIX)/bin/$(TARGET)
|
2010-05-26 19:27:37 +00:00
|
|
|
|
|
|
|
clean:
|
2010-08-19 18:29:32 +00:00
|
|
|
rm -f *.o
|
2010-12-24 10:53:43 +00:00
|
|
|
rm -f audio/*.o
|
2010-12-29 18:43:17 +00:00
|
|
|
rm -f conf/*.o
|
2010-12-24 10:53:43 +00:00
|
|
|
rm -f gfx/*.o
|
2010-08-19 18:29:32 +00:00
|
|
|
rm -f hqflt/*.o
|
2010-08-28 14:36:15 +00:00
|
|
|
rm -f hqflt/snes_ntsc/*.o
|
2010-08-19 18:29:32 +00:00
|
|
|
rm -f $(TARGET)
|
2010-06-27 13:46:23 +00:00
|
|
|
|
|
|
|
.PHONY: all install uninstall clean
|