diff --git a/Makefile b/Makefile index efeb3d1f21..7d188fac0c 100644 --- a/Makefile +++ b/Makefile @@ -38,7 +38,10 @@ JOYCONFIG_OBJ = tools/retroarch-joyconfig.o \ HEADERS = $(wildcard */*.h) $(wildcard *.h) -LIBS = -lm +ifeq ($(findstring Haiku,$(OS)),) + LIBS = -lm +endif + DEFINES = -DHAVE_CONFIG_H -DHAVE_SCREENSHOTS ifeq ($(REENTRANT_TEST), 1) @@ -53,11 +56,8 @@ else OSX := 0 endif -BSD_LOCAL_INC = -DYLIB_LIB = -ldl ifneq ($(findstring BSD,$(OS)),) BSD_LOCAL_INC = -I/usr/local/include - DYLIB_LIB = -lc endif ifneq ($(findstring Linux,$(OS)),) @@ -66,9 +66,12 @@ 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 - LIBS += -lpthread + ifeq ($(findstring Haiku,$(OS)),) + LIBS += -lpthread + endif endif ifeq ($(HAVE_CONFIGFILE), 1) @@ -361,7 +364,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 @@ -370,7 +373,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 diff --git a/qb/config.libs.sh b/qb/config.libs.sh index 3d147c0c47..33afce4d5c 100644 --- a/qb/config.libs.sh +++ b/qb/config.libs.sh @@ -8,7 +8,16 @@ 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 + +add_define_make DYLIB_LIB "$DYLIB" + [ "$OS" = 'Darwin' ] && HAVE_X11=no # X11 breaks on recent OSXes even if present. [ -d /opt/vc/lib ] && add_library_dirs /opt/vc/lib diff --git a/qb/qb.comp.sh b/qb/qb.comp.sh index f3f80a2b73..3c7a11a124 100644 --- a/qb/qb.comp.sh +++ b/qb/qb.comp.sh @@ -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"