Update build system to include joyconfig

This commit is contained in:
Themaister 2011-01-09 15:58:49 +01:00
parent 9a4158aac8
commit c5770039cc
2 changed files with 14 additions and 3 deletions

View File

@ -1,8 +1,9 @@
include config.mk
TARGET = ssnes
TARGET = ssnes tools/ssnes-joyconfig
OBJ = ssnes.o file.o driver.o conf/config_file.o settings.o dynamic.o
JOYCONFIG_OBJ = tools/ssnes-joyconfig.o conf/config_file.o
LIBS =
DEFINES = -DHAVE_CONFIG_H
@ -85,6 +86,9 @@ config.mk: configure qb/*
ssnes: $(OBJ)
$(CXX) -o $@ $(OBJ) $(LIBS) $(LDFLAGS)
tools/ssnes-joyconfig: $(JOYCONFIG_OBJ)
$(CC) -o $@ $(JOYCONFIG_OBJ) $(SDL_LIBS) $(LDFLAGS)
%.o: %.c config.h config.mk
$(CC) $(CFLAGS) $(DEFINES) -c -o $@ $<
@ -92,8 +96,9 @@ install: $(TARGET)
install -m755 $(TARGET) $(DESTDIR)$(PREFIX)/bin
install -m644 ssnes.cfg $(DESTDIR)/etc/ssnes.cfg
uninstall: $(TARGET)
rm -rf $(DESTDIR)/$(PREFIX)/bin/$(TARGET)
uninstall:
rm -f $(DESTDIR)$(PREFIX)/bin/{ssnes,ssnes-joyconfig}
rm -f $(DESTDIR)/etc/ssnes.cfg
clean:
rm -f *.o
@ -103,6 +108,7 @@ clean:
rm -f record/*.o
rm -f hqflt/*.o
rm -f hqflt/snes_ntsc/*.o
rm -f tools/*.o
rm -f $(TARGET)
.PHONY: all install uninstall clean

View File

@ -15,6 +15,10 @@
* If not, see <http://www.gnu.org/licenses/>.
*/
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#ifdef HAVE_SDL
#include "SDL.h"
#endif
@ -24,6 +28,7 @@
#include <stdlib.h>
#include <getopt.h>
static int g_player = 1;
static int g_joypad = 1;
static char *g_in_path = NULL;