29 lines
857 B
C
29 lines
857 B
C
#ifndef DEPENDENCIES_H
|
|
#define DEPENDENCIES_H
|
|
|
|
#include <libcli_version.h>
|
|
#include <libft_ssl_version.h>
|
|
|
|
#include "compiler.h"
|
|
|
|
struct dep
|
|
{
|
|
const char *name;
|
|
const char *version;
|
|
const char *extra;
|
|
};
|
|
|
|
#define ADD_DEPENDENCY(NAME, VER_MACRO, HAS_GIT_COMMIT_MACRO, GIT_COMMIT_MACRO) \
|
|
static const struct dep dep_##NAME __attribute__((used, section("ft_ssl_deps"))) = { \
|
|
.name = STR(NAME), \
|
|
.version = (VER_MACRO), \
|
|
.extra = (HAS_GIT_COMMIT_MACRO) ? " (" GIT_COMMIT_MACRO ")" : "" \
|
|
};
|
|
|
|
extern const struct dep __start_ft_ssl_deps[] __attribute__((weak));
|
|
extern const struct dep __stop_ft_ssl_deps[] __attribute__((weak));
|
|
|
|
ADD_DEPENDENCY(libcli, LIBCLI_VERSION, LIBCLI_HAS_GIT_COMMIT, LIBCLI_GIT_COMMIT)
|
|
ADD_DEPENDENCY(libtf_ssl, LIBFT_SSL_VERSION, LIBFT_SSL_HAS_GIT_COMMIT, LIBFT_SSL_GIT_COMMIT)
|
|
|
|
#endif
|