export SHELL = bash

.SILENT:

###############
# Paths to external libraries (NEED ADJUSTMENTS)
XML2_INSTALL_PREFIX = /home/mirakulo/modified-oss/globoplay-standaloneOSS-build/work/sdk/common
BOOST_INSTALL_PREFIX = /sdk/boost
ZLIB_INSTALL_PREFIX = /home/mirakulo/modified-oss/globoplay-standaloneOSS-build/work/tools/zlib-1.2.3
###############


PROJECT_ROOT_DIR = $(PWD)
OBJ_DIR = $(PROJECT_ROOT_DIR)/obj
LIB_DIR = $(PROJECT_ROOT_DIR)/lib
SOURCES_ROOT_DIR = $(PROJECT_ROOT_DIR)/vlc
MODULES_DIR = $(SOURCES_ROOT_DIR)/modules
TARGET = $(LIB_DIR)/libvlc.so

CC = /mtkoss/gnuarm/neon_4.8.2_2.6.35_cortex-a9-ubuntu/x86_64/bin/armv7a-mediatek482_001_neon-linux-gnueabi-gcc
CXX = /mtkoss/gnuarm/neon_4.8.2_2.6.35_cortex-a9-ubuntu/x86_64/bin/armv7a-mediatek482_001_neon-linux-gnueabi-g++

