c-libp2p/routing/Makefile
Radu Iliescu d3858ffc26 Makefile: refactor include files
Now major include files are comming from main Makefile,
module need to add just their specific include path.
To work make the include path absolute.
2018-11-29 07:15:27 -05:00

25 lines
528 B
Makefile

DHT_DIR = dht
CC = gcc
CFLAGS = $(INCLUDE) -I$(DHT_DIR) -O0 -g3
LFLAGS =
DEPS = # $(DHT_DIR)/dht.h
OBJS = kademlia.o dht.o dht_protocol.o
%.o: %.c $(DEPS)
$(CC) -c -o $@ $< $(CFLAGS)
all: $(OBJS)
$(DHT_DIR)/dht.h:
git clone https://github.com/jech/dht.git $(DHT_DIR)
#dht.c: $(DEPS)
# ln -s $(DHT_DIR)/dht.c .
kademlia_test: $(OBJS)
$(CC) -o kademlia_test kademlia_test.c kademlia.o dht.o $(CFLAGS) -pthread ../libp2p.a ../../c-multiaddr/libmultiaddr.a -lm
clean:
rm -f kademlia_test $(OBJS)
#dht.c
#rm -rf $(DHT_DIR)