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 16:03:48 +00:00
|
|
|
OBJS = $(shell (find $(COMPONENTS) -name *.o))
|
2016-11-07 21:34:08 +00:00
|
|
|
|
2018-11-28 15:43:33 +00:00
|
|
|
link: compile
|
2018-11-29 16:03:48 +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 ;)
|