Revision control
Copy as Markdown
Other Tools
# 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
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 += ["-Wno-deprecated-declarations"]
LOCAL_INCLUDES += [
"/comm/third_party/niwcompat",
]
OS_LIBS += ["shell32"]
if CONFIG["TARGET_CPU"] == "x86":
CXXFLAGS += ["/EHs"]
LDFLAGS += ["clang_rt.builtins-i386.lib"]
elif CONFIG["TARGET_CPU"] == "x86_64":
CXXFLAGS += ["/EHs"]
LDFLAGS += ["clang_rt.builtins-x86_64.lib"]
elif CONFIG["TARGET_CPU"] == "aarch64":
CXXFLAGS += ["/EHa"]
LDFLAGS += ["clang_rt.builtins-aarch64.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