2018-11-29 15:17:20 +00:00
|
|
|
COMPONENTS = conn crypto db thirdparty hashmap identify net os peer record routing secio swarm utils yamux
|
2016-11-10 13:08:22 +00:00
|
|
|
|
|
|
|
DEBUG = true
|
|
|
|
export DEBUG
|
|
|
|
|
2018-11-29 12:15:27 +00:00
|
|
|
ROOT= $(shell pwd)
|
2018-11-29 13:12:39 +00:00
|
|
|
export INCLUDE = -I$(ROOT)/include -I$(ROOT)/c-protobuf -I$(ROOT)/c-multihash/include -I$(ROOT)/c-multiaddr/include
|
2017-10-25 17:28:53 +00:00
|
|
|
|
2018-11-29 15:17:20 +00:00
|
|
|
|
2017-02-13 18:26:41 +00:00
|
|
|
OBJS = \
|
|
|
|
conn/*.o \
|
|
|
|
crypto/*.o \
|
|
|
|
crypto/encoding/*.o \
|
2017-04-20 22:55:18 +00:00
|
|
|
db/*.o \
|
2017-02-02 19:10:12 +00:00
|
|
|
thirdparty/mbedtls/*.o \
|
|
|
|
hashmap/hashmap.o \
|
2017-11-03 06:26:43 +00:00
|
|
|
identify/*.o \
|
2017-02-02 19:10:12 +00:00
|
|
|
net/*.o \
|
2017-04-06 14:32:54 +00:00
|
|
|
os/*.o \
|
2017-02-20 23:53:20 +00:00
|
|
|
peer/*.o \
|
2017-02-02 19:10:12 +00:00
|
|
|
record/*.o \
|
|
|
|
routing/*.o \
|
2017-02-06 22:11:22 +00:00
|
|
|
secio/*.o \
|
2017-10-11 16:23:25 +00:00
|
|
|
utils/*.o \
|
2017-11-29 03:44:18 +00:00
|
|
|
swarm/*.o \
|
2017-10-11 16:23:25 +00:00
|
|
|
yamux/*.o
|
2016-11-07 21:34:08 +00:00
|
|
|
|
2018-11-28 15:43:33 +00:00
|
|
|
link: compile
|
2017-10-25 17:28:53 +00:00
|
|
|
ar rcs libp2p.a $(OBJS) $(LINKER_FLAGS)
|
2016-11-07 21:34:08 +00:00
|
|
|
|
2017-02-13 18:26:41 +00:00
|
|
|
compile:
|
2018-11-29 15:17:20 +00:00
|
|
|
$(foreach dir,$(COMPONENTS), $(MAKE) -C $(dir) all ;)
|
2018-11-28 15:43:33 +00:00
|
|
|
|
2017-02-02 19:10:12 +00:00
|
|
|
test: compile link
|
2016-11-09 16:22:25 +00:00
|
|
|
cd test; make all;
|
2018-11-28 15:43:33 +00:00
|
|
|
|
2017-01-23 17:07:48 +00:00
|
|
|
rebuild: clean all
|
2018-11-28 15:43:33 +00:00
|
|
|
|
2016-11-09 16:22:25 +00:00
|
|
|
all: test
|
2018-11-28 15:43:33 +00:00
|
|
|
|
2016-11-07 21:34:08 +00:00
|
|
|
clean:
|
2018-11-29 15:17:20 +00:00
|
|
|
$(foreach dir,$(COMPONENTS), $(MAKE) -C $(dir) clean ;)
|