123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283 |
- MAPKIT_IDL_INCLUDES=
- macro MAPKIT_ADDINCL(Dirs...) {
- ADDINCL(${pre=FOR idl :Dirs})
- SET_APPEND(MAPKIT_IDL_INCLUDES $Dirs)
- }
- ### @usage: MAPS_IDL_ADDINCL(dirnames...) # internal
- ###
- ### Warpper for MAPKIT_ADDINCL macro which is used for mobile mapkit build
- macro MAPS_IDL_ADDINCL(Dirs...) {
- MAPKIT_ADDINCL($Dirs)
- }
- ### @usage: _MAPKITIDL_PROXY(args...) # internal
- ###
- ### Proxy macro for MAPKITIDL which adds PEERDIR to YMAKE resources
- macro _MAPKITIDL_PROXY(Args...) {
- MAPKITIDL($Args)
- ENABLE(USE_YMAKE_RESOURCE)
- SET_APPEND(_MAKEFILE_INCLUDE_LIKE_TEXT_DEPS ${ext=idl:Args})
- }
- MAPS_IDL_FILTER=
- ### @usage: MAPS_IDL_SRCS(filenames...) # internal
- ###
- ### Warpper for MAPKITIDL macro which is used for mobile mapkit build
- macro MAPS_IDL_SRCS(Srcs...) {
- _MAPKITIDL_PROXY($Srcs ${MAPS_IDL_FILTER})
- }
- ### @usage: MAPS_IDL_GLOBAL_SRCS(filenames...) # internal
- ###
- ### Warpper for MAPKITIDL macro which is used for mobile mapkit build
- macro MAPS_IDL_GLOBAL_SRCS(Srcs...) {
- _MAPKITIDL_PROXY(GLOBAL_OUTPUTS $Srcs ${MAPS_IDL_FILTER})
- }
- ### @usage: MAPSMOBI_SRCS(filenames...) # internal
- ###
- ### Make all source files listed as GLOBAL or not (depending on the value of
- ### MAPSMOBI_USE_SRCS_GLOBAL). Be careful since the value of
- ### MAPSMOBI_USE_SRCS_GLOBAL matters! If the value of this variable is equal to
- ### GLOBAL then call to MAPSMOBI_SRCS() macro behaves like call to
- ### GLOBAL_SRCS() macro otherwise the value of MAPSMOBI_USE_SRCS_GLOBAL is
- ### treated as a file name and a call to MAPSMOBI_SRCS() macro behaves like a
- ### call to SRCS() macro with additional argument which is the value of
- ### MAPSMOBI_USE_SRCS_GLOBAL variable
- macro MAPSMOBI_SRCS(FILES...) {
- ALL_SRCS(${MAPSMOBI_USE_SRCS_GLOBAL} $FILES)
- }
- ### @usage: EXPORT_MAPKIT_PROTO() # internal deprecated
- ###
- ### This macro is a temporary one and should be changed to EXPORT_YMAPS_PROTO
- ### when transition of mapsmobi to arcadia is finished
- macro EXPORT_MAPKIT_PROTO() {
- PROTO_NAMESPACE(GLOBAL maps/mapsmobi/external/proto)
- }
- BEFORE_PEERS=
- AFTER_PEERS=
- when ($MAPKIT_WHOLE_ARCHIVE == "yes") {
- when($OS_LINUX) {
- BEFORE_PEERS += $START_WHOLE_ARCHIVE_VALUE
- AFTER_PEERS += $END_WHOLE_ARCHIVE_VALUE
- }
- elsewhen($OS_DARWIN) {
- LDFLAGS+=-Wl,-all_load
- }
- }
- ### @usage: MAPKIT_ENABLE_WHOLE_ARCHIVE() # internal deprecated
- ###
- ### This macro is strictly prohibited to use outside of mapsmobi project
- macro MAPKIT_ENABLE_WHOLE_ARCHIVE() {
- ENABLE(MAPKIT_WHOLE_ARCHIVE)
- }
- ### @usage: MAPS_IDL_LIBRARY()
- ###
- ### Definition of multimodule that builds various variants of libraries.
- ### The particular variant is selected based on where PEERDIR to IDL_LIBRARY comes from.
- ### Now supported 2 variants: C++, Java
- ### Java version is not really a library but an archive of generated Java sources
- multimodule MAPS_IDL_LIBRARY {
- module CPP_IDL: LIBRARY {
- .ALIASES=SRCS=MAPS_IDL_SRCS GLOBAL_SRCS=MAPS_IDL_GLOBAL_SRCS ADDINCL=MAPKIT_ADDINCL MAPSMOBI_SRCS=MAPS_IDL_SRCS
- SET(PEERDIR_TAGS CPP_IDL CPP_PROTO __EMPTY__)
- SET(MAPS_IDL_FILTER)
- ENABLE(CPP_IDL)
- NO_UTIL()
- when ($OS_IOS == "yes") {
- CFLAGS+=-fobjc-arc
- }
- }
- module JAVA_IDL: JSRC_LIBRARY {
- .ALIASES=SRCS=MAPS_IDL_SRCS GLOBAL_SRCS=MAPS_IDL_SRCS ADDINCL=MAPKIT_ADDINCL MAPSMOBI_SRCS=MAPS_IDL_SRCS
- .IGNORED=CPP_ADDINCL
- SET(PEERDIR_TAGS JAVA_IDL JAVA_PROTO)
- SET(MAPS_IDL_FILTER FILTER .java)
- ENABLE(JAVA_IDL)
- }
- }
- ### @usage: MAPSMOBI_COLLECT_ASSETS_FILES(varname [dir]) # internal
- ###
- ### This macro is strictly prohibited to use outside of mapsmobi project
- macro MAPSMOBI_COLLECT_ASSETS_FILES(VAR, DIR="") {
- _GLOB($VAR ${suf=/:DIR}**/*)
- RESTRICT_PATH(maps/mobile maps/automotive MSG This macro is for use in mapsmobi projects)
- }
- ### @usage: MAPSMOBI_COLLECT_AIDL_FILES(varname [dir]) # internal
- ###
- ### This macro is strictly prohibited to use outside of mapsmobi project
- macro MAPSMOBI_COLLECT_AIDL_FILES(VAR, DIR="") {
- _GLOB($VAR ${suf=/:DIR}**/*.aidl)
- RESTRICT_PATH(maps/mobile maps/automotive MSG This macro is for use in mapsmobi projects)
- }
- ### @usage: MAPSMOBI_COLLECT_JAVA_FILES(varname [dir]) # internal
- ###
- ### This macro is strictly prohibited to use outside of mapsmobi project
- macro MAPSMOBI_COLLECT_JAVA_FILES(VAR, DIR="") {
- _GLOB($VAR ${suf=/:DIR}**/*.java)
- RESTRICT_PATH(maps/mobile maps/automotive MSG This macro is for use in mapsmobi projects)
- }
- ### @usage: MAPSMOBI_COLLECT_JNI_LIBS_FILES(varname [dir]) # internal
- ###
- ### This macro is strictly prohibited to use outside of mapsmobi project
- macro MAPSMOBI_COLLECT_JNI_LIBS_FILES(VAR, DIR="") {
- _GLOB($VAR ${suf=/:DIR}**/*.so)
- RESTRICT_PATH(maps/mobile maps/automotive MSG This macro is for use in mapsmobi projects)
- }
- ### @usage: MAPSMOBI_COLLECT_RES_FILES(varname [dir]) # internal
- ###
- ### This macro is strictly prohibited to use outside of mapsmobi project
- macro MAPSMOBI_COLLECT_RES_FILES(VAR, DIR="") {
- _GLOB($VAR ${suf=/:DIR}**/*.(xml|png))
- RESTRICT_PATH(maps/mobile maps/automotive MSG This macro is for use in mapsmobi projects)
- }
- ### @usage: MAPSMOBI_COLLECT_TPL_FILES(varname [dir]) # internal
- ###
- ### This macro is strictly prohibited to use outside of mapsmobi project
- macro MAPSMOBI_COLLECT_TPL_FILES(VAR, DIR="") {
- _GLOB($VAR ${suf=/:DIR}**/*.tpl)
- RESTRICT_PATH(tools/idl MSG This macro is for use in mapsmobi projects)
- }
- ### @usage: MAPS_GARDEN_COLLECT_MODULE_TRAITS(varnamei dir) # internal
- ###
- ### This macro is strictly prohibited to use outside of maps/garden project
- macro MAPS_GARDEN_COLLECT_MODULE_TRAITS(VAR, DIR) {
- _GLOB($VAR $DIR/*/module_traits.json)
- RESTRICT_PATH(maps/garden/sdk/module_traits/tests/module_traits_bundle MSG This macro is for use in maps/garden project)
- }
- # mapsmobi build configuration
- MAPSMOBI_FAKEID=${FAKEID}_r8609790
- MAPSMOBI_BUILD=
- YANDEX_EXPORT=
- YRT_EXPORT=
- MAPSMOBI_CPP_PROTO_PLUGINS=
- STATIC_STL=
- EXPORT_ALL_SYMBOLS=
- when ($MAPSMOBI_BUILD_HOST || $MAPSMOBI_BUILD_TARGET) {
- MAPSMOBI_BUILD=yes
- }
- when ($MAPSMOBI_BUILD) {
- CFLAGS+=-DMOBILE_BUILD ${hide:MAPSMOBI_FAKEID}
- MAPKIT_BASE_PROTO_PACKAGE=yandex.maps.proto
- MAPKIT_PROTO_ROOT=maps/doc/proto
- MAPKIT_IDL_FRAMEWORK=maps/mobile/libs/idl_frameworks
- }
- when ($MAPSMOBI_BUILD_TARGET) {
- ALLOCATOR=FAKE
- USE_VANILLA_PROTOC=yes
- PROTOBUF_LITE=yes
- CPP_PROTO_PLUGINS=lite${pre=,:MAPSMOBI_CPP_PROTO_PLUGINS}:
- when ($OPENSOURCE != "yes") {
- SYSINCL+=build/yandex_specific/sysincl/mapsmobi.yml
- }
- CFLAGS+=-U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1 -DBOOST_CB_DISABLE_DEBUG -DBOOST_COROUTINES_NO_DEPRECATION_WARNING -DYANDEX_EXPORT=${YANDEX_EXPORT} -DYRT_EXPORT=${YRT_EXPORT}
- }
- when ($MAPSMOBI_BUILD_TARGET && $OS_ANDROID) {
- JDK_VERSION=8
- MAPSMOBI_CPP_PROTO_PLUGINS="dllexport_decl=YANDEX_EXPORT"
- YANDEX_EXPORT=__attribute__((visibility(\"default\")))
- CFLAGS+=-fvisibility=hidden
- when ($MAPS_MOBILE_EXPORT_CPP_API) {
- LDFLAGS+=-lc++_shared
- CFLAGS+=-DZLIB_DLL
- CFLAGS+=-DPROTOBUF_USE_DLLS -DLIBPROTOBUF_EXPORTS
- CFLAGS+=-DPNG_IMPEXP=${YANDEX_EXPORT}
- CFLAGS+=-DBOOST_ALL_DYN_LINK
- CFLAGS+=-DBOOST_SYMBOL_EXPORT=${YANDEX_EXPORT}
- DYNAMIC_BOOST=yes
- }
- otherwise {
- STATIC_STL=yes
- YANDEX_EXPORT=
- CFLAGS+=-DBOOST_SYMBOL_EXPORT=
- CFLAGS+=-DBOOST_SYMBOL_VISIBLE=
- LDFLAGS+=-lc++_static -Wl,--exclude-libs,ALL -static-libstdc++
- USE_GLOBAL_CMD=no
- }
- when ($EXPORT_ALL_SYMBOLS) {
- CFLAGS+=-fvisibility=default
- }
- when ($NO_DEBUGINFO != "yes" && $REDUCED_DEBUGINFO) {
- CFLAGS+=-g1
- }
- CFLAGS+=-DANDROID -fpic -ffunction-sections -funwind-tables -fstack-protector -no-canonical-prefixes -Wa,--noexecstack
- CFLAGS+=-Qunused-arguments -Wno-unused-function -Wno-pessimizing-move -Wno-missing-field-initializers -Wno-missing-braces -Wno-unused-parameter -Wno-vexing-parse -Wno-sign-compare -Wno-deprecated-declarations
- LDFLAGS+=-lc -lm -llog -Bsymbolic -Wl,-z,noexecstack -Qunused-arguments -Wl,-z,relro -Wl,-z,now -Wl,--no-undefined
- when ($BT_RELEASE || $BT_RELWITHDEBINFO) {
- CFLAGS+=-fomit-frame-pointer -fvisibility-inlines-hidden -ffunction-sections -fdata-sections
- LDFLAGS+=-Wl,--gc-sections -Wl,--build-id
- }
- when ($ARCH_ARM7) {
- CFLAGS+=-mfloat-abi=softfp
- #Android clang overaligns some float types which causes NEON programs to fail on old Android versions. So we disable NEON.
- #See https://github.com/android/ndk/issues/640 for more information
- CFLAGS+=-mfpu=vfpv3-d16
- }
- elsewhen ($ARCH_ARM64) {
- }
- elsewhen ($ARCH_I386) {
- CFLAGS+=-fstrict-aliasing -mstackrealign -DTLS_STACK_PROTECTOR
- }
- elsewhen ($ARCH_X86_64) {
- CFLAGS+=-fstrict-aliasing -mstackrealign -march=x86-64 -msse4.2 -mpopcnt -m64 -DTLS_STACK_PROTECTOR
- }
- otherwise {
- PEERDIR+=__unsupported_architecture_for_android__
- }
- }
- when ($MAPSMOBI_BUILD_TARGET && $OS_DARWIN) {
- QT_REQUIRED=yes
- LDFLAGS+=-lc++
- CFLAGS+=-DBOOST_SYMBOL_EXPORT=
- CFLAGS+=-DBOOST_SYMBOL_VISIBLE=
- }
- when ($MAPSMOBI_BUILD_TARGET && $OS_IOS) {
- CFLAGS+=-DIOS -stdlib=libc++ -fvisibility=hidden
- CFLAGS+=-DBOOST_SYMBOL_EXPORT=
- CFLAGS+=-DBOOST_SYMBOL_VISIBLE=
- when ($MAPS_MOBILE_EXPORT_OBJC_API) {
- YRT_EXPORT=__attribute__((visibility(\"default\")))
- }
- }
- when ($MAPSMOBI_BUILD_TARGET && $OS_LINUX) {
- when ($NO_GRAPHICS != "yes") {
- QT_REQUIRED=yes
- OPENGL_REQUIRED=yes
- }
- OS_SDK=ubuntu-16
- PIC=yes
- LDFLAGS+=-lstdc++ -lgcc_s
- CFLAGS+=-DBOOST_SYMBOL_EXPORT=
- CFLAGS+=-DBOOST_SYMBOL_VISIBLE=
- }
- when ($MAPSMOBI_BUILD_TARGET && $OS_YOCTO) {
- QT_REQUIRED=yes
- PIC=yes
- CFLAGS+=-DBOOST_SYMBOL_EXPORT=
- CFLAGS+=-DBOOST_SYMBOL_VISIBLE=
- }
|