mirror of
https://github.com/Decompollaborate/rabbitizer.git
synced 2025-01-29 21:32:45 +00:00
Add version header
This commit is contained in:
parent
421e740014
commit
079c2b6b10
23
include/common/RabbitizerVersion.h
Normal file
23
include/common/RabbitizerVersion.h
Normal file
@ -0,0 +1,23 @@
|
||||
/* SPDX-FileCopyrightText: © 2022 Decompollaborate */
|
||||
/* SPDX-License-Identifier: MIT */
|
||||
|
||||
#ifndef RABBITIZER_VERSION_H
|
||||
#define RABBITIZER_VERSION_H
|
||||
|
||||
#include "Utils.h"
|
||||
|
||||
// Header version
|
||||
#define RAB_VERSION_MAJOR 1
|
||||
#define RAB_VERSION_MINOR 2
|
||||
#define RAB_VERSION_PATCH 1
|
||||
|
||||
#define RAB_VERSION_STR RAB_STRINGIFY(RAB_VERSION_MAJOR) "." RAB_STRINGIFY(RAB_VERSION_MINOR) "." RAB_STRINGIFY(RAB_VERSION_PATCH)
|
||||
|
||||
// Compiled library version
|
||||
extern const int RabVersion_Major;
|
||||
extern const int RabVersion_Minor;
|
||||
extern const int RabVersion_Patch;
|
||||
|
||||
extern const char RabVersion_Str[];
|
||||
|
||||
#endif
|
@ -46,6 +46,8 @@
|
||||
|
||||
#define ARRAY_COUNT(arr) (sizeof(arr) / sizeof((arr)[0]))
|
||||
|
||||
#define RAB_STRINGIFY(x) #x
|
||||
|
||||
#define MASK(v, w) ((v) & ((1 << (w)) - 1))
|
||||
|
||||
/*
|
||||
|
@ -1,7 +1,11 @@
|
||||
/* SPDX-FileCopyrightText: © 2022 Decompollaborate */
|
||||
/* SPDX-License-Identifier: MIT */
|
||||
|
||||
#ifndef RABBITIZER_H
|
||||
#define RABBITIZER_H
|
||||
|
||||
#include "common/Utils.h"
|
||||
#include "common/RabbitizerVersion.h"
|
||||
#include "common/RabbitizerConfig.h"
|
||||
|
||||
#include "instructions/RabbitizerOperandType.h"
|
||||
|
@ -3,6 +3,7 @@
|
||||
|
||||
[metadata]
|
||||
name = rabbitizer
|
||||
# Version should be synced with include/common/RabbitizerVersion.h
|
||||
version = 1.2.1
|
||||
author = Decompollaborate
|
||||
license = MIT
|
||||
|
2
setup.py
2
setup.py
@ -16,7 +16,7 @@ setup(
|
||||
"src/instructions/RabbitizerInstructionR5900/RabbitizerInstructionR5900.c", "src/instructions/RabbitizerInstructionR5900/RabbitizerInstructionR5900_ProcessUniqueId.c",
|
||||
"src/instructions/RabbitizerInstrDescriptor.c", "src/instructions/RabbitizerInstrId.c", "src/instructions/RabbitizerRegister.c", "src/instructions/RabbitizerInstrSuffix.c",
|
||||
"src/analysis/RabbitizerTrackedRegisterState.c", "src/analysis/RabbitizerRegistersTracker.c", "src/analysis/RabbitizerLoPairingInfo.c",
|
||||
"src/common/Utils.c", "src/common/RabbitizerConfig.c"],
|
||||
"src/common/Utils.c", "src/common/RabbitizerVersion.c", "src/common/RabbitizerConfig.c"],
|
||||
include_dirs=["include", "rabbitizer"],
|
||||
extra_compile_args = [
|
||||
"-std=c11",
|
||||
|
10
src/common/RabbitizerVersion.c
Normal file
10
src/common/RabbitizerVersion.c
Normal file
@ -0,0 +1,10 @@
|
||||
/* SPDX-FileCopyrightText: © 2022 Decompollaborate */
|
||||
/* SPDX-License-Identifier: MIT */
|
||||
|
||||
#include "common/RabbitizerVersion.h"
|
||||
|
||||
const int RabVersion_Major = RAB_VERSION_MAJOR;
|
||||
const int RabVersion_Minor = RAB_VERSION_MINOR;
|
||||
const int RabVersion_Patch = RAB_VERSION_PATCH;
|
||||
|
||||
const char RabVersion_Str[] = RAB_VERSION_STR;
|
Loading…
x
Reference in New Issue
Block a user