diff --git a/Makefile b/Makefile index bdb9b09b2..8bc75dabd 100644 --- a/Makefile +++ b/Makefile @@ -48,7 +48,7 @@ OBJS = $(SRCS:.c=.o) TESTLIBS = -lcheck -lrt -lpthread -lm TESTSSLLIBS = -lcrypto -all: tests test-openssl libtrezor-crypto.so test_speed +all: tests test-openssl libtrezor-crypto.so test_speed tools %.o: %.c %.h options.h $(CC) $(CFLAGS) -o $@ -c $< @@ -65,5 +65,17 @@ test-openssl: test-openssl.o $(OBJS) libtrezor-crypto.so: $(SRCS) $(CC) $(CFLAGS) -fPIC -shared $(SRCS) -o libtrezor-crypto.so +tools: tools/xpubaddrgen tools/mktable tools/bip39bruteforce + +tools/xpubaddrgen: tools/xpubaddrgen.o $(OBJS) + $(CC) tools/xpubaddrgen.o $(OBJS) -o tools/xpubaddrgen + +tools/mktable: tools/mktable.o $(OBJS) + $(CC) tools/mktable.o $(OBJS) -o tools/mktable + +tools/bip39bruteforce: tools/bip39bruteforce.o $(OBJS) + $(CC) tools/bip39bruteforce.o $(OBJS) -o tools/bip39bruteforce + clean: rm -f *.o ed25519-donna/*.o tests test_speed test-openssl libtrezor-crypto.so + rm -f tools/*.o tools/xpubaddrgen tools/mktable tools/bip39bruteforce diff --git a/tools/Makefile b/tools/Makefile deleted file mode 100644 index 481a46bcb..000000000 --- a/tools/Makefile +++ /dev/null @@ -1,43 +0,0 @@ -CC = gcc - -OPTFLAGS = -O3 - -CFLAGS += $(OPTFLAGS) \ - -W \ - -Wall \ - -Wextra \ - -Wimplicit-function-declaration \ - -Wredundant-decls \ - -Wstrict-prototypes \ - -Wundef \ - -Wshadow \ - -Wpointer-arith \ - -Wformat \ - -Wreturn-type \ - -Wsign-compare \ - -Wmultichar \ - -Wformat-nonliteral \ - -Winit-self \ - -Wuninitialized \ - -Wformat-security \ - -Werror \ - -I.. - -all: xpubaddrgen mktable bip39bruteforce - -OBJS = ../bip32.o ../bip39.o ../ecdsa.o ../sha2.o ../bignum.o ../base58.o ../secp256k1.o ../nist256p1.o ../ripemd160.o ../hmac.o ../rand.o ../pbkdf2.o ../curves.o ../ed25519-donna/ed25519.o - -%.o: %.c %.h options.h - $(CC) $(CFLAGS) -o $@ -c $< - -xpubaddrgen: xpubaddrgen.o $(OBJS) - $(CC) xpubaddrgen.o $(OBJS) -o xpubaddrgen - -mktable: mktable.o $(OBJS) - $(CC) mktable.o $(OBJS) -o mktable - -bip39bruteforce: bip39bruteforce.o $(OBJS) - $(CC) bip39bruteforce.o $(OBJS) -o bip39bruteforce - -clean: - rm -f *.o xpubaddrgen mktable bip39bruteforce