52 lines
1.8 KiB
C++
52 lines
1.8 KiB
C++
|
|
// SPDX-License-Identifier: GPL-3.0-only
|
||
|
|
// SPDX-FileCopyrightText: Copyright (C) 2026 Catcrafts®
|
||
|
|
|
||
|
|
// lint-disable-file no-char-pointer
|
||
|
|
import std;
|
||
|
|
import Crafter.Build;
|
||
|
|
#include "lint-rules.h"
|
||
|
|
namespace fs = std::filesystem;
|
||
|
|
using namespace Crafter;
|
||
|
|
|
||
|
|
extern "C" Configuration CrafterBuildProject(std::span<const std::string_view> args) {
|
||
|
|
// fingerprintd-core — the wire formats and state machines as a static
|
||
|
|
// library of pure C++ modules. Deliberately free of GLib, libqcomtee and
|
||
|
|
// every system header: the byte-level decisions in here were the whole
|
||
|
|
// cost of this project, so they are pinned by tests that run on a dev box
|
||
|
|
// with no phone, no TEE and no sensor.
|
||
|
|
static auto Core = std::make_unique<Configuration>();
|
||
|
|
Core->path = "./";
|
||
|
|
Core->name = "fingerprintd-core";
|
||
|
|
Core->outputName = "fingerprintd-core";
|
||
|
|
ApplyStandardArgs(*Core, args);
|
||
|
|
Core->type = ConfigurationType::LibraryStatic;
|
||
|
|
{
|
||
|
|
std::array<fs::path, 2> ifaces = {
|
||
|
|
"interfaces/Fingerprintd",
|
||
|
|
"interfaces/Fingerprintd-Sfs",
|
||
|
|
};
|
||
|
|
std::array<fs::path, 0> impls = {};
|
||
|
|
Core->GetInterfacesAndImplementations(ifaces, impls);
|
||
|
|
}
|
||
|
|
|
||
|
|
// fingerprintd — the daemon: sensor rail, QTEE session, the gpfile and
|
||
|
|
// RPMB listeners, and the bus surface, wrapped around the core.
|
||
|
|
Configuration cfg;
|
||
|
|
cfg.path = "./";
|
||
|
|
cfg.name = "fingerprintd";
|
||
|
|
cfg.outputName = "fingerprintd";
|
||
|
|
ApplyStandardArgs(cfg, args);
|
||
|
|
cfg.type = ConfigurationType::Executable;
|
||
|
|
cfg.dependencies = { Core.get() };
|
||
|
|
{
|
||
|
|
std::array<fs::path, 0> ifaces = {};
|
||
|
|
std::array<fs::path, 1> impls = { "implementations/main" };
|
||
|
|
cfg.GetInterfacesAndImplementations(ifaces, impls);
|
||
|
|
}
|
||
|
|
|
||
|
|
cfg.AddTest("Sfs").Dependencies({ Core.get() });
|
||
|
|
|
||
|
|
ProjectLint::AddProjectLintRules(cfg);
|
||
|
|
|
||
|
|
return cfg;
|
||
|
|
}
|