sphinx: Fixing makefile for test_sphinx and using lightningd version

This commit is contained in:
Christian Decker 2017-04-13 11:07:05 -07:00 committed by Rusty Russell
parent 09b31624f0
commit e603dba14a
2 changed files with 6 additions and 3 deletions

View File

@ -323,7 +323,7 @@ libwally-core/src/libwallycore.% libwally-core/src/secp256k1/libsecp256k1.%: $(L
lightning.pb-c.c lightning.pb-c.h: lightning.proto
@if $(CHANGED_FROM_GIT); then echo $(PROTOCC) lightning.proto --c_out=.; $(PROTOCC) lightning.proto --c_out=.; else touch $@; fi
$(TEST_PROGRAMS): % : %.o $(BITCOIN_OBJS) $(LIBBASE58_OBJS) $(WIRE_OBJS) $(CCAN_OBJS) utils.o version.o libwallycore.a libsecp256k1.a libsodium.a
$(TEST_PROGRAMS): % : %.o $(BITCOIN_OBJS) $(LIBBASE58_OBJS) $(WIRE_OBJS) $(CCAN_OBJS) lightningd/sphinx.o utils.o version.o libwallycore.a libsecp256k1.a libsodium.a
ccan/config.h: ccan/tools/configurator/configurator
if $< > $@.new; then mv $@.new $@; else rm $@.new; exit 1; fi
@ -393,6 +393,8 @@ update-mocks/%: %
tail -n +$$END $< >> $$BASE.new; mv $$BASE.new $<; \
fi
test/test_sphinx: libsodium.a
unittest/%: %
$(VALGRIND) $(VALGRIND_TEST_ARGS) $*

View File

@ -9,8 +9,9 @@
#include <assert.h>
#include <unistd.h>
#include "daemon/sphinx.h"
#include "daemon/sphinx.c"
#include "lightningd/sphinx.h"
secp256k1_context *secp256k1_ctx;
int main(int argc, char **argv)
{