diff --git a/Makefile b/Makefile index 4c482a5bf0..8dfc8a60a7 100644 --- a/Makefile +++ b/Makefile @@ -5,6 +5,7 @@ TARGET = ssnes OBJ = ssnes.o file.o driver.o conf/config_file.o settings.o dynamic.o LIBS = -lsamplerate +DEFINES = ifeq ($(HAVE_RSOUND), 1) OBJ += audio/rsound.o @@ -40,6 +41,12 @@ ifeq ($(HAVE_CG), 1) LIBS += -lCg -lCgGL endif +ifeq ($(HAVE_XML), 1) + OBJ += gfx/shader_glsl.o + LIBS += $(XML_LIBS) + DEFINES += $(XML_CFLAGS) +endif + ifeq ($(HAVE_FILTER), 1) OBJ += hqflt/hq.o OBJ += hqflt/grayscale.o @@ -66,7 +73,7 @@ ssnes: $(OBJ) $(CXX) -o $@ $(OBJ) $(LIBS) $(CFLAGS) %.o: %.c config.h config.mk - $(CC) $(CFLAGS) -c -o $@ $< + $(CC) $(CFLAGS) $(DEFINES) -c -o $@ $< install: $(TARGET) install -m755 $(TARGET) $(DESTDIR)/$(PREFIX)/bin diff --git a/qb/config.libs.sh b/qb/config.libs.sh index a01eaf03d9..cf0bfb0774 100644 --- a/qb/config.libs.sh +++ b/qb/config.libs.sh @@ -20,13 +20,14 @@ check_lib GLFW -lglfw glfwInit check_critical GLFW "Cannot find GLFW library." check_lib CG -lCg cgCreateContext +check_pkgconf XML libxml-2.0 check_lib SRC -lsamplerate src_callback_new check_lib DYNAMIC -ldl dlopen # Creates config.mk. -VARS="ALSA OSS AL RSOUND ROAR JACK GLFW FILTER CG DYNAMIC" +VARS="ALSA OSS AL RSOUND ROAR JACK GLFW FILTER CG XML DYNAMIC" create_config_make config.mk $VARS create_config_header config.h $VARS diff --git a/qb/config.params.sh b/qb/config.params.sh index 34dc9a88d2..9e3ea58c8d 100644 --- a/qb/config.params.sh +++ b/qb/config.params.sh @@ -10,7 +10,8 @@ PACKAGE_VERSION=0.1 add_command_line_enable DYNAMIC "Enable dynamic loading of libsnes library." no add_command_line_string LIBSNES "libsnes library used" "-lsnes" add_command_line_enable FILTER "Disable CPU filter support" yes -add_command_line_enable CG "Enable CG shader support" auto +add_command_line_enable CG "Enable Cg shader support" auto +add_command_line_enable XML "Enable bSNES-style XML shader support" auto add_command_line_enable ALSA "Enable ALSA support" auto add_command_line_enable OSS "Enable OSS support" auto add_command_line_enable RSOUND "Enable RSound support" auto