Skip to content

Commit

Permalink
iter
Browse files Browse the repository at this point in the history
  • Loading branch information
moribellamy committed Nov 17, 2023
1 parent 64ab2da commit 051ca00
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 18 deletions.
18 changes: 9 additions & 9 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
cmake_minimum_required(VERSION 3.26)
project(c90eth C)
project(mousewallet C)

set(CMAKE_C_STANDARD 90)
set(CMAKE_C_EXTENSIONS OFF)
Expand All @@ -11,19 +11,19 @@ endif ()

# Configure external deps
set(BUILD_SHARED_LIBS OFF) # static linkage
add_subdirectory("secp256k1")
add_library(argparse STATIC argparse/argparse.c)
add_library(sha3 STATIC SHA3IUF/sha3.c)
add_subdirectory("vendor/secp256k1")
add_library(argparse STATIC vendor/argparse/argparse.c)
add_library(sha3 STATIC vendor/SHA3IUF/sha3.c)

# Lib
add_library(lib STATIC src/lib.c)
target_link_libraries(lib sha3 secp256k1)
target_include_directories(lib PRIVATE secp256k1/include)
target_include_directories(lib PRIVATE vendor/secp256k1/include)

# Main
add_executable(c90eth src/main.c)
target_link_libraries(c90eth PRIVATE argparse lib)
add_executable(mousewallet src/main.c)
target_link_libraries(mousewallet PRIVATE argparse lib)

# Test
add_executable(test_c90eth src/tests.c)
target_link_libraries(test_c90eth PRIVATE lib)
add_executable(test_mousewallet src/tests.c)
target_link_libraries(test_mousewallet PRIVATE lib)
6 changes: 3 additions & 3 deletions src/lib.c
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
#include <stdio.h>
#include <string.h>

#include "../SHA3IUF/sha3.h"
#include "../secp256k1/examples/examples_util.h"
#include "../secp256k1/include/secp256k1.h"
#include "../vendor/SHA3IUF/sha3.h"
#include "../vendor/secp256k1/examples/examples_util.h"
#include "../vendor/secp256k1/include/secp256k1.h"

int decode_hex(unsigned char *bin, const char *const hex) {
size_t hex_len = strlen(hex);
Expand Down
8 changes: 4 additions & 4 deletions src/main.c
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
#include <stdio.h>
#include <string.h>

#include "../argparse/argparse.h"
#include "../secp256k1/examples/examples_util.h"
#include "../secp256k1/include/secp256k1.h"
#include "../vendor/argparse/argparse.h"
#include "../vendor/secp256k1/examples/examples_util.h"
#include "../vendor/secp256k1/include/secp256k1.h"
#include "lib.h"

static const char *const usages[] = {
Expand Down Expand Up @@ -46,4 +46,4 @@ int main(int argc, const char *argv[]) {
return 0;
}
}
}
}
4 changes: 2 additions & 2 deletions src/tests.c
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#include "../tinytest/tinytest.h"
#include "../vendor/tinytest/tinytest.h"
#include "lib.h"
#include <string.h>

Expand Down Expand Up @@ -49,4 +49,4 @@ int main() {
RUN(test_hex2bin_wrong_bufsize);
RUN(test_wallet_from_private_key);
return TEST_REPORT();
}
}

0 comments on commit 051ca00

Please sign in to comment.