# vim: set filetype=python: # This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. Program("rnpkeys") include("../../../rnpdefs.mozbuild") USE_LIBS += ["rnp"] LOCAL_INCLUDES = [ "!../lib", "..", "../../include", "../common", "../lib", ] if CONFIG["MZLA_SYSTEM_JSONC"]: CXXFLAGS += CONFIG["MZLA_JSONC_CFLAGS"] LDFLAGS += CONFIG["MZLA_JSONC_LIBS"] + ["-Wl,-rpath,$ORIGIN"] else: USE_LIBS += ["json-c"] LOCAL_INCLUDES += ["!/comm/third_party/json-c", "/comm/third_party/json-c"] LDFLAGS += ["-Wl,-rpath,$ORIGIN"] SOURCES += [ "../common/file-utils.cpp", "../common/str-utils.cpp", "../common/time-utils.cpp", "../lib/logging.cpp", "../rnp/fficli.cpp", "../rnp/rnpcfg.cpp", "main.cpp", "rnpkeys.cpp", "tui.cpp", ] if CONFIG["CC_TYPE"] == "clang-cl": CXXFLAGS += [ "/EHs", "-Wno-deprecated-declarations", ] LOCAL_INCLUDES += [ "/comm/third_party/niwcompat", ] OS_LIBS += ["shell32"] if CONFIG["CPU_ARCH"] == "x86": LDFLAGS += ["clang_rt.builtins-i386.lib"] elif CONFIG["CPU_ARCH"] == "x86_64": LDFLAGS += ["clang_rt.builtins-x86_64.lib"] SOURCES += [ "/comm/third_party/niwcompat/getopt.c", ] SOURCES["../rnp/rnpcfg.cpp"].flags += [ "-FI", "%s/comm/third_party/niwcompat/extra_include.h" % TOPSRCDIR, ] DEFINES["MOZILLA_CONFIG_H"] = True DEFINES["_CRT_SECURE_NO_WARNINGS"] = True