CFLAGS = -D__ASTRO__ -DTQTVD_ENABLE_ATVDEBUG_LOG -DXHTMLPLAYER_LIBRARY=\"libtqtvd_astronav.so\" -DTQTVD_XHTML_TABLE_SIZE=1024 -DLUA_OS_TIME_RETURNS_TOT_DIRECTLY -DTQTVD_USE_CENTERED_PRINTF -DTQTVD_VIDEO_BUFFER_IS_BGRA -DTQTVD_ASTROTEST_ENABLED -DTQTVD_ASTROTEST_SAVES_SCREENSHOTS -DALPHA_CORRECTION_HACK_REMOVED -DTQTVD_GINGA_MANUAL_MODE_ENABLED -D_NO_SIGHANDLER_SUPPORT -DTQTVD_ATV -DBOOST_STRICT_CONFIG -DBOOST_SP_USE_PTHREADS -DSCHEDULER_THREADS_MIN=4 -DSCHEDULER_THREADS_MAX=4 -DTHREADPOOL_DESTRUCTOR_TIMEOUT=1000 -DTHREADPOOL_INCREASE_POOL_TIMEOUT=500 -DTHREADPOOL_DECREASE_POOL_TIMEOUT=5000 -DEVENT_BUS_THREAD_NUMBER=4 -DTHREADS_SERVINFO_SECTIONS_CACHE=1 -DMAX_MEM_SERVINFO_SECTION_CACHE=0x7d000 -DTHREADS_DSMCC_SECTIONS_CACHE=1 -DMAX_MEM_DSMCC_SECTION_CACHE=0x6C0000 -DTQTVD_SECTIONSCACHE_SECTION_FREE_RATE__95_PERCENT_OF_SUM_OF_ALL_SECTIONS_CACHES -DTQTVD_SECTIONSCACHE__JUST_KEEP_ACTUAL_AND_LAST_CAROUSELS -DTQTVD_DEFAULT_DEVICE_HANDLER=1 -DTQTVD_DONT_USE_LUAPLAYER_MEMCOUNTER -D"TQTVD_GFX_MAX_MEM=24*1024*1024" -DTQTVD_LUA_CANVAS_GFX_MEM_MARGIN=90/100 -DTQTVD_SCHEDULER_USE_CLOCK_MONOTONIC -DTQTVD_MONITOR_SCHED_YIELD_DOESNT_WORK_USE_SLEEP -DTQTVD_SCHEDULER_THREAD_USE_HIGH_PRIORITY -DTQTVD_REPAINTMANAGER_THREAD_USE_HIGH_PRIORITY -DNUM_OF_SCHEDULE_TABLES=7 -DPLATFORM_THREAD_PRIORITY_HIGH=50 -DPLATFORM_THREAD_PRIORITY_NORMAL=2 -DPLATFORM_THREAD_PRIORITY_LOW=1 -D"TQTVD_END_OF_LINE=\"\\n\\r\"" -DTQTVD_BUILD_PORTING_LAYER_STUBS -D_NO_SIGHANDLER_SUPPORT -DASTRO_RETURN_CHANNEL_CONNECT_TIMEOUT=1000 -DTQTVD_DISABLE_CONNECTION_MANAGER -DTQTVD_ENABLE_THREAD_PRIORIZATION -DTQTVD_THREAD_NAMING_SUPPORTED -DTQTVD_THREAD_NAMING_NO_SYSCALL_AVAILABLE -DTQTVD_MEMORY_ALIGNMENT_BOUNDARY=4 -DTQTVD_CLEAR_SRVCACHE_ON_SERVICE_UNSELECT -DTQTVD_CLEAR_SIBASE_EVENT_DATA_ON_SERVICE_UNSELECT -DTQTVD_ASTRO_JAVA_CONFIGURATION=\"\" -DTQTVD_ASTRO_JAVA_PROFILE=\"\" -DTQTVD_ASTRO_GINGAJ_VERSION=\"\" -DTQTVD_ASTROJ_JAVADTV_VERSION=\"\" -DTQTVD_ASTRO_GINGAJ_PROFILE=\"B\" -DTQTVD_ASTRO_GINGA_VERSION=\"1.0\" -DTQTVD_ASTRO_LUA_VERSION=\"5.1\" -DTQTVD_ASTROJ_TIMEZONE=\"America/Sao_Paulo\" -DTQTVD_ASTROJ_CONFIG_PATH=\"/3rd/ginga/lib/config/\" -DTQTVD_ASTROJ_LIBRARY_PATH=\"/3rd/ginga/lib/java\" -DTQTVD_ASTRO_PERSISTENT_ROOTPATH=\"file:///apps\" -DTQTVD_ASTROJ_DEFAULT_CONNECTION_TIMEOUT=\"60000\" -DTQTVD_ENABLE_CLOCK_ADJUSTMENT -DTQTVD_CURLOPT_CAINFO=\"/3rd/ginga/lib/config/certs/cacert.pem\" -DTQTVD_ENABLE_ATVDEBUG_LOG -DXHTMLPLAYER_LIBRARY=\"libtqtvd_astronav.so\" -DTQTVD_XHTML_TABLE_SIZE=1024 -DLUA_OS_TIME_RETURNS_TOT_DIRECTLY -DTQTVD_USE_CENTERED_PRINTF -DTQTVD_VIDEO_BUFFER_IS_BGRA -DTQTVD_ASTROTEST_ENABLED -DTQTVD_ASTROTEST_SAVES_SCREENSHOTS -DALPHA_CORRECTION_HACK_REMOVED -DTQTVD_GINGA_MANUAL_MODE_ENABLED -D_NO_SIGHANDLER_SUPPORT -DTQTVD_ATV -DBOOST_STRICT_CONFIG -DBOOST_SP_USE_PTHREADS -DSCHEDULER_THREADS_MIN=4 -DSCHEDULER_THREADS_MAX=4 -DTHREADPOOL_DESTRUCTOR_TIMEOUT=1000 -DTHREADPOOL_INCREASE_POOL_TIMEOUT=500 -DTHREADPOOL_DECREASE_POOL_TIMEOUT=5000 -DEVENT_BUS_THREAD_NUMBER=4 -DTHREADS_SERVINFO_SECTIONS_CACHE=1 -DMAX_MEM_SERVINFO_SECTION_CACHE=0x7d000 -DTHREADS_DSMCC_SECTIONS_CACHE=1 -DMAX_MEM_DSMCC_SECTION_CACHE=0x6C0000 -DTQTVD_SECTIONSCACHE_SECTION_FREE_RATE__95_PERCENT_OF_SUM_OF_ALL_SECTIONS_CACHES -DTQTVD_SECTIONSCACHE__JUST_KEEP_ACTUAL_AND_LAST_CAROUSELS -DTQTVD_DEFAULT_DEVICE_HANDLER=1 -DTQTVD_DONT_USE_LUAPLAYER_MEMCOUNTER -D"TQTVD_GFX_MAX_MEM=24*1024*1024" -DTQTVD_LUA_CANVAS_GFX_MEM_MARGIN=90/100 -DTQTVD_SCHEDULER_USE_CLOCK_MONOTONIC -DTQTVD_MONITOR_SCHED_YIELD_DOESNT_WORK_USE_SLEEP -DTQTVD_SCHEDULER_THREAD_USE_HIGH_PRIORITY -DTQTVD_REPAINTMANAGER_THREAD_USE_HIGH_PRIORITY -DNUM_OF_SCHEDULE_TABLES=7 -DPLATFORM_THREAD_PRIORITY_HIGH=50 -DPLATFORM_THREAD_PRIORITY_NORMAL=2 -DPLATFORM_THREAD_PRIORITY_LOW=1 -D"TQTVD_END_OF_LINE=\"\\n\\r\"" -DTQTVD_BUILD_PORTING_LAYER_STUBS -D_NO_SIGHANDLER_SUPPORT -DASTRO_RETURN_CHANNEL_CONNECT_TIMEOUT=1000 -DTQTVD_DISABLE_CONNECTION_MANAGER -DTQTVD_ENABLE_THREAD_PRIORIZATION -DTQTVD_THREAD_NAMING_SUPPORTED -DTQTVD_THREAD_NAMING_NO_SYSCALL_AVAILABLE -DTQTVD_MEMORY_ALIGNMENT_BOUNDARY=4 -DTQTVD_CLEAR_SRVCACHE_ON_SERVICE_UNSELECT -DTQTVD_CLEAR_SIBASE_EVENT_DATA_ON_SERVICE_UNSELECT -DTQTVD_ASTRO_JAVA_CONFIGURATION=\"\" -DTQTVD_ASTRO_JAVA_PROFILE=\"\" -DTQTVD_ASTRO_GINGAJ_VERSION=\"\" -DTQTVD_ASTROJ_JAVADTV_VERSION=\"\" -DTQTVD_ASTRO_GINGAJ_PROFILE=\"B\" -DTQTVD_ASTRO_GINGA_VERSION=\"1.0\" -DTQTVD_ASTRO_LUA_VERSION=\"5.1\" -DTQTVD_ASTROJ_TIMEZONE=\"America/Sao_Paulo\" -DTQTVD_ASTROJ_CONFIG_PATH=\"/3rd/ginga/lib/config/\" -DTQTVD_ASTROJ_LIBRARY_PATH=\"/3rd/ginga/lib/java\" -DTQTVD_ASTRO_PERSISTENT_ROOTPATH=\"file:///apps\" -DTQTVD_ASTROJ_DEFAULT_CONNECTION_TIMEOUT=\"60000\" -DTQTVD_ENABLE_CLOCK_ADJUSTMENT -DTQTVD_CURLOPT_CAINFO=\"/3rd/ginga/lib/config/certs/cacert.pem\" -DDONT_USE_OPENSSL_DEPRECATED_FUNCTIONS -DTQTVD_DONT_BUILD_TIME_LOGGER -DTQTVD_RUNTIME_GLOBOPLAY_APP_UPDATE_DIR=\"/3rd_rw/globoplay/client/apps/globoplay\" -DTQTVD_RUNTIME_GLOBOPLAY_APP_INSTALLATION_DIR=\"/_3rd/globoplay/client/apps/globoplay\" -DNDEBUG -DEMIT_ASN_DEBUG=0 -DTQTVD_USE_WATERMARK -DTQTVD_DYNAMIC_LOADING_OF_COMPONENTS_DISABLED=1 -DTQTVD_PLATFORM=\"gp-sony-2019-unicorn\" -DMAGIC_LINK_DISABLED=1 -DTQTVD_PORTING_MODEL_1 -DTQTVD_NO_LUAJAVA -DENABLE_CURLX_PRINTF -DHAVE_CONFIG_H -DENABLE_IPV6 -DBUILDING_LIBCURL -DUSE_ARES -DTQTVD_DISABLE_XHTML_UNLOAD -DTQTVD_ATV_THREADS_EXTENSION -Dtypeof=__typeof__ -DLOCALEDIR=\"/usr/share/locale\" -DPKGLIBDIR=\".\" -DPKGDATADIR=\".\" -Dvlc_EXPORTS -std=gnu99 -O2 -march=armv7-a -mtune=cortex-a9 -mfloat-abi=softfp -mfpu=neon-vfpv4 -DNDEBUG -fomit-frame-pointer -DMKO_JEMALLOC_ENABLED -DMODEL=FF  -DPBAPROFILE_UNBUFFERED_AUDIO_VIDEO  -fPIC -Wall -Wno-undef -Wno-cast-qual -Wno-comment -Wno-write-strings -Wno-parentheses -Wreturn-type -Wunused-value -Wunused-variable -Wpointer-arith -Wno-unused-function -Wno-unused-but-set-variable -Wno-deprecated-declarations -fno-strict-aliasing -fsigned-char -fno-aggressive-loop-optimizations -fno-builtin -ffunction-sections -fdata-sections -fno-short-enums -DTQTVD_USE_NON_STRING_TQTVD_ASTRO_FILES_DIR -DTQTVD_RUNTIME_ASTROTV_DIR=/3rd/ginga -DTQTVD_ASTRO_FILES_DIR=/3rd/ginga/lib/ -DTQTVD_GLOBOPLAY_CACERT_FILE=/_3rd/globoplay/client/apps/globoplay/config/certs/cacert.pem -DLINUX_THREADS=8000 -DNPTL=8001 -D_LINUX_ -D__ARM__ -D__arm__ -D_REENTRANT -DOPENSSL_NO_DGRAM -DNO_SYSLOG -DNO_SYS_UN_H -D_GNU_SOURCE -D__ARM_EABI__ -DFAR= -DMKO_GSTREAMER_SUPPORT -DTQTVD_NO_JAVA -I/work/deploy/jemalloc/include -I$(BOOST_INSTALL_PREFIX) -I$(XML2_INSTALL_PREFIX)/include/libxml2 -I/mtkoss/gnuarm/neon_4.8.2_2.6.35_cortex-a9-ubuntu/apollo/oss/library/gnuarm-4.8.2_neon_ca9/zlib/1.2.3/pre-install/include -I/mtkoss/gnuarm/neon_4.8.2_2.6.35_cortex-a9-ubuntu/apollo/oss/library/gnuarm-4.8.2_neon_ca9/mng/1.0.10/pre-install/include -I/mtkoss/gnuarm/neon_4.8.2_2.6.35_cortex-a9-ubuntu/apollo/linux_core/driver/directfb/directfb_1.5.3/Source/DirectFB/include -I/mtkoss/gnuarm/neon_4.8.2_2.6.35_cortex-a9-ubuntu/apollo/linux_core/driver/directfb/directfb_1.5.3/Source/DirectFB/lib -I/mtkoss/gnuarm/neon_4.8.2_2.6.35_cortex-a9-ubuntu/apollo/mtk_obj/SOEM_4K_linux/Unicorn_4K_BZ/rel/inc/c_inc -I/mtkoss/gnuarm/neon_4.8.2_2.6.35_cortex-a9-ubuntu/apollo/middleware/public -DMDA_VIDEO_USES_SECUREBUFFERS -Wstrict-prototypes -DTQTVD_LOG_THREAD_SAFE -DLUA_USE_LINUX -DHAVE_CONFIG_H -D_REENTRANT -Wall -Wno-deprecated-declarations -Wno-unused-variable -Wno-unused-parameter -Wno-return-type -std=gnu99 -Wno-deprecated-declarations -Wno-unused-variable -Wno-unused-parameter -Wno-return-type -fPIC -I$(MODULES_DIR)/stream_filter/dash -I$(SOURCES_ROOT_DIR)/src -I/work/astrotv/external/vlc/vlc/lib -I/work/astrotv/external/vlc/vlc/include -I/work/astrotv/external/vlc/vlc -I/work/astrotv/external/vlc/. -I/work/astrotv/TARGET_STUB/atv_porting_layer/extensions/threads -I/work/configs -I/work/astrotv/zapper_support -I/work/astrotv/watermark -I/work/astrotv/astronav/AstroNavPlayer/GraphicManager -I/work/astrotv/external/lua_modules -I/work/astrotv/external/openssl/install/gp-sony-2019-unicorn/include -I/work/astrotv/external/openssl/install/gp-sony-2019-unicorn/include/openssl -I/work/astrotv/TARGET_STUB/atv_porting_layer -I/work/astrotv/TARGET_STUB/atv_porting_layer_stub -I/work/astrotv/middleware_manager -I/work/astrotv/connection_manager -I/work/astrotv/property_manager -I/work/astrotv/pl_helper -I/work/astrotv/return_channel -I/work/astrotv/lua/src -I/work/astrotv/file -I/work/astrotv/dsmcc/impl -I/work/astrotv/dsmcc -I/work/astrotv/section_filter -I/work/astrotv/application_manager -I/work/astrotv/service_selector -I/work/astrotv/resource_manager -I/work/astrotv/serviceInformation -I/work/astrotv/network_manager -I/work/astrotv/platform_manager -I/work/astrotv/input_manager -I/work/astrotv/demux_manager -I/work/astrotv/audio_manager -I/work/astrotv/screen_manager -I/work/astrotv/comp_manager -I/work/astrotv/event_manager -I/work/astrotv/eventbus -I/work/astrotv/media_manager -I/work/astrotv/graphic_manager -I/work/astrotv/general -I/work/astrotv/xmlparser -I/work/astrotv/. -I/work/astrotv/external/c-ares -I/work/astrotv/external/curl/include -I/work/astrotv/external/curl/lib -I$(PROJECT_ROOT_DIR) -I$(PROJECT_ROOT_DIR)/vlc/include -I$(ZLIB_INSTALL_PREFIX) -D'strerror_l(errnum, locale)=strerror(errnum)'
CXXFLAGS=-D__ASTRO__ -DTQTVD_ENABLE_ATVDEBUG_LOG -DXHTMLPLAYER_LIBRARY=\"libtqtvd_astronav.so\" -DTQTVD_XHTML_TABLE_SIZE=1024 -DLUA_OS_TIME_RETURNS_TOT_DIRECTLY -DTQTVD_USE_CENTERED_PRINTF -DTQTVD_VIDEO_BUFFER_IS_BGRA -DTQTVD_ASTROTEST_ENABLED -DTQTVD_ASTROTEST_SAVES_SCREENSHOTS -DALPHA_CORRECTION_HACK_REMOVED -DTQTVD_GINGA_MANUAL_MODE_ENABLED -D_NO_SIGHANDLER_SUPPORT -DTQTVD_ATV -DBOOST_STRICT_CONFIG -DBOOST_SP_USE_PTHREADS -DSCHEDULER_THREADS_MIN=4 -DSCHEDULER_THREADS_MAX=4 -DTHREADPOOL_DESTRUCTOR_TIMEOUT=1000 -DTHREADPOOL_INCREASE_POOL_TIMEOUT=500 -DTHREADPOOL_DECREASE_POOL_TIMEOUT=5000 -DEVENT_BUS_THREAD_NUMBER=4 -DTHREADS_SERVINFO_SECTIONS_CACHE=1 -DMAX_MEM_SERVINFO_SECTION_CACHE=0x7d000 -DTHREADS_DSMCC_SECTIONS_CACHE=1 -DMAX_MEM_DSMCC_SECTION_CACHE=0x6C0000 -DTQTVD_SECTIONSCACHE_SECTION_FREE_RATE__95_PERCENT_OF_SUM_OF_ALL_SECTIONS_CACHES -DTQTVD_SECTIONSCACHE__JUST_KEEP_ACTUAL_AND_LAST_CAROUSELS -DTQTVD_DEFAULT_DEVICE_HANDLER=1 -DTQTVD_DONT_USE_LUAPLAYER_MEMCOUNTER -D"TQTVD_GFX_MAX_MEM=24*1024*1024" -DTQTVD_LUA_CANVAS_GFX_MEM_MARGIN=90/100 -DTQTVD_SCHEDULER_USE_CLOCK_MONOTONIC -DTQTVD_MONITOR_SCHED_YIELD_DOESNT_WORK_USE_SLEEP -DTQTVD_SCHEDULER_THREAD_USE_HIGH_PRIORITY -DTQTVD_REPAINTMANAGER_THREAD_USE_HIGH_PRIORITY -DNUM_OF_SCHEDULE_TABLES=7 -DPLATFORM_THREAD_PRIORITY_HIGH=50 -DPLATFORM_THREAD_PRIORITY_NORMAL=2 -DPLATFORM_THREAD_PRIORITY_LOW=1 -D"TQTVD_END_OF_LINE=\"\\n\\r\"" -DTQTVD_BUILD_PORTING_LAYER_STUBS -D_NO_SIGHANDLER_SUPPORT -DASTRO_RETURN_CHANNEL_CONNECT_TIMEOUT=1000 -DTQTVD_DISABLE_CONNECTION_MANAGER -DTQTVD_ENABLE_THREAD_PRIORIZATION -DTQTVD_THREAD_NAMING_SUPPORTED -DTQTVD_THREAD_NAMING_NO_SYSCALL_AVAILABLE -DTQTVD_MEMORY_ALIGNMENT_BOUNDARY=4 -DTQTVD_CLEAR_SRVCACHE_ON_SERVICE_UNSELECT -DTQTVD_CLEAR_SIBASE_EVENT_DATA_ON_SERVICE_UNSELECT -DTQTVD_ASTRO_JAVA_CONFIGURATION=\"\" -DTQTVD_ASTRO_JAVA_PROFILE=\"\" -DTQTVD_ASTRO_GINGAJ_VERSION=\"\" -DTQTVD_ASTROJ_JAVADTV_VERSION=\"\" -DTQTVD_ASTRO_GINGAJ_PROFILE=\"B\" -DTQTVD_ASTRO_GINGA_VERSION=\"1.0\" -DTQTVD_ASTRO_LUA_VERSION=\"5.1\" -DTQTVD_ASTROJ_TIMEZONE=\"America/Sao_Paulo\" -DTQTVD_ASTROJ_CONFIG_PATH=\"/3rd/ginga/lib/config/\" -DTQTVD_ASTROJ_LIBRARY_PATH=\"/3rd/ginga/lib/java\" -DTQTVD_ASTRO_PERSISTENT_ROOTPATH=\"file:///apps\" -DTQTVD_ASTROJ_DEFAULT_CONNECTION_TIMEOUT=\"60000\" -DTQTVD_ENABLE_CLOCK_ADJUSTMENT -DTQTVD_CURLOPT_CAINFO=\"/3rd/ginga/lib/config/certs/cacert.pem\" -DTQTVD_ENABLE_ATVDEBUG_LOG -DXHTMLPLAYER_LIBRARY=\"libtqtvd_astronav.so\" -DTQTVD_XHTML_TABLE_SIZE=1024 -DLUA_OS_TIME_RETURNS_TOT_DIRECTLY -DTQTVD_USE_CENTERED_PRINTF -DTQTVD_VIDEO_BUFFER_IS_BGRA -DTQTVD_ASTROTEST_ENABLED -DTQTVD_ASTROTEST_SAVES_SCREENSHOTS -DALPHA_CORRECTION_HACK_REMOVED -DTQTVD_GINGA_MANUAL_MODE_ENABLED -D_NO_SIGHANDLER_SUPPORT -DTQTVD_ATV -DBOOST_STRICT_CONFIG -DBOOST_SP_USE_PTHREADS -DSCHEDULER_THREADS_MIN=4 -DSCHEDULER_THREADS_MAX=4 -DTHREADPOOL_DESTRUCTOR_TIMEOUT=1000 -DTHREADPOOL_INCREASE_POOL_TIMEOUT=500 -DTHREADPOOL_DECREASE_POOL_TIMEOUT=5000 -DEVENT_BUS_THREAD_NUMBER=4 -DTHREADS_SERVINFO_SECTIONS_CACHE=1 -DMAX_MEM_SERVINFO_SECTION_CACHE=0x7d000 -DTHREADS_DSMCC_SECTIONS_CACHE=1 -DMAX_MEM_DSMCC_SECTION_CACHE=0x6C0000 -DTQTVD_SECTIONSCACHE_SECTION_FREE_RATE__95_PERCENT_OF_SUM_OF_ALL_SECTIONS_CACHES -DTQTVD_SECTIONSCACHE__JUST_KEEP_ACTUAL_AND_LAST_CAROUSELS -DTQTVD_DEFAULT_DEVICE_HANDLER=1 -DTQTVD_DONT_USE_LUAPLAYER_MEMCOUNTER -D"TQTVD_GFX_MAX_MEM=24*1024*1024" -DTQTVD_LUA_CANVAS_GFX_MEM_MARGIN=90/100 -DTQTVD_SCHEDULER_USE_CLOCK_MONOTONIC -DTQTVD_MONITOR_SCHED_YIELD_DOESNT_WORK_USE_SLEEP -DTQTVD_SCHEDULER_THREAD_USE_HIGH_PRIORITY -DTQTVD_REPAINTMANAGER_THREAD_USE_HIGH_PRIORITY -DNUM_OF_SCHEDULE_TABLES=7 -DPLATFORM_THREAD_PRIORITY_HIGH=50 -DPLATFORM_THREAD_PRIORITY_NORMAL=2 -DPLATFORM_THREAD_PRIORITY_LOW=1 -D"TQTVD_END_OF_LINE=\"\\n\\r\"" -DTQTVD_BUILD_PORTING_LAYER_STUBS -D_NO_SIGHANDLER_SUPPORT -DASTRO_RETURN_CHANNEL_CONNECT_TIMEOUT=1000 -DTQTVD_DISABLE_CONNECTION_MANAGER -DTQTVD_ENABLE_THREAD_PRIORIZATION -DTQTVD_THREAD_NAMING_SUPPORTED -DTQTVD_THREAD_NAMING_NO_SYSCALL_AVAILABLE -DTQTVD_MEMORY_ALIGNMENT_BOUNDARY=4 -DTQTVD_CLEAR_SRVCACHE_ON_SERVICE_UNSELECT -DTQTVD_CLEAR_SIBASE_EVENT_DATA_ON_SERVICE_UNSELECT -DTQTVD_ASTRO_JAVA_CONFIGURATION=\"\" -DTQTVD_ASTRO_JAVA_PROFILE=\"\" -DTQTVD_ASTRO_GINGAJ_VERSION=\"\" -DTQTVD_ASTROJ_JAVADTV_VERSION=\"\" -DTQTVD_ASTRO_GINGAJ_PROFILE=\"B\" -DTQTVD_ASTRO_GINGA_VERSION=\"1.0\" -DTQTVD_ASTRO_LUA_VERSION=\"5.1\" -DTQTVD_ASTROJ_TIMEZONE=\"America/Sao_Paulo\" -DTQTVD_ASTROJ_CONFIG_PATH=\"/3rd/ginga/lib/config/\" -DTQTVD_ASTROJ_LIBRARY_PATH=\"/3rd/ginga/lib/java\" -DTQTVD_ASTRO_PERSISTENT_ROOTPATH=\"file:///apps\" -DTQTVD_ASTROJ_DEFAULT_CONNECTION_TIMEOUT=\"60000\" -DTQTVD_ENABLE_CLOCK_ADJUSTMENT -DTQTVD_CURLOPT_CAINFO=\"/3rd/ginga/lib/config/certs/cacert.pem\" -DDONT_USE_OPENSSL_DEPRECATED_FUNCTIONS -DTQTVD_DONT_BUILD_TIME_LOGGER -DTQTVD_RUNTIME_GLOBOPLAY_APP_UPDATE_DIR=\"/3rd_rw/globoplay/client/apps/globoplay\" -DTQTVD_RUNTIME_GLOBOPLAY_APP_INSTALLATION_DIR=\"/_3rd/globoplay/client/apps/globoplay\" -DNDEBUG -DEMIT_ASN_DEBUG=0 -DTQTVD_USE_WATERMARK -DTQTVD_DYNAMIC_LOADING_OF_COMPONENTS_DISABLED=1 -DTQTVD_PLATFORM=\"gp-sony-2019-unicorn\" -DMAGIC_LINK_DISABLED=1 -DTQTVD_PORTING_MODEL_1 -DTQTVD_NO_LUAJAVA -DENABLE_CURLX_PRINTF -DHAVE_CONFIG_H -DENABLE_IPV6 -DBUILDING_LIBCURL -DUSE_ARES -DTQTVD_DISABLE_XHTML_UNLOAD -DTQTVD_ATV_THREADS_EXTENSION -Dtypeof=__typeof__ -DLOCALEDIR=\"/usr/share/locale\" -DPKGLIBDIR=\".\" -DPKGDATADIR=\".\" -Dvlc_EXPORTS -O2 -march=armv7-a -mtune=cortex-a9 -mfloat-abi=softfp -mfpu=neon-vfpv4 -DNDEBUG -fomit-frame-pointer -DMKO_JEMALLOC_ENABLED -DMODEL=FF  -DPBAPROFILE_UNBUFFERED_AUDIO_VIDEO  -fPIC -Wall -Wno-undef -Wno-cast-qual -Wno-comment -Wno-write-strings -Wno-parentheses -Wreturn-type -Wunused-value -Wunused-variable -Wpointer-arith -Wno-unused-function -Wno-unused-but-set-variable -Wno-deprecated-declarations -fno-strict-aliasing -fsigned-char -fno-aggressive-loop-optimizations -fno-builtin -ffunction-sections -fdata-sections -fno-short-enums -DTQTVD_USE_NON_STRING_TQTVD_ASTRO_FILES_DIR -DTQTVD_RUNTIME_ASTROTV_DIR=/3rd/ginga -DTQTVD_ASTRO_FILES_DIR=/3rd/ginga/lib/ -DTQTVD_GLOBOPLAY_CACERT_FILE=/_3rd/globoplay/client/apps/globoplay/config/certs/cacert.pem -DLINUX_THREADS=8000 -DNPTL=8001 -D_LINUX_ -D__ARM__ -D__arm__ -D_REENTRANT -DOPENSSL_NO_DGRAM -DNO_SYSLOG -DNO_SYS_UN_H -D_GNU_SOURCE -D__ARM_EABI__ -DFAR= -DMKO_GSTREAMER_SUPPORT -DTQTVD_NO_JAVA -I/work/deploy/jemalloc/include -I$(BOOST_INSTALL_PREFIX) -I$(XML2_INSTALL_PREFIX)/include/libxml2 -I/mtkoss/gnuarm/neon_4.8.2_2.6.35_cortex-a9-ubuntu/apollo/oss/library/gnuarm-4.8.2_neon_ca9/zlib/1.2.3/pre-install/include -I/mtkoss/gnuarm/neon_4.8.2_2.6.35_cortex-a9-ubuntu/apollo/oss/library/gnuarm-4.8.2_neon_ca9/mng/1.0.10/pre-install/include -I/mtkoss/gnuarm/neon_4.8.2_2.6.35_cortex-a9-ubuntu/apollo/linux_core/driver/directfb/directfb_1.5.3/Source/DirectFB/include -I/mtkoss/gnuarm/neon_4.8.2_2.6.35_cortex-a9-ubuntu/apollo/linux_core/driver/directfb/directfb_1.5.3/Source/DirectFB/lib -I/mtkoss/gnuarm/neon_4.8.2_2.6.35_cortex-a9-ubuntu/apollo/mtk_obj/SOEM_4K_linux/Unicorn_4K_BZ/rel/inc/c_inc -I/mtkoss/gnuarm/neon_4.8.2_2.6.35_cortex-a9-ubuntu/apollo/middleware/public -DMDA_VIDEO_USES_SECUREBUFFERS -DTQTVD_LOG_THREAD_SAFE -DLUA_USE_LINUX -DHAVE_CONFIG_H -D_REENTRANT -Wall -Wno-deprecated-declarations -Wno-unused-variable -Wno-unused-parameter -Wno-return-type -Wno-deprecated-declarations -Wno-unused-variable -Wno-unused-parameter -Wno-return-type -fPIC -I$(MODULES_DIR)/stream_filter/dash -I$(SOURCES_ROOT_DIR)/src -I/work/astrotv/external/vlc/vlc/lib -I/work/astrotv/external/vlc/vlc/include -I/work/astrotv/external/vlc/vlc -I/work/astrotv/external/vlc/. -I/work/astrotv/TARGET_STUB/atv_porting_layer/extensions/threads -I/work/configs -I/work/astrotv/zapper_support -I/work/astrotv/watermark -I/work/astrotv/astronav/AstroNavPlayer/GraphicManager -I/work/astrotv/external/lua_modules -I/work/astrotv/external/openssl/install/gp-sony-2019-unicorn/include -I/work/astrotv/external/openssl/install/gp-sony-2019-unicorn/include/openssl -I/work/astrotv/TARGET_STUB/atv_porting_layer -I/work/astrotv/TARGET_STUB/atv_porting_layer_stub -I/work/astrotv/middleware_manager -I/work/astrotv/connection_manager -I/work/astrotv/property_manager -I/work/astrotv/pl_helper -I/work/astrotv/return_channel -I/work/astrotv/lua/src -I/work/astrotv/file -I/work/astrotv/dsmcc/impl -I/work/astrotv/dsmcc -I/work/astrotv/section_filter -I/work/astrotv/application_manager -I/work/astrotv/service_selector -I/work/astrotv/resource_manager -I/work/astrotv/serviceInformation -I/work/astrotv/network_manager -I/work/astrotv/platform_manager -I/work/astrotv/input_manager -I/work/astrotv/demux_manager -I/work/astrotv/audio_manager -I/work/astrotv/screen_manager -I/work/astrotv/comp_manager -I/work/astrotv/event_manager -I/work/astrotv/eventbus -I/work/astrotv/media_manager -I/work/astrotv/graphic_manager -I/work/astrotv/general -I/work/astrotv/xmlparser -I/work/astrotv/. -I/work/astrotv/external/c-ares -I/work/astrotv/external/curl/include -I/work/astrotv/external/curl/lib -I$(PROJECT_ROOT_DIR) -I$(PROJECT_ROOT_DIR)/vlc/include -I$(ZLIB_INSTALL_PREFIX) -D'strerror_l(errnum, locale)=strerror(errnum)'
LDFLAGS=-fPIC -O2 -march=armv7-a -mtune=cortex-a9 -mfloat-abi=softfp -mfpu=neon-vfpv4 -DNDEBUG -fomit-frame-pointer -DMKO_JEMALLOC_ENABLED -DMODEL=FF  -DPBAPROFILE_UNBUFFERED_AUDIO_VIDEO  -fPIC -Wall -Wno-undef -Wno-cast-qual -Wno-comment -Wno-write-strings -Wno-parentheses -Wreturn-type -Wunused-value -Wunused-variable -Wpointer-arith -Wno-unused-function -Wno-unused-but-set-variable -Wno-deprecated-declarations -fno-strict-aliasing -fsigned-char -fno-aggressive-loop-optimizations -fno-builtin -ffunction-sections -fdata-sections -fno-short-enums -DTQTVD_USE_NON_STRING_TQTVD_ASTRO_FILES_DIR -DTQTVD_RUNTIME_ASTROTV_DIR=/3rd/ginga -DTQTVD_ASTRO_FILES_DIR=/3rd/ginga/lib/ -DTQTVD_GLOBOPLAY_CACERT_FILE=/_3rd/globoplay/client/apps/globoplay/config/certs/cacert.pem -DLINUX_THREADS=8000 -DNPTL=8001 -D_LINUX_ -D__ARM__ -D__arm__ -D_REENTRANT -DOPENSSL_NO_DGRAM -DNO_SYSLOG -DNO_SYS_UN_H -D_GNU_SOURCE -D__ARM_EABI__ -DFAR= -DMKO_GSTREAMER_SUPPORT -DTQTVD_NO_JAVA -I/work/deploy/jemalloc/include -I$(BOOST_INSTALL_PREFIX) -I$(XML2_INSTALL_PREFIX)/include/libxml2 -I/mtkoss/gnuarm/neon_4.8.2_2.6.35_cortex-a9-ubuntu/apollo/oss/library/gnuarm-4.8.2_neon_ca9/zlib/1.2.3/pre-install/include -I/mtkoss/gnuarm/neon_4.8.2_2.6.35_cortex-a9-ubuntu/apollo/oss/library/gnuarm-4.8.2_neon_ca9/mng/1.0.10/pre-install/include -I/mtkoss/gnuarm/neon_4.8.2_2.6.35_cortex-a9-ubuntu/apollo/linux_core/driver/directfb/directfb_1.5.3/Source/DirectFB/include -I/mtkoss/gnuarm/neon_4.8.2_2.6.35_cortex-a9-ubuntu/apollo/linux_core/driver/directfb/directfb_1.5.3/Source/DirectFB/lib -I/mtkoss/gnuarm/neon_4.8.2_2.6.35_cortex-a9-ubuntu/apollo/mtk_obj/SOEM_4K_linux/Unicorn_4K_BZ/rel/inc/c_inc -I/mtkoss/gnuarm/neon_4.8.2_2.6.35_cortex-a9-ubuntu/apollo/middleware/public -DMDA_VIDEO_USES_SECUREBUFFERS -DTQTVD_LOG_THREAD_SAFE -DLUA_USE_LINUX -DHAVE_CONFIG_H -D_REENTRANT -Wall -Wno-deprecated-declarations -Wno-unused-variable -Wno-unused-parameter -Wno-return-type -Wno-deprecated-declarations -Wno-unused-variable -Wno-unused-parameter -Wno-return-type   -L/mtkoss/gnuarm/neon_4.8.2_2.6.35_cortex-a9-ubuntu/apollo/sys_build/SOEM_4K_linux/Unicorn_4K_BZ -L/mtkoss/gnuarm/neon_4.8.2_2.6.35_cortex-a9-ubuntu/apollo/output/SOEM_4K_linux/Unicorn_4K_BZ/rel/obj/rootfs/rootfs_5886_free/usr/lib -lpthread -L/mtkoss/gnuarm/neon_4.8.2_2.6.35_cortex-a9-ubuntu/apollo/output/SOEM_4K_linux/Unicorn_4K_BZ/rel/obj/rootfs/rootfs_5886_free/lib -lz -shared -Wl,-soname,libvlc.so -L/work/deploy/lib -L$(XML2_INSTALL_PREFIX)/lib -L/work/sdk/apollo/mtk_obj/obj/rel/basic/lib -L$(ZLIB_INSTALL_PREFIX) -lpthread -lm -lrt -ldl -lxml2 -lz


