From 1a7e6cf2a90af32e1acd5a38561d996a90cac49f Mon Sep 17 00:00:00 2001 From: davilla Date: Sun, 2 Dec 2012 11:27:57 -0500 Subject: [PATCH] [aml] move AMLUtils.cpp to utils dir and conditional build on amcodec or amlplayer set in configure --- .gitignore | 2 + configure.in | 3 +- tools/amlogic/depends/xbmc/xbmc.mk | 2 +- xbmc/cores/AudioEngine/Sinks/AESinkALSA.cpp | 2 +- .../AudioEngine/Sinks/AESinkAUDIOTRACK.cpp | 4 +- xbmc/cores/amlplayer/AMLPlayer.cpp | 2 +- xbmc/cores/amlplayer/Makefile.in | 2 - .../dvdplayer/DVDCodecs/Video/Amlogic.cpp | 2 +- xbmc/{cores/amlplayer => utils}/AMLUtils.cpp | 0 xbmc/{cores/amlplayer => utils}/AMLUtils.h | 0 xbmc/utils/Makefile | 79 ----------------- xbmc/utils/Makefile.in | 84 +++++++++++++++++++ 12 files changed, 94 insertions(+), 88 deletions(-) rename xbmc/{cores/amlplayer => utils}/AMLUtils.cpp (100%) rename xbmc/{cores/amlplayer => utils}/AMLUtils.h (100%) delete mode 100644 xbmc/utils/Makefile create mode 100644 xbmc/utils/Makefile.in diff --git a/.gitignore b/.gitignore index d5a19a1ec6832..c29bcdf3c9361 100644 --- a/.gitignore +++ b/.gitignore @@ -591,6 +591,8 @@ lib/cmyth/Makefile /xbmc/cores/amlplayer/Makefile /xbmc/cores/omxplayer/Makefile +/xbmc/utils/Makefile + # /lib/ffmpeg/ /lib/ffmpeg/config.h /lib/ffmpeg/config.err diff --git a/configure.in b/configure.in index f7ddc388cd808..f8627c35b08f9 100644 --- a/configure.in +++ b/configure.in @@ -2390,7 +2390,8 @@ OUTPUT_FILES="Makefile \ xbmc/peripherals/devices/Makefile \ xbmc/android/activity/Makefile \ xbmc/android/loader/Makefile \ - xbmc/main/Makefile" + xbmc/main/Makefile \ + xbmc/utils/Makefile" if test "$use_skin_touched" = "yes"; then OUTPUT_FILES="$OUTPUT_FILES addons/skin.touched/media/Makefile" diff --git a/tools/amlogic/depends/xbmc/xbmc.mk b/tools/amlogic/depends/xbmc/xbmc.mk index bc3191bfc5ec7..da2ae74b1bc6e 100644 --- a/tools/amlogic/depends/xbmc/xbmc.mk +++ b/tools/amlogic/depends/xbmc/xbmc.mk @@ -9,7 +9,7 @@ $(SOURCE)/xbmc.bin: $(SOURCE)/Makefile $(SOURCE)/Makefile: $(SOURCE)/configure cd $(SOURCE); $(TARGET_CONFIGURE_OPTS) $(TARGET_CONFIGURE_ARGS) $(XBMC_CONF_ENV) \ ./configure --target=$(GNU_TARGET_NAME) --host=$(GNU_TARGET_NAME) --build=$(GNU_HOST_NAME) \ - --prefix=/usr --exec-prefix=/usr --sysconfdir=/etc $(XBMC_CONF_OPT) --disable-external-ffmpeg --enable-codec=amcodec + --prefix=/usr --exec-prefix=/usr --sysconfdir=/etc $(XBMC_CONF_OPT) --disable-external-ffmpeg $(SOURCE)/configure: $(BUILDROOT)/package/thirdparty/xbmc/xbmc.mk $(GCC) cd $(SOURCE); ./bootstrap diff --git a/xbmc/cores/AudioEngine/Sinks/AESinkALSA.cpp b/xbmc/cores/AudioEngine/Sinks/AESinkALSA.cpp index d9e3f421532d4..6375e5803be77 100644 --- a/xbmc/cores/AudioEngine/Sinks/AESinkALSA.cpp +++ b/xbmc/cores/AudioEngine/Sinks/AESinkALSA.cpp @@ -34,7 +34,7 @@ #include "threads/SingleLock.h" #include "settings/GUISettings.h" #if defined(HAS_AMLPLAYER) || defined(HAS_LIBAMCODEC) -#include "cores/amlplayer/AMLUtils.h" +#include "utils/AMLUtils.h" #endif #define ALSA_OPTIONS (SND_PCM_NONBLOCK | SND_PCM_NO_AUTO_FORMAT | SND_PCM_NO_AUTO_CHANNELS | SND_PCM_NO_AUTO_RESAMPLE) diff --git a/xbmc/cores/AudioEngine/Sinks/AESinkAUDIOTRACK.cpp b/xbmc/cores/AudioEngine/Sinks/AESinkAUDIOTRACK.cpp index 8f23b41187231..786104021b2c8 100644 --- a/xbmc/cores/AudioEngine/Sinks/AESinkAUDIOTRACK.cpp +++ b/xbmc/cores/AudioEngine/Sinks/AESinkAUDIOTRACK.cpp @@ -23,8 +23,8 @@ #include "Utils/AERingBuffer.h" #include "android/activity/XBMCApp.h" #include "utils/log.h" -#if defined(HAS_AMLPLAYER) -#include "cores/amlplayer/AMLUtils.h" +#if defined(HAS_AMLPLAYER) || defined(HAS_LIBAMCODEC) +#include "utils/AMLUtils.h" #endif #include diff --git a/xbmc/cores/amlplayer/AMLPlayer.cpp b/xbmc/cores/amlplayer/AMLPlayer.cpp index 60a4c42173502..33b318a911184 100644 --- a/xbmc/cores/amlplayer/AMLPlayer.cpp +++ b/xbmc/cores/amlplayer/AMLPlayer.cpp @@ -54,7 +54,7 @@ #include "settings/VideoSettings.h" // amlogic libplayer -#include "AMLUtils.h" +#include "utils/AMLUtils.h" #include "DllLibamplayer.h" struct AMLChapterInfo diff --git a/xbmc/cores/amlplayer/Makefile.in b/xbmc/cores/amlplayer/Makefile.in index 3d16c3daebcf7..93c0103ad6ecd 100644 --- a/xbmc/cores/amlplayer/Makefile.in +++ b/xbmc/cores/amlplayer/Makefile.in @@ -3,7 +3,6 @@ INCLUDES += -I$(prefix)/include/amlplayer SRCS = AMLPlayer.cpp -SRCS+= AMLUtils.cpp SRCS+= FileURLProtocol.cpp LIB = amlplayer.a @@ -13,4 +12,3 @@ LIB = amlplayer.a include @abs_top_srcdir@/Makefile.include -include $(patsubst %.cpp,%.P,$(patsubst %.c,%.P,$(SRCS))) - diff --git a/xbmc/cores/dvdplayer/DVDCodecs/Video/Amlogic.cpp b/xbmc/cores/dvdplayer/DVDCodecs/Video/Amlogic.cpp index 7c0bf9907cf4d..dca6dbcf8e3f2 100644 --- a/xbmc/cores/dvdplayer/DVDCodecs/Video/Amlogic.cpp +++ b/xbmc/cores/dvdplayer/DVDCodecs/Video/Amlogic.cpp @@ -26,9 +26,9 @@ #include "Application.h" #include "cores/dvdplayer/DVDClock.h" -#include "cores/amlplayer/AMLUtils.h" #include "cores/VideoRenderers/RenderManager.h" #include "settings/Settings.h" +#include "utils/AMLUtils.h" #include "utils/log.h" #include "utils/TimeUtils.h" diff --git a/xbmc/cores/amlplayer/AMLUtils.cpp b/xbmc/utils/AMLUtils.cpp similarity index 100% rename from xbmc/cores/amlplayer/AMLUtils.cpp rename to xbmc/utils/AMLUtils.cpp diff --git a/xbmc/cores/amlplayer/AMLUtils.h b/xbmc/utils/AMLUtils.h similarity index 100% rename from xbmc/cores/amlplayer/AMLUtils.h rename to xbmc/utils/AMLUtils.h diff --git a/xbmc/utils/Makefile b/xbmc/utils/Makefile deleted file mode 100644 index b9b1bda4a8820..0000000000000 --- a/xbmc/utils/Makefile +++ /dev/null @@ -1,79 +0,0 @@ -SRCS=AlarmClock.cpp \ - AliasShortcutUtils.cpp \ - Archive.cpp \ - AsyncFileCopy.cpp \ - AutoPtrHandle.cpp \ - Base64.cpp \ - BitstreamConverter.cpp \ - BitstreamStats.cpp \ - CharsetConverter.cpp \ - CPUInfo.cpp \ - Crc32.cpp \ - CryptThreading.cpp \ - DatabaseUtils.cpp \ - DownloadQueue.cpp \ - DownloadQueueManager.cpp \ - EndianSwap.cpp \ - EdenVideoArtUpdater.cpp \ - Fanart.cpp \ - fastmemcpy.c \ - fastmemcpy-arm.S \ - FileOperationJob.cpp \ - FileUtils.cpp \ - fstrcmp.c \ - fft.cpp \ - GLUtils.cpp \ - GroupUtils.cpp \ - HTMLTable.cpp \ - HTMLUtil.cpp \ - HttpHeader.cpp \ - HttpParser.cpp \ - HttpResponse.cpp \ - InfoLoader.cpp \ - JobManager.cpp \ - JSONVariantParser.cpp \ - JSONVariantWriter.cpp \ - LabelFormatter.cpp \ - LangCodeExpander.cpp \ - LCD.cpp \ - LCDFactory.cpp \ - log.cpp \ - md5.cpp \ - Observer.cpp \ - Mime.cpp \ - PerformanceSample.cpp \ - PerformanceStats.cpp \ - POUtils.cpp \ - RecentlyAddedJob.cpp \ - RegExp.cpp \ - RingBuffer.cpp \ - RssReader.cpp \ - ScraperParser.cpp \ - ScraperUrl.cpp \ - Screenshot.cpp \ - SeekHandler.cpp \ - SortUtils.cpp \ - Splash.cpp \ - Stopwatch.cpp \ - StreamDetails.cpp \ - StreamUtils.cpp \ - StringUtils.cpp \ - SystemInfo.cpp \ - TextSearch.cpp \ - TimeSmoother.cpp \ - TimeUtils.cpp \ - TuxBoxUtil.cpp \ - URIUtils.cpp \ - UrlOptions.cpp \ - Variant.cpp \ - Vector.cpp \ - Weather.cpp \ - XBMCTinyXML.cpp \ - XMLUtils.cpp \ - XMLVariantParser.cpp \ - XMLVariantWriter.cpp \ - -LIB=utils.a - -include ../../Makefile.include --include $(patsubst %.cpp,%.P,$(patsubst %.c,%.P,$(patsubst %.S,,$(SRCS)))) diff --git a/xbmc/utils/Makefile.in b/xbmc/utils/Makefile.in new file mode 100644 index 0000000000000..736a5ad85b7a1 --- /dev/null +++ b/xbmc/utils/Makefile.in @@ -0,0 +1,84 @@ +SRCS += AlarmClock.cpp +SRCS += AliasShortcutUtils.cpp +SRCS += Archive.cpp +SRCS += AsyncFileCopy.cpp +ifeq (@USE_LIBAMCODEC@,1) +SRCS += AMLUtils.cpp +else ifeq (@USE_AMLPLAYER@,1) +SRCS += AMLUtils.cpp +endif +SRCS += AutoPtrHandle.cpp +SRCS += Base64.cpp +SRCS += BitstreamConverter.cpp +SRCS += BitstreamStats.cpp +SRCS += CharsetConverter.cpp +SRCS += CPUInfo.cpp +SRCS += Crc32.cpp +SRCS += CryptThreading.cpp +SRCS += DatabaseUtils.cpp +SRCS += DownloadQueue.cpp +SRCS += DownloadQueueManager.cpp +SRCS += EndianSwap.cpp +SRCS += EdenVideoArtUpdater.cpp +SRCS += Fanart.cpp +SRCS += fastmemcpy.c +SRCS += fastmemcpy-arm.S +SRCS += FileOperationJob.cpp +SRCS += FileUtils.cpp +SRCS += fstrcmp.c +SRCS += fft.cpp +SRCS += GLUtils.cpp +SRCS += GroupUtils.cpp +SRCS += HTMLTable.cpp +SRCS += HTMLUtil.cpp +SRCS += HttpHeader.cpp +SRCS += HttpParser.cpp +SRCS += HttpResponse.cpp +SRCS += InfoLoader.cpp +SRCS += JobManager.cpp +SRCS += JSONVariantParser.cpp +SRCS += JSONVariantWriter.cpp +SRCS += LabelFormatter.cpp +SRCS += LangCodeExpander.cpp +SRCS += LCD.cpp +SRCS += LCDFactory.cpp +SRCS += log.cpp +SRCS += md5.cpp +SRCS += Observer.cpp +SRCS += Mime.cpp +SRCS += PerformanceSample.cpp +SRCS += PerformanceStats.cpp +SRCS += POUtils.cpp +SRCS += RecentlyAddedJob.cpp +SRCS += RegExp.cpp +SRCS += RingBuffer.cpp +SRCS += RssReader.cpp +SRCS += ScraperParser.cpp +SRCS += ScraperUrl.cpp +SRCS += Screenshot.cpp +SRCS += SeekHandler.cpp +SRCS += SortUtils.cpp +SRCS += Splash.cpp +SRCS += Stopwatch.cpp +SRCS += StreamDetails.cpp +SRCS += StreamUtils.cpp +SRCS += StringUtils.cpp +SRCS += SystemInfo.cpp +SRCS += TextSearch.cpp +SRCS += TimeSmoother.cpp +SRCS += TimeUtils.cpp +SRCS += TuxBoxUtil.cpp +SRCS += URIUtils.cpp +SRCS += UrlOptions.cpp +SRCS += Variant.cpp +SRCS += Vector.cpp +SRCS += Weather.cpp +SRCS += XBMCTinyXML.cpp +SRCS += XMLUtils.cpp +SRCS += XMLVariantParser.cpp +SRCS += XMLVariantWriter.cpp + +LIB = utils.a + +include @abs_top_srcdir@/Makefile.include +-include $(patsubst %.cpp,%.P,$(patsubst %.c,%.P,$(patsubst %.S,,$(SRCS))))