2011-12-17 06:13:11 -06:00
|
|
|
# -*- Mode: makefile; tab-width: 4; indent-tabs-mode: t -*-
|
|
|
|
#
|
|
|
|
# Version: MPL 1.1 / GPLv3+ / LGPLv3+
|
|
|
|
#
|
|
|
|
# The contents of this file are subject to the Mozilla Public License Version
|
|
|
|
# 1.1 (the "License"); you may not use this file except in compliance with
|
|
|
|
# the License or as specified alternatively below. You may obtain a copy of
|
|
|
|
# the License at http://www.mozilla.org/MPL/
|
|
|
|
#
|
|
|
|
# Software distributed under the License is distributed on an "AS IS" basis,
|
|
|
|
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
|
|
|
# for the specific language governing rights and limitations under the
|
|
|
|
# License.
|
|
|
|
#
|
|
|
|
# Major Contributor(s):
|
|
|
|
# Copyright (C) 2011 Matúš Kukan <matus.kukan@gmail.com> (initial developer)
|
|
|
|
#
|
|
|
|
# All Rights Reserved.
|
|
|
|
#
|
|
|
|
# For minor contributions see the git repository.
|
|
|
|
#
|
|
|
|
# Alternatively, the contents of this file may be used under the terms of
|
|
|
|
# either the GNU General Public License Version 3 or later (the "GPLv3+"), or
|
|
|
|
# the GNU Lesser General Public License Version 3 or later (the "LGPLv3+"),
|
|
|
|
# in which case the provisions of the GPLv3+ or the LGPLv3+ are applicable
|
|
|
|
# instead of those above.
|
|
|
|
|
|
|
|
$(eval $(call gb_Library_Library,sal))
|
|
|
|
|
|
|
|
$(eval $(call gb_Library_set_soversion_script,sal,3,$(SRCDIR)/sal/util/sal.map))
|
|
|
|
|
2012-12-26 15:13:55 -06:00
|
|
|
$(eval $(call gb_Library_set_precompiled_header,sal,$(SRCDIR)/sal/inc/pch/precompiled_sal))
|
|
|
|
|
2012-04-07 16:22:10 -05:00
|
|
|
$(eval $(call gb_Library_use_packages,sal,\
|
|
|
|
sal_generated \
|
2013-02-26 16:25:41 -06:00
|
|
|
sal_odk_headers \
|
2012-04-07 16:22:10 -05:00
|
|
|
sal_inc \
|
|
|
|
))
|
2011-12-17 06:13:11 -06:00
|
|
|
|
|
|
|
$(eval $(call gb_Library_set_include,sal,\
|
|
|
|
$$(INCLUDE) \
|
2012-03-05 12:02:10 -06:00
|
|
|
-I$(SRCDIR)/sal/inc \
|
2011-12-17 06:13:11 -06:00
|
|
|
))
|
|
|
|
|
|
|
|
$(eval $(call gb_Library_add_defs,sal,\
|
|
|
|
$(if $(filter $(ALLOC),SYS_ALLOC TCMALLOC JEMALLOC), \
|
|
|
|
-DFORCE_SYSALLOC \
|
|
|
|
) \
|
|
|
|
$(if $(filter $(OS),IOS), \
|
|
|
|
-DNO_CHILD_PROCESSES \
|
|
|
|
) \
|
|
|
|
$(LFS_CFLAGS) \
|
2011-12-17 06:22:02 -06:00
|
|
|
-DSAL_DLLIMPLEMENTATION \
|
2012-05-21 12:01:29 -05:00
|
|
|
-DRTL_OS="\"$(RTL_OS)"\" \
|
|
|
|
-DRTL_ARCH="\"$(RTL_ARCH)"\" \
|
2013-01-29 14:36:31 -06:00
|
|
|
-DSRCDIR="\"$(SRCDIR)\"" \
|
2011-12-17 06:13:11 -06:00
|
|
|
))
|
|
|
|
|
2012-04-07 16:22:08 -05:00
|
|
|
$(eval $(call gb_Library_use_libraries,sal,\
|
2011-12-17 06:13:11 -06:00
|
|
|
$(if $(filter $(OS),ANDROID), \
|
|
|
|
lo-bootstrap \
|
|
|
|
) \
|
2012-09-26 16:45:28 -05:00
|
|
|
$(gb_UWINAPI) \
|
2011-12-17 06:13:11 -06:00
|
|
|
))
|
|
|
|
|
2012-11-09 13:20:04 -06:00
|
|
|
$(eval $(call gb_Library_use_externals,sal,\
|
|
|
|
valgrind \
|
2012-11-12 17:37:10 -06:00
|
|
|
boost_headers \
|
2012-11-09 13:20:04 -06:00
|
|
|
))
|
|
|
|
|
2012-09-28 08:31:46 -05:00
|
|
|
$(eval $(call gb_Library_use_system_win32_libs,sal,\
|
|
|
|
advapi32 \
|
|
|
|
comdlg32 \
|
|
|
|
mpr \
|
|
|
|
ole32 \
|
|
|
|
shell32 \
|
|
|
|
user32 \
|
|
|
|
ws2_32 \
|
|
|
|
))
|
|
|
|
|
2012-09-27 17:54:49 -05:00
|
|
|
$(eval $(call gb_Library_add_libs,sal,\
|
2012-12-11 17:07:09 -06:00
|
|
|
$(if $(filter-out $(OS),WNT), \
|
2012-09-27 17:54:49 -05:00
|
|
|
$(if $(filter $(OS),ANDROID),, \
|
|
|
|
-lpthread \
|
|
|
|
) \
|
|
|
|
) \
|
2012-09-28 05:25:50 -05:00
|
|
|
$(if $(filter $(OS),LINUX), \
|
|
|
|
-ldl \
|
|
|
|
) \
|
|
|
|
$(if $(filter $(OS),SOLARIS), \
|
|
|
|
-lnsl \
|
|
|
|
-lsocket \
|
|
|
|
) \
|
2012-09-27 17:54:49 -05:00
|
|
|
))
|
|
|
|
|
2011-12-17 06:13:11 -06:00
|
|
|
ifeq ($(OS),MACOSX)
|
2012-09-27 17:18:12 -05:00
|
|
|
$(eval $(call gb_Library_use_system_darwin_frameworks,sal,\
|
|
|
|
Carbon \
|
|
|
|
CoreFoundation \
|
2011-12-17 06:13:11 -06:00
|
|
|
))
|
|
|
|
endif
|
|
|
|
|
|
|
|
$(eval $(call gb_Library_add_exception_objects,sal,\
|
2012-12-06 02:06:55 -06:00
|
|
|
sal/osl/all/compat \
|
2011-12-17 06:13:11 -06:00
|
|
|
sal/osl/all/debugbase \
|
|
|
|
sal/osl/all/loadmodulerelative \
|
|
|
|
sal/osl/all/log \
|
|
|
|
sal/osl/all/trace \
|
|
|
|
sal/osl/all/utility \
|
2013-02-22 10:49:53 -06:00
|
|
|
sal/rtl/alloc_arena \
|
|
|
|
sal/rtl/alloc_cache \
|
|
|
|
sal/rtl/alloc_fini \
|
|
|
|
sal/rtl/alloc_global \
|
|
|
|
sal/rtl/bootstrap \
|
|
|
|
sal/rtl/byteseq \
|
|
|
|
sal/rtl/cipher \
|
|
|
|
sal/rtl/cmdargs \
|
|
|
|
sal/rtl/crc \
|
|
|
|
sal/rtl/digest \
|
|
|
|
sal/rtl/hash \
|
|
|
|
sal/rtl/locale \
|
|
|
|
sal/rtl/logfile \
|
|
|
|
sal/rtl/math \
|
|
|
|
sal/rtl/random \
|
|
|
|
sal/rtl/rtl_process \
|
|
|
|
sal/rtl/strbuf \
|
|
|
|
sal/rtl/strimp \
|
|
|
|
sal/rtl/string \
|
|
|
|
sal/rtl/unload \
|
|
|
|
sal/rtl/uri \
|
|
|
|
sal/rtl/ustrbuf \
|
|
|
|
sal/rtl/ustring \
|
|
|
|
sal/rtl/uuid \
|
2011-12-17 06:13:11 -06:00
|
|
|
sal/textenc/converter \
|
2012-01-06 04:48:13 -06:00
|
|
|
sal/textenc/convertsimple \
|
2012-01-06 08:00:19 -06:00
|
|
|
sal/textenc/handleundefinedunicodetotextchar \
|
2011-12-17 06:13:11 -06:00
|
|
|
sal/textenc/tcvtutf8 \
|
|
|
|
sal/textenc/tencinfo \
|
|
|
|
sal/textenc/textcvt \
|
2012-01-05 16:18:19 -06:00
|
|
|
sal/textenc/textenc \
|
2011-12-17 06:13:11 -06:00
|
|
|
sal/textenc/unichars \
|
|
|
|
))
|
2012-01-05 16:18:19 -06:00
|
|
|
$(eval $(call gb_Library_add_cobjects,sal,\
|
|
|
|
sal/osl/all/filepath \
|
|
|
|
))
|
2011-12-17 06:13:11 -06:00
|
|
|
|
2012-03-13 11:54:55 -05:00
|
|
|
ifeq ($(OS),IOS)
|
|
|
|
$(eval $(call gb_Library_add_cxxflags,sal,\
|
|
|
|
$(gb_OBJCXXFLAGS) \
|
|
|
|
))
|
|
|
|
endif
|
|
|
|
|
2012-02-15 08:36:31 -06:00
|
|
|
ifeq ($(OS),ANDROID)
|
2012-02-13 13:34:13 -06:00
|
|
|
$(eval $(call gb_Library_add_exception_objects,sal,\
|
|
|
|
sal/textenc/context \
|
|
|
|
sal/textenc/convertbig5hkscs \
|
|
|
|
sal/textenc/converteuctw \
|
|
|
|
sal/textenc/convertgb18030 \
|
2012-11-27 14:48:29 -06:00
|
|
|
sal/textenc/convertisciidevangari \
|
2012-02-13 13:34:13 -06:00
|
|
|
sal/textenc/convertiso2022cn \
|
|
|
|
sal/textenc/convertiso2022jp \
|
|
|
|
sal/textenc/convertiso2022kr \
|
|
|
|
sal/textenc/convertsinglebytetobmpunicode \
|
|
|
|
sal/textenc/tables \
|
|
|
|
sal/textenc/tcvtbyte \
|
|
|
|
sal/textenc/tcvtmb \
|
|
|
|
sal/textenc/tcvtutf7 \
|
|
|
|
))
|
|
|
|
endif
|
|
|
|
|
2012-12-11 17:07:09 -06:00
|
|
|
ifneq ($(OS),WNT)
|
2011-12-17 06:13:11 -06:00
|
|
|
$(eval $(call gb_Library_add_exception_objects,sal,\
|
|
|
|
sal/osl/unx/conditn \
|
2012-09-12 06:51:48 -05:00
|
|
|
sal/osl/unx/diagnose \
|
2011-12-17 06:13:11 -06:00
|
|
|
sal/osl/unx/file \
|
|
|
|
sal/osl/unx/file_error_transl \
|
|
|
|
sal/osl/unx/file_misc \
|
|
|
|
sal/osl/unx/file_path_helper \
|
|
|
|
sal/osl/unx/file_stat \
|
|
|
|
sal/osl/unx/file_url \
|
|
|
|
sal/osl/unx/file_volume \
|
2012-03-12 05:52:26 -05:00
|
|
|
sal/osl/unx/module \
|
2011-12-17 06:13:11 -06:00
|
|
|
sal/osl/unx/process \
|
|
|
|
sal/osl/unx/process_impl \
|
2013-02-22 15:19:22 -06:00
|
|
|
$(if $(filter DESKTOP,$(BUILD_TYPE)), sal/osl/unx/salinit) \
|
2011-12-17 06:13:11 -06:00
|
|
|
sal/osl/unx/uunxapi \
|
|
|
|
))
|
|
|
|
$(eval $(call gb_Library_add_cobjects,sal,\
|
|
|
|
sal/osl/unx/mutex \
|
|
|
|
sal/osl/unx/nlsupport \
|
|
|
|
sal/osl/unx/pipe \
|
|
|
|
sal/osl/unx/profile \
|
|
|
|
sal/osl/unx/readwrite_helper \
|
|
|
|
sal/osl/unx/security \
|
|
|
|
sal/osl/unx/socket \
|
|
|
|
sal/osl/unx/system \
|
|
|
|
sal/osl/unx/tempfile \
|
|
|
|
sal/osl/unx/thread \
|
|
|
|
sal/osl/unx/time \
|
|
|
|
sal/osl/unx/util \
|
|
|
|
))
|
|
|
|
$(eval $(call gb_Library_add_cobject,sal,sal/osl/unx/signal, \
|
2013-01-03 08:36:20 -06:00
|
|
|
$(if $(filter $(ENABLE_CRASHDUMP),YES)$(filter $(ENABLE_DBGUTIL),TRUE), \
|
2011-12-17 06:13:11 -06:00
|
|
|
-DSAL_ENABLE_CRASH_REPORT) \
|
|
|
|
))
|
|
|
|
|
|
|
|
ifneq ($(filter $(OS),MACOSX IOS),)
|
|
|
|
$(eval $(call gb_Library_add_exception_objects,sal,\
|
|
|
|
sal/osl/unx/osxlocale \
|
|
|
|
))
|
|
|
|
endif
|
2012-05-08 18:22:29 -05:00
|
|
|
ifneq ($(filter $(OS),SOLARIS FREEBSD NETBSD MACOSX AIX OPENBSD DRAGONFLY)$(filter $(OS)$(CPUNAME),LINUXSPARC),)
|
2011-12-17 06:13:11 -06:00
|
|
|
$(eval $(call gb_Library_add_cobjects,sal,\
|
|
|
|
sal/osl/unx/backtrace \
|
|
|
|
))
|
|
|
|
endif
|
|
|
|
ifneq ($(filter $(OS)$(CPU),SOLARISU SOLARISS NETBSDS LINUXS),)
|
|
|
|
$(eval $(call gb_Library_add_asmobjects,sal,\
|
|
|
|
sal/osl/unx/asm/interlck_sparc \
|
|
|
|
))
|
2012-05-08 18:22:29 -05:00
|
|
|
else ifeq ($(OS)$(CPUNAME),SOLARISINTEL)
|
2011-12-17 06:13:11 -06:00
|
|
|
$(eval $(call gb_Library_add_asmobjects,sal,\
|
|
|
|
sal/osl/unx/asm/interlck_x86 \
|
|
|
|
))
|
|
|
|
else
|
|
|
|
$(eval $(call gb_Library_add_cobjects,sal,\
|
|
|
|
sal/osl/unx/interlck \
|
|
|
|
))
|
|
|
|
endif
|
|
|
|
|
2012-12-11 17:07:09 -06:00
|
|
|
else # $(OS) == WNT
|
2011-12-17 06:13:11 -06:00
|
|
|
|
|
|
|
# FIXME ?
|
|
|
|
# .IF "$(CCNUMVER)" >= "001400000000"
|
|
|
|
# $(eval $(call gb_Library_add_defs,sal,\
|
|
|
|
-D_CRT_NON_CONFORMING_SWPRINTFS \
|
|
|
|
))
|
|
|
|
# .ENDIF
|
|
|
|
|
|
|
|
$(eval $(call gb_Library_add_exception_objects,sal,\
|
|
|
|
sal/osl/w32/file \
|
|
|
|
sal/osl/w32/file_dirvol \
|
|
|
|
sal/osl/w32/file_url \
|
|
|
|
sal/osl/w32/module \
|
|
|
|
sal/osl/w32/path_helper \
|
|
|
|
sal/osl/w32/process \
|
|
|
|
sal/osl/w32/procimpl \
|
|
|
|
sal/osl/w32/profile \
|
|
|
|
sal/osl/w32/salinit \
|
|
|
|
sal/osl/w32/signal \
|
|
|
|
sal/osl/w32/socket \
|
|
|
|
sal/osl/w32/tempfile \
|
|
|
|
))
|
|
|
|
$(eval $(call gb_Library_add_cobjects,sal,\
|
|
|
|
sal/osl/w32/conditn \
|
|
|
|
sal/osl/w32/diagnose \
|
|
|
|
sal/osl/w32/dllentry \
|
|
|
|
sal/osl/w32/file_error \
|
|
|
|
sal/osl/w32/interlck \
|
|
|
|
sal/osl/w32/mutex \
|
|
|
|
sal/osl/w32/nlsupport \
|
|
|
|
sal/osl/w32/pipe \
|
|
|
|
sal/osl/w32/security \
|
|
|
|
sal/osl/w32/thread \
|
|
|
|
sal/osl/w32/time \
|
|
|
|
sal/osl/w32/util \
|
|
|
|
))
|
|
|
|
|
2012-12-11 17:07:09 -06:00
|
|
|
endif # ifneq ($(OS),WNT)
|
2011-12-17 06:13:11 -06:00
|
|
|
|
|
|
|
# vim: set noet sw=4 ts=4:
|