librlp

C library for the Recursive Length Prefix (RLP) serialization format
git clone git://git.defalsify.org/librlp.git
Log | Files | Refs | LICENSE

commit 62ea097484864465cdda3a75eaf89c97d2dbc15a
parent 2e8af3a5d55f7c7f4d97f298c8a3ad88373c2cfe
Author: nolash <dev@holbrook.no>
Date:   Sun, 11 Apr 2021 14:07:55 +0200

Add missing objects to shared lib

Diffstat:
MMakefile | 25+++++++++++++------------
Msrc/rlp.h | 4++--
2 files changed, 15 insertions(+), 14 deletions(-)

diff --git a/Makefile b/Makefile @@ -1,12 +1,12 @@ build: - gcc -I./src -g3 -c src/rlp.c -o src/rlp.o - gcc -I./src -g3 -c src/encode.c -o src/encode.o - gcc -I./src -g3 -c src/decode.c -o src/decode.o - gcc -I./src -g3 -c src/bits.c -o src/bits.o - gcc -I./src -g3 -c src/endian.c -o src/endian.o + gcc -I./src $(CFLAGS) -c src/rlp.c -o src/rlp.o + gcc -I./src $(CFLAGS) -c src/encode.c -o src/encode.o + gcc -I./src $(CFLAGS) -c src/decode.c -o src/decode.o + gcc -I./src $(CFLAGS) -c src/bits.c -o src/bits.o + gcc -I./src $(CFLAGS) -c src/endian.c -o src/endian.o build_lib: build - gcc -I./src -fPIC -shared -o librlp.so -Wl,-soname,librlp.so.0.0.1 src/encode.o src/decode.o src/bits.o src/endian.o + gcc -I./src -fPIC -shared -o librlp.so -Wl,-soname,librlp.so.0.0.1 src/rlp.o src/encode.o src/decode.o src/bits.o src/endian.o build_test: build @@ -24,11 +24,12 @@ check: build_test tests/check_vectors .PHONY clean: - #rm -v tests/check_rlp - #rm -v tests/check_encoder - #rm -v tests/check_decoder - #rm -v tests/check_bits - rm -v tests/check_vectors - rm -v src/*.o + rm -vf tests/check_rlp + rm -vf tests/check_encoder + rm -vf tests/check_decoder + rm -vf tests/check_bits + rm -vf tests/check_vectors + rm -vf src/*.o + rm -vf src/lib*.so* .PHONY test: check diff --git a/src/rlp.h b/src/rlp.h @@ -12,8 +12,8 @@ enum rlp_state { - RLP_ENCODE, RLP_DECODE, + RLP_ENCODE, RLP_LIST, RLP_STRING, RLP_END, @@ -24,12 +24,12 @@ enum rlp_state { typedef struct rlp_encoder { char *buf; + char alloc; int depth; int size; enum rlp_state state; char *list_ptr[RLP_MAX_LIST_DEPTH]; char *ptr; - char alloc; } rlp_encoder_t;