all: prepare $(TARGET)

prepare:
	mkdir -p $(OBJ_DIR)
	mkdir -p $(LIB_DIR)

clean:
	rm -rf $(OBJ_DIR)
	rm -rf $(LIB_DIR)


http_MODULE_NAME = http
httplive_MODULE_NAME = httplive
smooth_MODULE_NAME = smooth
dash_MODULE_NAME = dash
xml_MODULE_NAME = xml
core_MODULE_NAME = core
lib_MODULE_NAME = lib


tqtvd_HEADERS = $(PROJECT_ROOT_DIR)/tqtvd_headers/*

########################################
# Modules

###
# Access Modules section
#
access_MODULE_DIR = access

# Module http
http_SOURCES_DIR = $(MODULES_DIR)/$(access_MODULE_DIR)
http_OBJECTS_DIR = $(OBJ_DIR)/$(access_MODULE_DIR)
http_OBJECTS = $(http_OBJECTS_DIR)/http.c.o
$(http_MODULE_NAME): $(http_OBJECTS)
	echo ">>> Built libVLC's $@ module!"
$(http_OBJECTS_DIR)/%.c.o: $(http_SOURCES_DIR)/%.c
	echo "<<< Building $(http_OBJECTS_DIR)/$*.c.o ..."
	mkdir -p $(http_OBJECTS_DIR)
	${CC} ${CFLAGS} -DMODULE_NAME=$(http_MODULE_NAME) -DMODULE_STRING=\"$(http_MODULE_NAME)\" -c $< -o $@

###
# Stream-filter Modules section
#
stream_filter_MODULE_DIR = stream_filter

# Module httplive (HLS)
httplive_SOURCES_DIR = $(MODULES_DIR)/$(stream_filter_MODULE_DIR)
httplive_OBJECTS_DIR = $(OBJ_DIR)/$(stream_filter_MODULE_DIR)
httplive_OBJECTS = $(httplive_OBJECTS_DIR)/httplive.c.o
$(httplive_MODULE_NAME): $(httplive_OBJECTS)
	echo ">>> Built libVLC's $@ module!"
$(httplive_OBJECTS_DIR)/%.c.o: $(httplive_SOURCES_DIR)/%.c
	echo "<<< Building $(httplive_OBJECTS_DIR)/$*.c.o ..."
	mkdir -p $(httplive_OBJECTS_DIR)
	${CC} ${CFLAGS} -DMODULE_NAME=$(httplive_MODULE_NAME) -DMODULE_STRING=\"$(httplive_MODULE_NAME)\" -c $< -o $@

# Module smooth (MSS)
smooth_SOURCES_DIR = $(MODULES_DIR)/$(stream_filter_MODULE_DIR)/$(smooth_MODULE_NAME)
smooth_OBJECTS_DIR = $(OBJ_DIR)/$(smooth_MODULE_NAME)
smooth_OBJECTS = $(smooth_OBJECTS_DIR)/smooth.c.o $(smooth_OBJECTS_DIR)/utils.c.o $(smooth_OBJECTS_DIR)/downloader.c.o
$(smooth_MODULE_NAME): $(smooth_OBJECTS)
	echo ">>> Built libVLC's $@ module!"
$(smooth_OBJECTS_DIR)/%.c.o: $(smooth_SOURCES_DIR)/%.c
	echo "<<< Building $(smooth_OBJECTS_DIR)/$*.c.o ..."
	mkdir -p $(smooth_OBJECTS_DIR)
	${CC} ${CFLAGS} -DMODULE_NAME=$(smooth_MODULE_NAME) -DMODULE_STRING=\"$(smooth_MODULE_NAME)\" -c $< -o $@

# Module dash (MPEG-DASH)
dash_SOURCES_DIR = $(MODULES_DIR)/$(stream_filter_MODULE_DIR)/$(dash_MODULE_NAME)
dash_OBJECTS_DIR = $(OBJ_DIR)/$(dash_MODULE_NAME)
dash_OBJECTS = $(dash_OBJECTS_DIR)/dash.cpp.o $(dash_OBJECTS_DIR)/DASHDownloader.cpp.o $(dash_OBJECTS_DIR)/DASHManager.cpp.o $(dash_OBJECTS_DIR)/Helper.cpp.o \
$(dash_OBJECTS_DIR)/adaptationlogic/AbstractAdaptationLogic.cpp.o $(dash_OBJECTS_DIR)/adaptationlogic/AdaptationLogicFactory.cpp.o $(dash_OBJECTS_DIR)/adaptationlogic/AlwaysBestAdaptationLogic.cpp.o $(dash_OBJECTS_DIR)/adaptationlogic/RateBasedAdaptationLogic.cpp.o \
$(dash_OBJECTS_DIR)/buffer/BlockBuffer.cpp.o \
$(dash_OBJECTS_DIR)/http/Chunk.cpp.o $(dash_OBJECTS_DIR)/http/HTTPConnection.cpp.o $(dash_OBJECTS_DIR)/http/HTTPConnectionManager.cpp.o $(dash_OBJECTS_DIR)/http/PersistentConnection.cpp.o \
$(dash_OBJECTS_DIR)/mpd/AdaptationSet.cpp.o $(dash_OBJECTS_DIR)/mpd/BasicCMManager.cpp.o $(dash_OBJECTS_DIR)/mpd/BasicCMParser.cpp.o $(dash_OBJECTS_DIR)/mpd/CommonAttributesElements.cpp.o $(dash_OBJECTS_DIR)/mpd/ContentDescription.cpp.o \
$(dash_OBJECTS_DIR)/mpd/IsoffMainParser.cpp.o $(dash_OBJECTS_DIR)/mpd/IsoffMainManager.cpp.o $(dash_OBJECTS_DIR)/mpd/MPD.cpp.o $(dash_OBJECTS_DIR)/mpd/MPDFactory.cpp.o $(dash_OBJECTS_DIR)/mpd/MPDManagerFactory.cpp.o $(dash_OBJECTS_DIR)/mpd/Period.cpp.o \
$(dash_OBJECTS_DIR)/mpd/ProgramInformation.cpp.o $(dash_OBJECTS_DIR)/mpd/Representation.cpp.o $(dash_OBJECTS_DIR)/mpd/Segment.cpp.o $(dash_OBJECTS_DIR)/mpd/SegmentBase.cpp.o $(dash_OBJECTS_DIR)/mpd/SegmentInfo.cpp.o $(dash_OBJECTS_DIR)/mpd/SegmentInfoCommon.cpp.o \
$(dash_OBJECTS_DIR)/mpd/SegmentInfoDefault.cpp.o $(dash_OBJECTS_DIR)/mpd/SegmentList.cpp.o $(dash_OBJECTS_DIR)/mpd/SegmentTemplate.cpp.o $(dash_OBJECTS_DIR)/mpd/SegmentTimeline.cpp.o $(dash_OBJECTS_DIR)/mpd/TrickModeType.cpp.o \
$(dash_OBJECTS_DIR)/xml/DOMHelper.cpp.o $(dash_OBJECTS_DIR)/xml/DOMParser.cpp.o $(dash_OBJECTS_DIR)/xml/Node.cpp.o
$(dash_MODULE_NAME): $(dash_OBJECTS)
	echo ">>> Built libVLC's $@ module!"
$(dash_OBJECTS_DIR)/%.cpp.o: $(dash_SOURCES_DIR)/%.cpp
	echo "<<< Building $(dash_OBJECTS_DIR)/$*.cpp.o ..."
	mkdir -p $(shell dirname $(dash_OBJECTS_DIR)/$*)
	${CXX} ${CXXFLAGS} -DMODULE_NAME=$(dash_MODULE_NAME) -DMODULE_STRING=\"$(dash_MODULE_NAME)\" -c $< -o $@


###
# misc Modules section
#
misc_MODULE_DIR = misc

# Module xml
xml_SOURCES_DIR = $(MODULES_DIR)/$(misc_MODULE_DIR)/$(xml_MODULE_NAME)
xml_OBJECTS_DIR = $(OBJ_DIR)/$(xml_MODULE_NAME)
xml_OBJECTS = $(xml_OBJECTS_DIR)/libxml.c.o
$(xml_MODULE_NAME): $(xml_OBJECTS)
	echo ">>> Built libVLC's $@ module!"
$(xml_OBJECTS_DIR)/%.c.o: $(xml_SOURCES_DIR)/%.c
	echo "<<< Building $(xml_OBJECTS_DIR)/$*.c.o ..."
	mkdir -p $(xml_OBJECTS_DIR)
	${CC} ${CFLAGS} -DMODULE_NAME=$(xml_MODULE_NAME) -DMODULE_STRING=\"$(xml_MODULE_NAME)\" -c $< -o $@


###
# libvlc core section (not a plugin)
#
core_MODULE_DIR = $(SOURCES_ROOT_DIR)

# libVLC core module
core_SOURCES_DIR = $(core_MODULE_DIR)
core_OBJECTS_DIR = $(OBJ_DIR)/$(core_MODULE_NAME)
core_OBJECTS = $(core_OBJECTS_DIR)/compat/strlcpy.c.o \
$(core_OBJECTS_DIR)/src/libvlc.c.o $(core_OBJECTS_DIR)/src/libvlc-module.c.o $(core_OBJECTS_DIR)/src/missing.c.o $(core_OBJECTS_DIR)/src/version.c.o \
$(core_OBJECTS_DIR)/src/interface/dialog.c.o $(core_OBJECTS_DIR)/src/interface/interface.c.o \
$(core_OBJECTS_DIR)/src/playlist/art.c.o $(core_OBJECTS_DIR)/src/playlist/aout.c.o $(core_OBJECTS_DIR)/src/playlist/thread.c.o $(core_OBJECTS_DIR)/src/playlist/control.c.o $(core_OBJECTS_DIR)/src/playlist/engine.c.o $(core_OBJECTS_DIR)/src/playlist/fetcher.c.o $(core_OBJECTS_DIR)/src/playlist/sort.c.o $(core_OBJECTS_DIR)/src/playlist/loadsave.c.o $(core_OBJECTS_DIR)/src/playlist/preparser.c.o $(core_OBJECTS_DIR)/src/playlist/tree.c.o $(core_OBJECTS_DIR)/src/playlist/item.c.o $(core_OBJECTS_DIR)/src/playlist/search.c.o $(core_OBJECTS_DIR)/src/playlist/services_discovery.c.o \
$(core_OBJECTS_DIR)/src/input/item.c.o $(core_OBJECTS_DIR)/src/input/access.c.o $(core_OBJECTS_DIR)/src/input/clock.c.o $(core_OBJECTS_DIR)/src/input/control.c.o $(core_OBJECTS_DIR)/src/input/decoder.c.o $(core_OBJECTS_DIR)/src/input/decoder_synchro.c.o $(core_OBJECTS_DIR)/src/input/demux.c.o $(core_OBJECTS_DIR)/src/input/es_out.c.o $(core_OBJECTS_DIR)/src/input/es_out_timeshift.c.o $(core_OBJECTS_DIR)/src/input/event.c.o $(core_OBJECTS_DIR)/src/input/input.c.o $(core_OBJECTS_DIR)/src/input/meta.c.o $(core_OBJECTS_DIR)/src/input/resource.c.o $(core_OBJECTS_DIR)/src/input/stats.c.o $(core_OBJECTS_DIR)/src/input/stream.c.o $(core_OBJECTS_DIR)/src/input/stream_demux.c.o $(core_OBJECTS_DIR)/src/input/stream_filter.c.o $(core_OBJECTS_DIR)/src/input/stream_memory.c.o $(core_OBJECTS_DIR)/src/input/subtitles.c.o $(core_OBJECTS_DIR)/src/input/var.c.o \
$(core_OBJECTS_DIR)/src/video_output/control.c.o $(core_OBJECTS_DIR)/src/video_output/display.c.o $(core_OBJECTS_DIR)/src/video_output/inhibit.c.o $(core_OBJECTS_DIR)/src/video_output/interlacing.c.o $(core_OBJECTS_DIR)/src/video_output/snapshot.c.o $(core_OBJECTS_DIR)/src/video_output/video_output.c.o $(core_OBJECTS_DIR)/src/video_output/video_text.c.o $(core_OBJECTS_DIR)/src/video_output/video_epg.c.o $(core_OBJECTS_DIR)/src/video_output/video_widgets.c.o $(core_OBJECTS_DIR)/src/video_output/vout_subpictures.c.o $(core_OBJECTS_DIR)/src/video_output/window.c.o $(core_OBJECTS_DIR)/src/video_output/opengl.c.o $(core_OBJECTS_DIR)/src/video_output/vout_intf.c.o $(core_OBJECTS_DIR)/src/video_output/vout_wrapper.c.o \
$(core_OBJECTS_DIR)/src/audio_output/common.c.o $(core_OBJECTS_DIR)/src/audio_output/dec.c.o $(core_OBJECTS_DIR)/src/audio_output/filters.c.o $(core_OBJECTS_DIR)/src/audio_output/output.c.o $(core_OBJECTS_DIR)/src/audio_output/volume.c.o \
$(core_OBJECTS_DIR)/src/network/getaddrinfo.c.o $(core_OBJECTS_DIR)/src/network/io.c.o $(core_OBJECTS_DIR)/src/network/tcp.c.o $(core_OBJECTS_DIR)/src/network/udp.c.o $(core_OBJECTS_DIR)/src/network/rootbind.c.o $(core_OBJECTS_DIR)/src/network/tls.c.o $(core_OBJECTS_DIR)/src/network/httpd.c.o \
$(core_OBJECTS_DIR)/src/text/charset.c.o $(core_OBJECTS_DIR)/src/text/strings.c.o $(core_OBJECTS_DIR)/src/text/unicode.c.o $(core_OBJECTS_DIR)/src/text/url.c.o $(core_OBJECTS_DIR)/src/text/filesystem.c.o $(core_OBJECTS_DIR)/src/text/iso_lang.c.o \
$(core_OBJECTS_DIR)/src/misc/md5.c.o $(core_OBJECTS_DIR)/src/misc/probe.c.o $(core_OBJECTS_DIR)/src/misc/rand.c.o $(core_OBJECTS_DIR)/src/misc/mtime.c.o $(core_OBJECTS_DIR)/src/misc/block.c.o $(core_OBJECTS_DIR)/src/misc/fourcc.c.o $(core_OBJECTS_DIR)/src/misc/es_format.c.o $(core_OBJECTS_DIR)/src/misc/picture.c.o $(core_OBJECTS_DIR)/src/misc/picture_fifo.c.o $(core_OBJECTS_DIR)/src/misc/picture_pool.c.o $(core_OBJECTS_DIR)/src/misc/threads.c.o $(core_OBJECTS_DIR)/src/misc/cpu.c.o $(core_OBJECTS_DIR)/src/misc/epg.c.o $(core_OBJECTS_DIR)/src/misc/exit.c.o $(core_OBJECTS_DIR)/src/misc/events.c.o $(core_OBJECTS_DIR)/src/misc/image.c.o $(core_OBJECTS_DIR)/src/misc/messages.c.o $(core_OBJECTS_DIR)/src/misc/mime.c.o $(core_OBJECTS_DIR)/src/misc/objects.c.o $(core_OBJECTS_DIR)/src/misc/variables.c.o $(core_OBJECTS_DIR)/src/misc/error.c.o $(core_OBJECTS_DIR)/src/misc/update.c.o $(core_OBJECTS_DIR)/src/misc/update_crypto.c.o $(core_OBJECTS_DIR)/src/misc/xml.c.o $(core_OBJECTS_DIR)/src/misc/addons.c.o $(core_OBJECTS_DIR)/src/misc/filter.c.o $(core_OBJECTS_DIR)/src/misc/filter_chain.c.o $(core_OBJECTS_DIR)/src/misc/http_auth.c.o $(core_OBJECTS_DIR)/src/misc/fingerprinter.c.o $(core_OBJECTS_DIR)/src/misc/text_style.c.o $(core_OBJECTS_DIR)/src/misc/subpicture.c.o \
$(core_OBJECTS_DIR)/src/modules/modules.c.o $(core_OBJECTS_DIR)/src/modules/bank.c.o $(core_OBJECTS_DIR)/src/modules/cache.c.o $(core_OBJECTS_DIR)/src/modules/entry.c.o $(core_OBJECTS_DIR)/src/modules/textdomain.c.o \
$(core_OBJECTS_DIR)/src/config/core.c.o $(core_OBJECTS_DIR)/src/config/chain.c.o $(core_OBJECTS_DIR)/src/config/file.c.o $(core_OBJECTS_DIR)/src/config/help.c.o $(core_OBJECTS_DIR)/src/config/intf.c.o $(core_OBJECTS_DIR)/src/config/keys.c.o $(core_OBJECTS_DIR)/src/config/cmdline.c.o $(core_OBJECTS_DIR)/src/config/getopt.c.o \
$(core_OBJECTS_DIR)/src/extras/libc.c.o $(core_OBJECTS_DIR)/src/extras/tdestroy.c.o \
$(core_OBJECTS_DIR)/src/posix/filesystem.c.o $(core_OBJECTS_DIR)/src/posix/plugin.c.o $(core_OBJECTS_DIR)/src/posix/timer.c.o $(core_OBJECTS_DIR)/src/posix/rand.c.o $(core_OBJECTS_DIR)/src/posix/linux_cpu.c.o $(core_OBJECTS_DIR)/src/posix/linux_specific.c.o $(core_OBJECTS_DIR)/src/posix/specific.c.o $(core_OBJECTS_DIR)/src/posix/dirs.c.o $(core_OBJECTS_DIR)/src/posix/thread.c.o $(core_OBJECTS_DIR)/src/posix/error.c.o $(core_OBJECTS_DIR)/src/posix/netconf.c.o
$(core_MODULE_NAME): $(core_OBJECTS)
	echo ">>> Built libVLC's $@ module!"
$(core_OBJECTS_DIR)/%.c.o: $(subst $(core_MODULE_NAME)/,,$(core_SOURCES_DIR)/%.c)
	echo "<<< Building $(core_OBJECTS_DIR)/$*.c.o ..."
	mkdir -p $(shell dirname $(core_OBJECTS_DIR)/$*)
	${CC} ${CFLAGS} -c $< -o $@

###
# libvlc lib section (not a plugin)
#
lib_MODULE_DIR = $(SOURCES_ROOT_DIR)/lib

# libVLC lib module
lib_SOURCES_DIR = $(lib_MODULE_DIR)
lib_OBJECTS_DIR = $(OBJ_DIR)/$(lib_MODULE_NAME)
lib_OBJECTS = $(lib_OBJECTS_DIR)/core.c.o $(lib_OBJECTS_DIR)/error.c.o $(lib_OBJECTS_DIR)/log.c.o $(lib_OBJECTS_DIR)/playlist.c.o $(lib_OBJECTS_DIR)/vlm.c.o $(lib_OBJECTS_DIR)/video.c.o $(lib_OBJECTS_DIR)/audio.c.o $(lib_OBJECTS_DIR)/event.c.o $(lib_OBJECTS_DIR)/event_async.c.o $(lib_OBJECTS_DIR)/media.c.o $(lib_OBJECTS_DIR)/media_player.c.o $(lib_OBJECTS_DIR)/media_list.c.o $(lib_OBJECTS_DIR)/media_list_player.c.o $(lib_OBJECTS_DIR)/media_library.c.o $(lib_OBJECTS_DIR)/media_discoverer.c.o
$(lib_MODULE_NAME): $(lib_OBJECTS)
	echo ">>> Built libVLC's $@ module!"
$(lib_OBJECTS_DIR)/%.c.o: $(lib_SOURCES_DIR)/%.c
	echo "<<< Building $(lib_OBJECTS_DIR)/$*.c.o ..."
	mkdir -p $(lib_OBJECTS_DIR)
	${CC} ${CFLAGS} -c $< -o $@


###
# libvlc target library
#
$(TARGET): $(http_MODULE_NAME) $(httplive_MODULE_NAME) $(smooth_MODULE_NAME) $(dash_MODULE_NAME) $(xml_MODULE_NAME) $(core_MODULE_NAME) $(lib_MODULE_NAME)
	echo "<<< Building $@ ..."
	${CXX} ${LDFLAGS} -o $@ ${http_OBJECTS} ${httplive_OBJECTS} ${smooth_OBJECTS} ${dash_OBJECTS} ${xml_OBJECTS} ${core_OBJECTS} ${lib_OBJECTS} 
	echo ">>> Built libVLC library!"


.PHONY: all prepare clean $(http_MODULE_NAME) $(httplive_MODULE_NAME) $(smooth_MODULE_NAME) $(dash_MODULE_NAME) $(xml_MODULE_NAME) $(core_MODULE_NAME) $(lib_MODULE_NAME)
