From d84e4b8d538ddfd5a2105b7328d2e62d30497d00 Mon Sep 17 00:00:00 2001 From: Edouard DUPIN Date: Mon, 11 Mar 2013 22:55:34 +0100 Subject: [PATCH] [DEV] Remove some dependency of the sub library --- build | 2 +- external/etk | 2 +- sources/Android.mk | 11 +++++++++++ sources/Linux.mk | 18 +++++++++++++++--- sources/MacOs.mk | 14 +++++++++++++- sources/ewol/renderer/audio/audio.cpp | 6 +++--- sources/ewol/widget/Scene.cpp | 2 ++ sources/ewol/widget/Scene.h | 4 ++++ 8 files changed, 50 insertions(+), 9 deletions(-) diff --git a/build b/build index 1177a53e..50b04244 160000 --- a/build +++ b/build @@ -1 +1 @@ -Subproject commit 1177a53e86c62ce8ed9d74860ef4e9eefd97c287 +Subproject commit 50b04244084ced7421ed260866612fcbb547e1c8 diff --git a/external/etk b/external/etk index d51539f3..f5f7c72a 160000 --- a/external/etk +++ b/external/etk @@ -1 +1 @@ -Subproject commit d51539f32a108eea88e017abad8cb604907dacbf +Subproject commit f5f7c72ad695876cf63056424f93e863884034dd diff --git a/sources/Android.mk b/sources/Android.mk index cdde301e..d8f50d5b 100644 --- a/sources/Android.mk +++ b/sources/Android.mk @@ -14,6 +14,17 @@ $(info [TAG:$(LOCAL_MODULE)] $(LOCAL_VERSION)) # name of the dependency LOCAL_LIBRARIES := etk freetype tinyxml libpng parsersvg lua libzip bullet +LOCAL_LIBRARIES := etk freetype tinyxml libpng parsersvg libzip +ifeq ("$(CONFIG_BUILD_BULLET)","y") +LOCAL_LIBRARIES += bullet +endif +ifeq ("$(CONFIG_BUILD_LUA)","y") +LOCAL_LIBRARIES += lua +endif +ifeq ("$(CONFIG_BUILD_PORTAUDIO)","y") +#LOCAL_LIBRARIES += portaudio +endif + LOCAL_C_INCLUDES := LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH) diff --git a/sources/Linux.mk b/sources/Linux.mk index 77a68edb..b6de56b6 100644 --- a/sources/Linux.mk +++ b/sources/Linux.mk @@ -12,7 +12,16 @@ LOCAL_VERSION=$(shell cat $(LOCAL_PATH)/tag) $(info [TAG:$(LOCAL_MODULE)] $(LOCAL_VERSION)) # name of the dependency -LOCAL_LIBRARIES := etk freetype tinyxml libzip libpng parsersvg lua portaudio bullet +LOCAL_LIBRARIES := etk freetype tinyxml libpng parsersvg +ifeq ("$(CONFIG_BUILD_BULLET)","y") +LOCAL_LIBRARIES += bullet +endif +ifeq ("$(CONFIG_BUILD_LUA)","y") +LOCAL_LIBRARIES += lua +endif +ifeq ("$(CONFIG_BUILD_PORTAUDIO)","y") +LOCAL_LIBRARIES += portaudio +endif LOCAL_C_INCLUDES := @@ -41,8 +50,11 @@ LOCAL_EXPORT_CFLAGS := # load the common sources file of the platform include $(LOCAL_PATH)/file.mk -LOCAL_SRC_FILES := $(FILE_LIST) \ - ewol/renderer/audio/interfacePortAudio.cpp +LOCAL_SRC_FILES := $(FILE_LIST) + +ifeq ("$(CONFIG_BUILD_PORTAUDIO)","y") +LOCAL_SRC_FILES += ewol/renderer/audio/interfacePortAudio.cpp +endif ifeq ("$(CONFIG___EWOL_LINUX_GUI_MODE_X11__)","y") LOCAL_SRC_FILES += ewol/renderer/os/gui.X11.cpp diff --git a/sources/MacOs.mk b/sources/MacOs.mk index 64963a60..149b483e 100644 --- a/sources/MacOs.mk +++ b/sources/MacOs.mk @@ -12,7 +12,19 @@ LOCAL_VERSION=$(shell cat $(LOCAL_PATH)/tag) $(info [TAG:$(LOCAL_MODULE)] $(LOCAL_VERSION)) # name of the dependency -LOCAL_LIBRARIES := etk freetype tinyxml libzip libpng parsersvg lua bullet +LOCAL_LIBRARIES := etk freetype tinyxml libpng parsersvg +ifeq ("$(CONFIG_BUILD_BULLET)","y") +LOCAL_LIBRARIES += bullet +endif +ifeq ("$(CONFIG_BUILD_LUA)","y") +LOCAL_LIBRARIES += lua +endif +ifeq ("$(CONFIG_BUILD_PORTAUDIO)","y") +LOCAL_LIBRARIES += portaudio +endif +ifeq ("$(CONFIG_BUILD_LIBZIP)","y") +LOCAL_LIBRARIES += libzip +endif LOCAL_C_INCLUDES := diff --git a/sources/ewol/renderer/audio/audio.cpp b/sources/ewol/renderer/audio/audio.cpp index 659e5d44..580adb4c 100644 --- a/sources/ewol/renderer/audio/audio.cpp +++ b/sources/ewol/renderer/audio/audio.cpp @@ -26,7 +26,7 @@ static int32_t effectsVolumeApply = 1<<16; static bool isInit = false; -#ifdef __TARGET_OS__Linux +#ifdef BUILD_PORTAUDIO # include #endif @@ -41,7 +41,7 @@ void ewol::audio::Init(void) ewol::audio::music::MuteSet(false); musicFadingTime = 100; isInit = true; - #ifdef __TARGET_OS__Linux + #ifdef BUILD_PORTAUDIO ewol::portAudio::Init(); #endif } @@ -53,7 +53,7 @@ void ewol::audio::UnInit(void) EWOL_ERROR("multiple un-init requested ... at the audio system ..."); return; } - #ifdef __TARGET_OS__Linux + #ifdef BUILD_PORTAUDIO ewol::portAudio::UnInit(); #endif musicMute = true; diff --git a/sources/ewol/widget/Scene.cpp b/sources/ewol/widget/Scene.cpp index 2680e1f2..f1f37151 100644 --- a/sources/ewol/widget/Scene.cpp +++ b/sources/ewol/widget/Scene.cpp @@ -5,6 +5,7 @@ * * @license BSD v3 (see license file) */ +#ifdef BUILD_BULLET #include #include @@ -1282,4 +1283,5 @@ void widget::Scene::OnLostFocus(void) UnGrabCursor(); } +#endif diff --git a/sources/ewol/widget/Scene.h b/sources/ewol/widget/Scene.h index 4a8e8273..7fd592f0 100644 --- a/sources/ewol/widget/Scene.h +++ b/sources/ewol/widget/Scene.h @@ -9,6 +9,8 @@ #ifndef __EWOL_SCENE_H__ #define __EWOL_SCENE_H__ +#ifdef BUILD_BULLET + #include #include #include @@ -127,3 +129,5 @@ namespace widget { }; #endif + +#endif