mirror of
git://git.psyc.eu/libpsyc
synced 2024-08-15 03:19:02 +00:00
added makefile to compile lib
This commit is contained in:
parent
001298b1de
commit
52eac395f6
5 changed files with 22 additions and 3 deletions
12
src/Makefile
Normal file
12
src/Makefile
Normal file
|
@ -0,0 +1,12 @@
|
|||
CC=clang
|
||||
|
||||
dietlib:
|
||||
/opt/diet/bin/diet ${CC} -c -Os parser.c -o libpsyc.o -DDEBUG
|
||||
/opt/diet/bin/diet ar rcs libpsyc.a libpsyc.o
|
||||
|
||||
lib:
|
||||
${CC} -static -c -Os parser.c -lc -o libpsyc.o -DDEBUG
|
||||
ar rcs libpsyc.a libpsyc.o
|
||||
|
||||
|
||||
|
|
@ -106,7 +106,7 @@ inline int PSYC_parseHeader(
|
|||
* real length of the packet and thus
|
||||
* searches for the terminator.
|
||||
*/
|
||||
inline int PSYC_parseOpenBody(
|
||||
int PSYC_parseOpenBody(
|
||||
unsigned int* cursor,
|
||||
const uint8_t * data, unsigned int dlength,
|
||||
const uint8_t** name, unsigned int *nlength,
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
CFLAGS=-I.. -DDEBUG ../parser.c
|
||||
CFLAGS=-I.. -DDEBUG -lpsyc
|
||||
|
||||
it: testParser
|
||||
|
|
7
src/tests/binary.txt
Normal file
7
src/tests/binary.txt
Normal file
|
@ -0,0 +1,7 @@
|
|||
:_source some_source
|
||||
:_length
|
||||
|
||||
_method
|
||||
1234567
|
||||
|
|
||||
|
|
@ -65,7 +65,7 @@ int main(int argc, char** argv)
|
|||
if(tmp != cursor)
|
||||
tmp=cursor;
|
||||
else
|
||||
return;
|
||||
return 1;
|
||||
printf("ret: %d\ncursor: %d\n--------\n",
|
||||
ret,cursor);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue