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
a2aca6a698
commit
f10e1801ad
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
|
* real length of the packet and thus
|
||||||
* searches for the terminator.
|
* searches for the terminator.
|
||||||
*/
|
*/
|
||||||
inline int PSYC_parseOpenBody(
|
int PSYC_parseOpenBody(
|
||||||
unsigned int* cursor,
|
unsigned int* cursor,
|
||||||
const uint8_t * data, unsigned int dlength,
|
const uint8_t * data, unsigned int dlength,
|
||||||
const uint8_t** name, unsigned int *nlength,
|
const uint8_t** name, unsigned int *nlength,
|
||||||
|
|
|
@ -1,3 +1,3 @@
|
||||||
CFLAGS=-I.. -DDEBUG ../parser.c
|
CFLAGS=-I.. -DDEBUG -lpsyc
|
||||||
|
|
||||||
it: testParser
|
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)
|
if(tmp != cursor)
|
||||||
tmp=cursor;
|
tmp=cursor;
|
||||||
else
|
else
|
||||||
return;
|
return 1;
|
||||||
printf("ret: %d\ncursor: %d\n--------\n",
|
printf("ret: %d\ncursor: %d\n--------\n",
|
||||||
ret,cursor);
|
ret,cursor);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue