Signed-off-by: William Casarin <jb55@jb55.com>
This commit is contained in:
William Casarin 2022-04-14 08:17:10 -07:00
parent 98b712700b
commit 68ff7a6282
2 changed files with 3 additions and 4 deletions

View File

@ -1,4 +1,5 @@
CFLAGS = -Wall -O2
OBJS = sha256.o nostril.o
HEADERS = hex.h random.h config.h sha256.h
@ -6,10 +7,10 @@ all: nostril
%.o: %.c config.h
@echo "cc $<"
@$(CC) -c $< -o $@
@$(CC) $(CFLAGS) -c $< -o $@
nostril: $(HEADERS) $(OBJS)
$(CC) $(OBJS) -lsecp256k1 -o $@
$(CC) $(CFLAGS) $(OBJS) -lsecp256k1 -o $@
config.h: configurator
./configurator > $@

View File

@ -203,7 +203,6 @@ static int create_key(secp256k1_context *ctx, struct key *key, unsigned char sec
static int decode_key(secp256k1_context *ctx, const char *secstr, struct key *key)
{
unsigned char seckey[32];
int ok;
if (!hex_decode(secstr, strlen(secstr), seckey, 32)) {
fprintf(stderr, "could not hex decode secret key\n");
@ -379,7 +378,6 @@ int main(int argc, const char *argv[])
struct nostr_event ev = {0};
struct key key;
secp256k1_context *ctx;
int ok;
if (argc < 2)
usage();