2016-11-09 16:22:25 +00:00
|
|
|
CC = gcc
|
2018-11-29 12:15:27 +00:00
|
|
|
CFLAGS = $(INCLUDE) -O0 -std=c11
|
2016-11-10 13:08:22 +00:00
|
|
|
|
|
|
|
ifdef DEBUG
|
|
|
|
CFLAGS += -g3
|
|
|
|
endif
|
|
|
|
|
2018-12-03 11:04:51 +00:00
|
|
|
LFLAGS = -L../ -L../c-multihash -L../c-multiaddr
|
2016-11-14 01:55:11 +00:00
|
|
|
DEPS = crypto/test_base58.h crypto/test_rsa.h test_mbedtls.h
|
2018-12-03 11:04:51 +00:00
|
|
|
OBJS = testit.o ../c-protobuf/protobuf.o ../c-protobuf/varint.o ../libp2p.a
|
2016-11-09 16:22:25 +00:00
|
|
|
|
|
|
|
%.o: %.c $(DEPS)
|
|
|
|
$(CC) -c -o $@ $< $(CFLAGS)
|
|
|
|
|
2016-11-10 17:04:48 +00:00
|
|
|
testit_libp2p: $(OBJS) $(DEPS)
|
2017-10-25 17:28:53 +00:00
|
|
|
$(CC) -o $@ $(OBJS) $(LFLAGS) -lp2p -lm -lmultihash -lmultiaddr -lpthread
|
2018-11-29 12:15:27 +00:00
|
|
|
|
2016-11-14 22:58:55 +00:00
|
|
|
all_others:
|
|
|
|
cd ../crypto; make all;
|
|
|
|
cd ../thirdparty; make all;
|
|
|
|
|
|
|
|
all: all_others testit_libp2p
|
2016-11-09 16:22:25 +00:00
|
|
|
|
|
|
|
clean:
|
|
|
|
rm -f *.o
|
2016-11-10 13:08:22 +00:00
|
|
|
rm -f testit_libp2p
|
2016-12-01 18:05:14 +00:00
|
|
|
|
2017-03-21 15:08:01 +00:00
|
|
|
test: clean testit_libp2p
|