diff --git a/src/Makefile b/src/Makefile index 5bf2de1..19c9ab1 100644 --- a/src/Makefile +++ b/src/Makefile @@ -1,7 +1,7 @@ CC=cc dietlib: - /opt/diet/bin/diet ${CC} -c -Os parser.c -o libpsyc.o -DDEBUG + /opt/diet/bin/diet ${CC} -static -c -Os parser.c -o libpsyc.o -DDEBUG /opt/diet/bin/diet ar rcs libpsyc.a libpsyc.o lib: diff --git a/src/parser.c b/src/parser.c index 277c994..d887c08 100644 --- a/src/parser.c +++ b/src/parser.c @@ -85,7 +85,7 @@ inline int PSYC_parseElement( * <0 on a parsing error. * This invalidates all but the cursor * out paramater. */ -inline int PSYC_parseHeader( +int PSYC_parseHeader( unsigned int* cursor, const uint8_t * data, unsigned int dlength, const uint8_t** name, unsigned int *nlength, diff --git a/src/parser.h b/src/parser.h index 1c7979c..961de00 100644 --- a/src/parser.h +++ b/src/parser.h @@ -36,7 +36,7 @@ * <0 on a parsing error. * This invalidates all but the cursor * out paramater. */ -extern int PSYC_parseHeader( +int PSYC_parseHeader( unsigned int* cursor, const uint8_t * data, unsigned int dlength, const uint8_t** name, unsigned int *nlength, @@ -110,7 +110,7 @@ int PSYC_parseClosedBody( * real length of the packet and thus * searches for the terminator. */ -extern int PSYC_parseOpenBody( +int PSYC_parseOpenBody( unsigned int* cursor, const uint8_t * data, unsigned int dlength, const uint8_t** name, unsigned int *nlength, diff --git a/src/tests/Makefile b/src/tests/Makefile index 347e93c..c73ef2b 100644 --- a/src/tests/Makefile +++ b/src/tests/Makefile @@ -1,3 +1,6 @@ -CFLAGS=-L.. -I.. -DDEBUG -lpsyc -it: testParser +dietlib: + /opt/diet/bin/diet cc -L.. -I.. -DDEBUG -lpsyc testParser.c -lpsyc -o testParser + +lib: + cc -L.. -I.. -DDEBUG -lpsyc testParser.c -lpsyc -o testParser