Merge pull request #100 from sparklewind/patch-1

Fix for compiling on Haiku
This commit is contained in:
Hans-Kristian Arntzen 2012-12-22 14:46:00 -08:00
commit 49324a1374
3 changed files with 15 additions and 7 deletions

View File

@ -36,8 +36,9 @@ JOYCONFIG_OBJ = tools/retroarch-joyconfig.o \
input/input_common.o
HEADERS = $(wildcard */*.h) $(wildcard *.h)
LIBS = -lm
ifneq ($(findstring Haiku,$(OS)),)
LIBS = -lm
endif
DEFINES = -DHAVE_CONFIG_H -DHAVE_SCREENSHOTS
ifeq ($(REENTRANT_TEST), 1)
@ -53,7 +54,10 @@ else
endif
BSD_LOCAL_INC =
DYLIB_LIB = -ldl
ifneq ($(findstring Haiku,$(OS)),)
DYLIB_LIB = -ldl
endif
ifneq ($(findstring BSD,$(OS)),)
BSD_LOCAL_INC = -I/usr/local/include
DYLIB_LIB = -lc
@ -65,10 +69,13 @@ ifneq ($(findstring Linux,$(OS)),)
JOYCONFIG_OBJ += input/linuxraw_joypad.o
endif
OBJ += autosave.o thread.o
ifeq ($(HAVE_THREADS), 1)
OBJ += autosave.o thread.o
ifneq ($(findstring Haiku,$(OS)),)
LIBS += -lpthread
endif
endif
ifeq ($(HAVE_CONFIGFILE), 1)
OBJ += conf/config_file.o
@ -360,7 +367,7 @@ install: $(TARGET)
install -m644 docs/retroarch.1 $(DESTDIR)$(MAN_DIR)
install -m644 docs/retroarch-joyconfig.1 $(DESTDIR)$(MAN_DIR)
install -m755 retroarch-zip $(DESTDIR)$(PREFIX)/bin
install -m644 media/retroarch.png $(DESTDIR)/usr/share/icons
install -m644 media/retroarch.png $(DESTDIR)$(PREFIX)/share/icons
uninstall:
rm -f $(DESTDIR)$(PREFIX)/bin/retroarch
@ -369,7 +376,7 @@ uninstall:
rm -f $(DESTDIR)/etc/retroarch.cfg
rm -f $(DESTDIR)$(PREFIX)/share/man/man1/retroarch.1
rm -f $(DESTDIR)$(PREFIX)/share/man/man1/retroarch-joyconfig.1
rm -f $(DESTDIR)/usr/share/icons/retroarch.png
rm -f $(DESTDIR)$(PREFIX)/share/icons/retroarch.png
clean:
rm -f *.o

View File

@ -8,7 +8,7 @@ add_define_make NOUNUSED "$HAVE_NOUNUSED"
[ -z "$CROSS_COMPILE" ] && [ -d /opt/local/lib ] && add_library_dirs /opt/local/lib
if [ "$OS" = 'BSD' ]; then DYLIB=-lc; else DYLIB=-ldl; fi
if [ "$OS" = 'BSD' ]; then DYLIB=-lc; elif [ "$OS" = 'Haiku' ]; then DYLIB=""; else DYLIB=-ldl; fi
[ "$OS" = 'Darwin' ] && HAVE_X11=no # X11 breaks on recent OSXes even if present.
[ -d /opt/vc/lib ] && add_library_dirs /opt/vc/lib

View File

@ -12,6 +12,7 @@ case "$(uname)" in
'Darwin') OS='Darwin';;
'MINGW32'*) OS='MinGW';;
'CYGWIN'*) OS='Cygwin';;
'Haiku') OS='Haiku';;
*) OS="Win32";;
esac
echo "$ECHOBUF ... $OS"