Skip to content

Commit

Permalink
Adding fru reader
Browse files Browse the repository at this point in the history
  • Loading branch information
Matsievskiy S.V committed Nov 15, 2022
1 parent 0aae775 commit 6101093
Show file tree
Hide file tree
Showing 7 changed files with 620 additions and 166 deletions.
5 changes: 3 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,8 @@ endfunction()

add_executable(frugen frugen.c)
add_executable(frugen-static frugen.c)
add_library(fru-static STATIC fru.c)
add_library(fru-shared SHARED fru.c)
add_library(fru-static STATIC fru.c fru_reader.c)
add_library(fru-shared SHARED fru.c fru_reader.c)
find_library(JSON_LIB json-c)
SET_TARGET_PROPERTIES(fru-static PROPERTIES OUTPUT_NAME fru CLEAN_DIRECT_OUTPUT 1)
SET_TARGET_PROPERTIES(fru-shared PROPERTIES OUTPUT_NAME fru CLEAN_DIRECT_OUTPUT 1)
Expand All @@ -76,6 +76,7 @@ endif(COMPILER_WARNINGS)
# To make frugen 32-bit, uncomment the following lines or use an external toolchain file
if (BINARY_32BIT)
set_target_properties(frugen PROPERTIES COMPILE_FLAGS "-m32" LINK_FLAGS "-m32")
set_target_properties(fru-reader PROPERTIES COMPILE_FLAGS "-m32" LINK_FLAGS "-m32")
set_target_properties(frugen-static PROPERTIES COMPILE_FLAGS "-m32" LINK_FLAGS "-m32")
set_target_properties(fru-static PROPERTIES COMPILE_FLAGS "-m32" LINK_FLAGS "-m32")
set_target_properties(fru-shared PROPERTIES COMPILE_FLAGS "-m32" LINK_FLAGS "-m32")
Expand Down
6 changes: 6 additions & 0 deletions fatal.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#pragma once
#define fatal(fmt, args...) do { \
fprintf(stderr, fmt, ##args); \
fprintf(stderr, "\n"); \
exit(1); \
} while(0)
Loading

0 comments on commit 6101093

Please sign in to comment.