Update build system for xml shaders.

This commit is contained in:
Themaister 2011-01-05 17:42:58 +01:00
parent 56e050f10d
commit 7cc96aff01
3 changed files with 12 additions and 3 deletions

View File

@ -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

View File

@ -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

View File

@ -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