Makefile: use COMPONENTS list to generate the linker objects
This commit is contained in:
parent
bd6400c370
commit
8267745863
1 changed files with 2 additions and 19 deletions
21
Makefile
21
Makefile
|
@ -6,27 +6,10 @@ export DEBUG
|
|||
ROOT= $(shell pwd)
|
||||
export INCLUDE = -I$(ROOT)/include -I$(ROOT)/c-protobuf -I$(ROOT)/c-multihash/include -I$(ROOT)/c-multiaddr/include
|
||||
|
||||
|
||||
OBJS = \
|
||||
conn/*.o \
|
||||
crypto/*.o \
|
||||
crypto/encoding/*.o \
|
||||
db/*.o \
|
||||
thirdparty/mbedtls/*.o \
|
||||
hashmap/hashmap.o \
|
||||
identify/*.o \
|
||||
net/*.o \
|
||||
os/*.o \
|
||||
peer/*.o \
|
||||
record/*.o \
|
||||
routing/*.o \
|
||||
secio/*.o \
|
||||
utils/*.o \
|
||||
swarm/*.o \
|
||||
yamux/*.o
|
||||
OBJS = $(shell (find $(COMPONENTS) -name *.o))
|
||||
|
||||
link: compile
|
||||
ar rcs libp2p.a $(OBJS) $(LINKER_FLAGS)
|
||||
$(AR) rcs libp2p.a $(OBJS) $(LINKER_FLAGS)
|
||||
|
||||
compile:
|
||||
$(foreach dir,$(COMPONENTS), $(MAKE) -C $(dir) all ;)
|
||||
|
|
Loading…
Reference in a new issue