moz.build (1489B)
1 # -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*- 2 # vim: set filetype=python: 3 # This Source Code Form is subject to the terms of the Mozilla Public 4 # License, v. 2.0. If a copy of the MPL was not distributed with this 5 # file, You can obtain one at http://mozilla.org/MPL/2.0/. 6 7 HOST_SOURCES += [ 8 "/other-licenses/nsis/Contrib/CityHash/cityhash/city.cpp", 9 "mar.c", 10 ] 11 12 HostProgram("mar") 13 14 HOST_USE_LIBS += [ 15 "hostmar", 16 ] 17 18 if CONFIG["HOST_OS_ARCH"] == "WINNT": 19 HOST_OS_LIBS += [ 20 "ws2_32", 21 ] 22 23 HOST_DEFINES["NO_SIGN_VERIFY"] = True 24 25 if CONFIG["MOZ_BUILD_APP"] != "tools/update-packaging": 26 Program("signmar") 27 28 SOURCES += HOST_SOURCES 29 30 USE_LIBS += [ 31 "mar", 32 "nspr", 33 "nss", 34 "signmar", 35 "verifymar", 36 ] 37 38 if CONFIG["MOZ_USE_NSS_FOR_MAR"]: 39 DEFINES["MAR_NSS"] = True 40 41 if CONFIG["OS_ARCH"] == "WINNT": 42 USE_STATIC_MSVCRT = True 43 44 OS_LIBS += [ 45 "ws2_32", 46 ] 47 if not CONFIG["MOZ_USE_NSS_FOR_MAR"]: 48 OS_LIBS += [ 49 "crypt32", 50 "advapi32", 51 ] 52 elif CONFIG["OS_ARCH"] == "Darwin" and not CONFIG["MOZ_USE_NSS_FOR_MAR"]: 53 OS_LIBS += [ 54 "-framework CoreFoundation", 55 "-framework Security", 56 ] 57 58 DisableStlWrapping() 59 60 61 for var in ("MAR_CHANNEL_ID", "MOZ_APP_VERSION"): 62 HOST_DEFINES[var] = '"%s"' % CONFIG[var] 63 if SOURCES: 64 DEFINES[var] = HOST_DEFINES[var]