mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-14 18:48:13 -07:00
Makefile & CMake rework
This commit is contained in:
parent
9d97962759
commit
72acec5806
23 changed files with 467 additions and 291 deletions
|
@ -1,10 +1,30 @@
|
|||
include(cliparser.cmake)
|
||||
include(tinycbor.cmake)
|
||||
include(jansson.cmake)
|
||||
include(lua.cmake)
|
||||
include(mbedtls.cmake)
|
||||
include(amiibo.cmake)
|
||||
include(reveng.cmake)
|
||||
include(zlib.cmake)
|
||||
include(hardnested.cmake)
|
||||
include(whereami.cmake)
|
||||
if (NOT TARGET pm3rrg_rdv4_amiibo)
|
||||
include(amiibo.cmake)
|
||||
endif()
|
||||
if (NOT TARGET pm3rrg_rdv4_cliparser)
|
||||
include(cliparser.cmake)
|
||||
endif()
|
||||
if (NOT TARGET pm3rrg_rdv4_hardnested)
|
||||
include(hardnested.cmake)
|
||||
endif()
|
||||
if (NOT TARGET pm3rrg_rdv4_jansson)
|
||||
include(jansson.cmake)
|
||||
endif()
|
||||
if (NOT TARGET pm3rrg_rdv4_lua)
|
||||
include(lua.cmake)
|
||||
endif()
|
||||
if (NOT TARGET pm3rrg_rdv4_mbedtls)
|
||||
include(mbedtls.cmake)
|
||||
endif()
|
||||
if (NOT TARGET pm3rrg_rdv4_reveng)
|
||||
include(reveng.cmake)
|
||||
endif()
|
||||
if (NOT TARGET pm3rrg_rdv4_tinycbor)
|
||||
include(tinycbor.cmake)
|
||||
endif()
|
||||
if (NOT TARGET pm3rrg_rdv4_whereami)
|
||||
include(whereami.cmake)
|
||||
endif()
|
||||
if (NOT TARGET pm3rrg_rdv4_z)
|
||||
include(zlib.cmake)
|
||||
endif()
|
||||
|
|
|
@ -11,6 +11,14 @@ add_library(pm3rrg_rdv4_amiibo STATIC
|
|||
amiitool/keygen.c
|
||||
)
|
||||
|
||||
if (NOT TARGET pm3rrg_rdv4_mbedtls)
|
||||
include(mbedtls.cmake)
|
||||
endif()
|
||||
find_library(pm3rrg_rdv4_mbedtls REQUIRED)
|
||||
target_link_libraries(pm3rrg_rdv4_amiibo PRIVATE
|
||||
readline
|
||||
m
|
||||
pm3rrg_rdv4_mbedtls)
|
||||
target_include_directories(pm3rrg_rdv4_amiibo PRIVATE ../../include ../../common)
|
||||
target_include_directories(pm3rrg_rdv4_amiibo INTERFACE amiitool)
|
||||
target_compile_options(pm3rrg_rdv4_amiibo PRIVATE -Wall -Werror -O3)
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
MYSRCPATHS =
|
||||
MYINCLUDES = -I. -I.. -I../jansson -I../../../common -I../../../include
|
||||
MYINCLUDES = -I. -I.. -I../jansson -I../../../common -I../../../common/mbedtls -I../../../include
|
||||
MYCFLAGS =
|
||||
MYDEFS =
|
||||
MYSRCS = \
|
||||
|
|
|
@ -6,8 +6,8 @@
|
|||
*/
|
||||
|
||||
#include "amiibo.h"
|
||||
#include "mbedtls/md.h"
|
||||
#include "mbedtls/aes.h"
|
||||
#include "md.h"
|
||||
#include "aes.h"
|
||||
#include "commonutil.h"
|
||||
|
||||
#define HMAC_POS_DATA 0x008
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
#include "drbg.h"
|
||||
#include <assert.h>
|
||||
#include <string.h>
|
||||
#include "mbedtls/md.h"
|
||||
#include "md.h"
|
||||
|
||||
void nfc3d_drbg_init(nfc3d_drbg_ctx *ctx, const uint8_t *hmacKey, size_t hmacKeySize, const uint8_t *seed, size_t seedSize) {
|
||||
assert(ctx != NULL);
|
||||
|
|
|
@ -45,5 +45,6 @@ add_library(pm3rrg_rdv4_mbedtls STATIC
|
|||
)
|
||||
|
||||
target_include_directories(pm3rrg_rdv4_mbedtls PRIVATE ../../common)
|
||||
target_include_directories(pm3rrg_rdv4_mbedtls INTERFACE ../../common/mbedtls)
|
||||
target_compile_options(pm3rrg_rdv4_mbedtls PRIVATE -Wall -Werror -O3)
|
||||
set_property(TARGET pm3rrg_rdv4_mbedtls PROPERTY POSITION_INDEPENDENT_CODE ON)
|
||||
|
|
|
@ -9,5 +9,6 @@ add_library(pm3rrg_rdv4_z STATIC
|
|||
)
|
||||
|
||||
target_compile_definitions(pm3rrg_rdv4_z PRIVATE Z_SOLO NO_GZIP ZLIB_PM3_TUNED)
|
||||
target_include_directories(pm3rrg_rdv4_z INTERFACE ../../common/zlib)
|
||||
target_compile_options(pm3rrg_rdv4_z PRIVATE -Wall -Werror -O3)
|
||||
set_property(TARGET pm3rrg_rdv4_z PROPERTY POSITION_INDEPENDENT_CODE ON)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue