diff --git a/Makefile b/Makefile index 7c391ed9..8991901c 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,6 @@ include Makefile.include -CFLAGS+=-std=c++0x -D__STDC_CONSTANT_MACROS -D__STDC_LIMIT_MACROS -DTARGET_POSIX -D_LINUX -fPIC -DPIC -D_REENTRANT -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -DHAVE_CMAKE_CONFIG -D__VIDEOCORE4__ -U_FORTIFY_SOURCE -Wall -DHAVE_OMXLIB -DUSE_EXTERNAL_FFMPEG -DHAVE_LIBAVCODEC_AVCODEC_H -DHAVE_LIBAVUTIL_OPT_H -DHAVE_LIBAVUTIL_MEM_H -DHAVE_LIBAVUTIL_AVUTIL_H -DHAVE_LIBAVFORMAT_AVFORMAT_H -DHAVE_LIBAVFILTER_AVFILTER_H -DHAVE_LIBSWRESAMPLE_SWRESAMPLE_H -DOMX -DOMX_SKIP64BIT -ftree-vectorize -DUSE_EXTERNAL_OMX -DTARGET_RASPBERRY_PI -DUSE_EXTERNAL_LIBBCM_HOST +CFLAGS+=-std=c++0x -D__STDC_CONSTANT_MACROS -D__STDC_LIMIT_MACROS -DTARGET_POSIX -DTARGET_LINUX -fPIC -DPIC -D_REENTRANT -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -DHAVE_CMAKE_CONFIG -D__VIDEOCORE4__ -U_FORTIFY_SOURCE -Wall -DHAVE_OMXLIB -DUSE_EXTERNAL_FFMPEG -DHAVE_LIBAVCODEC_AVCODEC_H -DHAVE_LIBAVUTIL_OPT_H -DHAVE_LIBAVUTIL_MEM_H -DHAVE_LIBAVUTIL_AVUTIL_H -DHAVE_LIBAVFORMAT_AVFORMAT_H -DHAVE_LIBAVFILTER_AVFILTER_H -DHAVE_LIBSWRESAMPLE_SWRESAMPLE_H -DOMX -DOMX_SKIP64BIT -ftree-vectorize -DUSE_EXTERNAL_OMX -DTARGET_RASPBERRY_PI -DUSE_EXTERNAL_LIBBCM_HOST LDFLAGS+=-L./ -lc -lWFC -lGLESv2 -lEGL -lbcm_host -lopenmaxil -lfreetype -lz -Lffmpeg_compiled/usr/local/lib/ INCLUDES+=-I./ -Ilinux -Iffmpeg_compiled/usr/local/include/ diff --git a/Makefile.ffmpeg b/Makefile.ffmpeg index e011ae40..defc4e16 100644 --- a/Makefile.ffmpeg +++ b/Makefile.ffmpeg @@ -1,6 +1,6 @@ include Makefile.include -CFLAGS=-D__STDC_CONSTANT_MACROS -D__STDC_LIMIT_MACROS -DTARGET_POSIX -D_LINUX -fPIC -DPIC -D_REENTRANT -D_HAVE_SBRK -D_LARGEFILE64_SOURCE -DHAVE_CMAKE_CONFIG -DHAVE_VMCS_CONFIG -D_REENTRANT -DUSE_VCHIQ_ARM -DVCHI_BULK_ALIGN=1 -DVCHI_BULK_GRANULARITY=1 -DEGL_SERVER_DISPMANX -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D__VIDEOCORE4__ -DGRAPHICS_X_VG=1 -U_FORTIFY_SOURCE -Wall -DHAVE_OMXLIB -DUSE_EXTERNAL_FFMPEG -DHAVE_LIBAVCODEC_AVCODEC_H -DHAVE_LIBAVUTIL_MEM_H -DHAVE_LIBAVUTIL_AVUTIL_H -DHAVE_LIBAVFORMAT_AVFORMAT_H -DHAVE_LIBAVFILTER_AVFILTER_H -DOMX -DOMX_SKIP64BIT +CFLAGS=-D__STDC_CONSTANT_MACROS -D__STDC_LIMIT_MACROS -DTARGET_POSIX -DTARGET_LINUX -fPIC -DPIC -D_REENTRANT -D_HAVE_SBRK -D_LARGEFILE64_SOURCE -DHAVE_CMAKE_CONFIG -DHAVE_VMCS_CONFIG -D_REENTRANT -DUSE_VCHIQ_ARM -DVCHI_BULK_ALIGN=1 -DVCHI_BULK_GRANULARITY=1 -DEGL_SERVER_DISPMANX -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D__VIDEOCORE4__ -DGRAPHICS_X_VG=1 -U_FORTIFY_SOURCE -Wall -DHAVE_OMXLIB -DUSE_EXTERNAL_FFMPEG -DHAVE_LIBAVCODEC_AVCODEC_H -DHAVE_LIBAVUTIL_MEM_H -DHAVE_LIBAVUTIL_AVUTIL_H -DHAVE_LIBAVFORMAT_AVFORMAT_H -DHAVE_LIBAVFILTER_AVFILTER_H -DOMX -DOMX_SKIP64BIT WORK=$(PWD) diff --git a/OMXAudioCodecOMX.cpp b/OMXAudioCodecOMX.cpp index 7e96d433..e8c2ea49 100644 --- a/OMXAudioCodecOMX.cpp +++ b/OMXAudioCodecOMX.cpp @@ -20,7 +20,7 @@ */ #include "OMXAudioCodecOMX.h" -#ifdef _LINUX +#ifdef TARGET_LINUX #include "XMemUtils.h" #endif #include "utils/log.h" diff --git a/OMXCore.cpp b/OMXCore.cpp index 342849ba..a425017f 100644 --- a/OMXCore.cpp +++ b/OMXCore.cpp @@ -18,9 +18,9 @@ * */ -#if (defined HAVE_CONFIG_H) && (!defined WIN32) +#if (defined HAVE_CONFIG_H) && (!defined TARGET_WINDOWS) #include "config.h" -#elif defined(_WIN32) +#elif defined(TARGET_WINDOWS) #include "system.h" #endif @@ -33,7 +33,7 @@ #include "OMXClock.h" -#ifdef _LINUX +#ifdef TARGET_LINUX #include "XMemUtils.h" #endif diff --git a/OMXStreamInfo.h b/OMXStreamInfo.h index 5cb52e88..d95f5606 100644 --- a/OMXStreamInfo.h +++ b/OMXStreamInfo.h @@ -24,7 +24,7 @@ #if (defined HAVE_CONFIG_H) && (!defined WIN32) #include "config.h" #endif -#ifndef _LINUX +#ifndef TARGET_LINUX enum AVCodecID; #else extern "C" { diff --git a/linux/PlatformDefs.h b/linux/PlatformDefs.h index 8910bbc9..75dc57db 100644 --- a/linux/PlatformDefs.h +++ b/linux/PlatformDefs.h @@ -22,7 +22,7 @@ * */ -#ifdef _LINUX +#ifdef TARGET_LINUX #define LINE_ENDING "\n" @@ -121,7 +121,7 @@ #define PRIuS "zu" #endif -#ifdef _LINUX +#ifdef TARGET_LINUX #define XXLog(a,b) printf("%s", (b)) diff --git a/linux/XSyncUtils.h b/linux/XSyncUtils.h index c8effa21..fead1ebd 100644 --- a/linux/XSyncUtils.h +++ b/linux/XSyncUtils.h @@ -25,7 +25,7 @@ #include "PlatformDefs.h" #include "XHandlePublic.h" -#ifdef _LINUX +#ifdef TARGET_LINUX #define STATUS_WAIT_0 ((DWORD )0x00000000L) #define WAIT_FAILED ((DWORD)0xFFFFFFFF) diff --git a/utils/MathUtils.h b/utils/MathUtils.h index 69f01338..4fe405b8 100644 --- a/utils/MathUtils.h +++ b/utils/MathUtils.h @@ -53,7 +53,7 @@ namespace MathUtils const float round_to_nearest = 0.5f; int i; -#ifndef _LINUX +#ifndef TARGET_LINUX __asm { fld x @@ -135,7 +135,7 @@ namespace MathUtils #endif int i; -#ifndef _LINUX +#ifndef TARGET_LINUX __asm { fld x diff --git a/utils/StdString.h b/utils/StdString.h index 49c62763..5f624b32 100644 --- a/utils/StdString.h +++ b/utils/StdString.h @@ -872,7 +872,7 @@ inline const Type& SSMAX(const Type& arg1, const Type& arg2) res = conv.in(st, pSrcA, pSrcA + nSrc, pNextSrcA, pDstW, pDstW + nDst, pNextDstW); -#ifdef _LINUX +#ifdef TARGET_LINUX #define ASSERT2(a) if (!(a)) {fprintf(stderr, "StdString: Assertion Failed on line %d\n", __LINE__);} #else #define ASSERT2 ASSERT @@ -919,7 +919,7 @@ inline const Type& SSMAX(const Type& arg1, const Type& arg2) res = conv.out(st, pSrcW, pSrcW + nSrc, pNextSrcW, pDstA, pDstA + nDst, pNextDstA); -#ifdef _LINUX +#ifdef TARGET_LINUX #define ASSERT2(a) if (!(a)) {fprintf(stderr, "StdString: Assertion Failed on line %d\n", __LINE__);} #else #define ASSERT2 ASSERT