Commit c4f40483 authored by yids's avatar yids

- removed some unused libs form makefile

- some arduino ifdeffing
parent ee8f70e3
......@@ -2,26 +2,26 @@
CC=colorgcc
CFLAGS="-I ../libs -DDEBUG"
all: test keygen tx-test rx-test
all: tx-test rx-test keygen test.c
base-tx: base-tx.c
$(CC) -o base-tx base-tx.c $(LIBS) $(CFLAGS)
test: test.c ../libs/pagerlib/pagerlib.c ../libs/pagerlib/things.c ../libs/pagerlib/pagerlib.h ../libs/pagerlib/packets.h
$(CC) -std=c99 -g -o test test.c ../libs/micro-ecc/uECC.c ../libs/pagerlib/pagerlib.c ../libs/pagerlib/things.c -lmbedtls -lmbedx509 -lsodium -lmbedcrypto $(LIBS) $(CFLAGS)
$(CC) -std=c99 -g -o test test.c ../libs/pagerlib/pagerlib.c ../libs/pagerlib/things.c -lsodium $(LIBS) $(CFLAGS)
putstest: putstest.c ../libs/pagerlib/pagerlib.c ../libs/pagerlib/things.c ../libs/pagerlib/pagerlib.h ../libs/pagerlib/packets.h
$(CC) -std=c99 -g -o putstest putstest.c ../libs/micro-ecc/uECC.c ../libs/pagerlib/pagerlib.c ../libs/pagerlib/things.c -lmbedtls -lmbedx509 -lsodium -lmbedcrypto $(LIBS) $(CFLAGS)
rx-test: rx-test.c ../libs/pagerlib/pagerlib.c ../libs/pagerlib/things.c
$(CC) -std=c99 -g -o rx-test rx-test.c ../libs/pagerlib/pagerlib.c ../libs/pagerlib/things.c -lmbedtls -lmbedx509 -lmbedcrypto -lsodium $(LIBS) $(CFLAGS)
$(CC) -std=c99 -g -o rx-test rx-test.c ../libs/pagerlib/pagerlib.c ../libs/pagerlib/things.c -lsodium $(LIBS) $(CFLAGS)
tx-test: tx-test.c ../libs/pagerlib/pagerlib.c ../libs/pagerlib/things.c
$(CC) -std=c99 -g -o tx-test tx-test.c ../libs/pagerlib/pagerlib.c ../libs/pagerlib/things.c -lmbedtls -lmbedx509 -lmbedcrypto -lsodium $(LIBS) $(CFLAGS)
$(CC) -std=c99 -g -o tx-test tx-test.c ../libs/pagerlib/pagerlib.c ../libs/pagerlib/things.c -lsodium $(LIBS) $(CFLAGS)
keygen: keygen.c ../libs/pagerlib/pagerlib.c ../libs/pagerlib/things.c
$(CC) -std=c99 -g -o keygen keygen.c ../libs/pagerlib/pagerlib.c ../libs/pagerlib/things.c -lmbedtls -lmbedx509 -lmbedcrypto -lsodium $(LIBS) $(CFLAGS)
$(CC) -std=c99 -g -o keygen keygen.c ../libs/pagerlib/pagerlib.c ../libs/pagerlib/things.c -lsodium $(LIBS) $(CFLAGS)
test2: test2.c
$(CC) -std=c99 -o test2 test2.c ../libs/micro-ecc/uECC.c -lmbedtls -lmbedx509 -lmbedcrypto $(LIBS) $(CFLAGS)
......
......@@ -273,6 +273,9 @@ int pl_save_public_key(char *pubkey, char *filename)
*/
char * pl_load_public_key(char *filename)
{
#ifdef ARDUINO
return 1;
#else
char *public_key;
public_key = malloc(crypto_box_PUBLICKEYBYTES);
FILE *lf;
......@@ -280,6 +283,7 @@ char * pl_load_public_key(char *filename)
fread(public_key, 1, crypto_box_PUBLICKEYBYTES, lf);
fclose(lf);
return public_key;
#endif
}
int pl_load_key_in_list(struct pl_ctx *ctx, struct pl_keypair *key)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment