From 359d5fa997abcea2ee80fd155407bc22b0b9c42a Mon Sep 17 00:00:00 2001 From: Themaister Date: Sat, 22 Dec 2012 23:52:05 +0100 Subject: [PATCH] Cleanups and build fixes. --- Makefile | 16 ++++++---------- qb/config.libs.sh | 11 ++++++++++- 2 files changed, 16 insertions(+), 11 deletions(-) diff --git a/Makefile b/Makefile index 79eb1f19c7..8ce26d9a09 100644 --- a/Makefile +++ b/Makefile @@ -36,9 +36,11 @@ JOYCONFIG_OBJ = tools/retroarch-joyconfig.o \ input/input_common.o HEADERS = $(wildcard */*.h) $(wildcard *.h) -ifneq ($(findstring Haiku,$(OS)),) + +ifeq ($(findstring Haiku,$(OS)),) LIBS = -lm endif + DEFINES = -DHAVE_CONFIG_H -DHAVE_SCREENSHOTS ifeq ($(REENTRANT_TEST), 1) @@ -53,14 +55,8 @@ else OSX := 0 endif -BSD_LOCAL_INC = -ifneq ($(findstring Haiku,$(OS)),) - DYLIB_LIB = -ldl -endif - ifneq ($(findstring BSD,$(OS)),) BSD_LOCAL_INC = -I/usr/local/include - DYLIB_LIB = -lc endif ifneq ($(findstring Linux,$(OS)),) @@ -72,9 +68,9 @@ endif OBJ += autosave.o thread.o ifeq ($(HAVE_THREADS), 1) -ifneq ($(findstring Haiku,$(OS)),) - LIBS += -lpthread -endif + ifeq ($(findstring Haiku,$(OS)),) + LIBS += -lpthread + endif endif ifeq ($(HAVE_CONFIGFILE), 1) diff --git a/qb/config.libs.sh b/qb/config.libs.sh index defc0d2cf5..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; elif [ "$OS" = 'Haiku' ]; then DYLIB=""; 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