2017-01-27 02:53:40 +00:00
|
|
|
DHT_DIR = dht
|
2017-03-23 20:03:13 +00:00
|
|
|
DEPS = # $(DHT_DIR)/dht.h
|
2017-03-30 18:58:53 +00:00
|
|
|
OBJS = kademlia.o dht.o dht_protocol.o
|
2017-01-27 02:53:40 +00:00
|
|
|
|
|
|
|
%.o: %.c $(DEPS)
|
2018-12-03 12:22:33 +00:00
|
|
|
$(CC) -c -o $@ $< $(CFLAGS) -I$(DHT_DIR)
|
2017-01-27 02:53:40 +00:00
|
|
|
|
|
|
|
all: $(OBJS)
|
|
|
|
|
|
|
|
$(DHT_DIR)/dht.h:
|
|
|
|
git clone https://github.com/jech/dht.git $(DHT_DIR)
|
|
|
|
|
2017-03-23 20:03:13 +00:00
|
|
|
#dht.c: $(DEPS)
|
|
|
|
# ln -s $(DHT_DIR)/dht.c .
|
2017-01-27 02:53:40 +00:00
|
|
|
|
2017-03-16 12:54:36 +00:00
|
|
|
kademlia_test: $(OBJS)
|
|
|
|
$(CC) -o kademlia_test kademlia_test.c kademlia.o dht.o $(CFLAGS) -pthread ../libp2p.a ../../c-multiaddr/libmultiaddr.a -lm
|
|
|
|
|
2017-01-27 02:53:40 +00:00
|
|
|
clean:
|
2017-03-23 20:03:13 +00:00
|
|
|
rm -f kademlia_test $(OBJS)
|
2018-11-29 12:15:27 +00:00
|
|
|
#dht.c
|
|
|
|
#rm -rf $(DHT_DIR)
|