Skip to content

Commit 6101093

Browse files
author
Matsievskiy S.V
committed
Adding fru reader
1 parent 0aae775 commit 6101093

File tree

7 files changed

+620
-166
lines changed

7 files changed

+620
-166
lines changed

CMakeLists.txt

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,8 @@ endfunction()
5353

5454
add_executable(frugen frugen.c)
5555
add_executable(frugen-static frugen.c)
56-
add_library(fru-static STATIC fru.c)
57-
add_library(fru-shared SHARED fru.c)
56+
add_library(fru-static STATIC fru.c fru_reader.c)
57+
add_library(fru-shared SHARED fru.c fru_reader.c)
5858
find_library(JSON_LIB json-c)
5959
SET_TARGET_PROPERTIES(fru-static PROPERTIES OUTPUT_NAME fru CLEAN_DIRECT_OUTPUT 1)
6060
SET_TARGET_PROPERTIES(fru-shared PROPERTIES OUTPUT_NAME fru CLEAN_DIRECT_OUTPUT 1)
@@ -76,6 +76,7 @@ endif(COMPILER_WARNINGS)
7676
# To make frugen 32-bit, uncomment the following lines or use an external toolchain file
7777
if (BINARY_32BIT)
7878
set_target_properties(frugen PROPERTIES COMPILE_FLAGS "-m32" LINK_FLAGS "-m32")
79+
set_target_properties(fru-reader PROPERTIES COMPILE_FLAGS "-m32" LINK_FLAGS "-m32")
7980
set_target_properties(frugen-static PROPERTIES COMPILE_FLAGS "-m32" LINK_FLAGS "-m32")
8081
set_target_properties(fru-static PROPERTIES COMPILE_FLAGS "-m32" LINK_FLAGS "-m32")
8182
set_target_properties(fru-shared PROPERTIES COMPILE_FLAGS "-m32" LINK_FLAGS "-m32")

fatal.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
#pragma once
2+
#define fatal(fmt, args...) do { \
3+
fprintf(stderr, fmt, ##args); \
4+
fprintf(stderr, "\n"); \
5+
exit(1); \
6+
} while(0)

0 commit comments

Comments
 (0)