From 16ffcc3c83efe96d08a6df5a7cb7f03f1f57da4c Mon Sep 17 00:00:00 2001 From: Fneufneu Date: Mon, 19 Mar 2012 17:38:29 +0100 Subject: [PATCH] [FreeBSD] move FreeBSDGNUReplacements to a freebsd folder --- Makefile.in | 8 ++++++++ configure.in | 1 + xbmc/addons/Addon.cpp | 2 +- xbmc/filesystem/SAPDirectory.cpp | 2 +- xbmc/{linux => freebsd}/FreeBSDGNUReplacements.c | 0 xbmc/{linux => freebsd}/FreeBSDGNUReplacements.h | 0 xbmc/freebsd/Makefile.in | 11 +++++++++++ xbmc/linux/LinuxTimezone.cpp | 2 +- xbmc/linux/Makefile.in | 4 ---- 9 files changed, 23 insertions(+), 7 deletions(-) rename xbmc/{linux => freebsd}/FreeBSDGNUReplacements.c (100%) rename xbmc/{linux => freebsd}/FreeBSDGNUReplacements.h (100%) create mode 100644 xbmc/freebsd/Makefile.in diff --git a/Makefile.in b/Makefile.in index 615c094daf..4f052e6185 100755 --- a/Makefile.in +++ b/Makefile.in @@ -112,6 +112,10 @@ DIRECTORY_ARCHIVES += xbmc/storage/linux/storage_linux.a DIRECTORY_ARCHIVES += xbmc/windowing/X11/windowing_X11.a endif +ifeq ($(findstring freebsd,@ARCH@),freebsd) +DIRECTORY_ARCHIVES += xbmc/freebsd/freebsd.a +endif + ifeq (@HAVE_XBMC_NONFREE@,1) DIRECTORY_ARCHIVES += lib/UnrarXLib/UnrarXLib.a endif @@ -323,6 +327,10 @@ DYNOBJSXBMC= \ xbmc/video/video.a \ xbmc/guilib/guilib.a # must be dynamic to avoid linker errors +ifeq ($(findstring freebsd,@ARCH@),freebsd) +DYNOBJSXBMC+= xbmc/freebsd/freebsd.a +endif + OBJSXBMC:=$(filter-out $(DYNOBJSXBMC), $(OBJSXBMC)) LIBS += @PYTHON_LDFLAGS@ diff --git a/configure.in b/configure.in index 3efc7a66f4..4e145c2145 100755 --- a/configure.in +++ b/configure.in @@ -1953,6 +1953,7 @@ OUTPUT_FILES="Makefile \ xbmc/interfaces/python/xbmcmodule/Makefile \ lib/libUPnP/Makefile \ xbmc/DllPaths_generated.h \ + xbmc/freebsd/Makefile \ xbmc/linux/Makefile \ xbmc/filesystem/Makefile \ xbmc/screensavers/rsxs-0.9/xbmc/Makefile \ diff --git a/xbmc/addons/Addon.cpp b/xbmc/addons/Addon.cpp index c5e5712a9f..30c035469b 100644 --- a/xbmc/addons/Addon.cpp +++ b/xbmc/addons/Addon.cpp @@ -30,7 +30,7 @@ #include "../osx/OSXGNUReplacements.h" #endif #ifdef __FreeBSD__ -#include "FreeBSDGNUReplacements.h" +#include "freebsd/FreeBSDGNUReplacements.h" #endif #include "utils/log.h" #include "utils/URIUtils.h" diff --git a/xbmc/filesystem/SAPDirectory.cpp b/xbmc/filesystem/SAPDirectory.cpp index 96a0157b2c..7129abe678 100644 --- a/xbmc/filesystem/SAPDirectory.cpp +++ b/xbmc/filesystem/SAPDirectory.cpp @@ -32,7 +32,7 @@ #include "OSXGNUReplacements.h" // strnlen #endif #ifdef __FreeBSD__ -#include "FreeBSDGNUReplacements.h" +#include "freebsd/FreeBSDGNUReplacements.h" #endif #include diff --git a/xbmc/linux/FreeBSDGNUReplacements.c b/xbmc/freebsd/FreeBSDGNUReplacements.c similarity index 100% rename from xbmc/linux/FreeBSDGNUReplacements.c rename to xbmc/freebsd/FreeBSDGNUReplacements.c diff --git a/xbmc/linux/FreeBSDGNUReplacements.h b/xbmc/freebsd/FreeBSDGNUReplacements.h similarity index 100% rename from xbmc/linux/FreeBSDGNUReplacements.h rename to xbmc/freebsd/FreeBSDGNUReplacements.h diff --git a/xbmc/freebsd/Makefile.in b/xbmc/freebsd/Makefile.in new file mode 100644 index 0000000000..8c8f996401 --- /dev/null +++ b/xbmc/freebsd/Makefile.in @@ -0,0 +1,11 @@ +ARCH=@ARCH@ + +CXXFLAGS+=-fPIC + +SRCS=FreeBSDGNUReplacements.c + +LIB=freebsd.a + +include @abs_top_srcdir@/Makefile.include + +-include $(patsubst %.cpp,%.P,$(patsubst %.c,%.P,$(SRCS))) diff --git a/xbmc/linux/LinuxTimezone.cpp b/xbmc/linux/LinuxTimezone.cpp index 089644b97d..8ca969c6e7 100644 --- a/xbmc/linux/LinuxTimezone.cpp +++ b/xbmc/linux/LinuxTimezone.cpp @@ -28,7 +28,7 @@ #include "OSXGNUReplacements.h" #endif #ifdef __FreeBSD__ -#include "FreeBSDGNUReplacements.h" +#include "freebsd/FreeBSDGNUReplacements.h" #endif #include "Util.h" diff --git a/xbmc/linux/Makefile.in b/xbmc/linux/Makefile.in index 5f26f9c2a3..43f552b9c7 100644 --- a/xbmc/linux/Makefile.in +++ b/xbmc/linux/Makefile.in @@ -16,10 +16,6 @@ SRCS=ConvUtils.cpp \ XMemUtils.cpp \ XTimeUtils.cpp \ -ifeq ($(findstring freebsd,$(ARCH)), freebsd) - SRCS+=FreeBSDGNUReplacements.cpp -endif - LIB=linux.a include @abs_top_srcdir@/Makefile.include