Don't relink zerotier-one every time.

Because zerotier-one depends on "one", which is a phony target,
making it relinks zerotier-one every time, which is probably
not the desired behavior.

In any case, zerotier-one, zerotier-cli, and zerotier-idtool are
real target, so they should have real dependencies and actions.
The "one" target now depends on these three files.

Behavior is mostly unchanged otherwise.
This commit is contained in:
Ellen Wang 2019-07-21 21:37:01 -07:00
parent ac0082a67e
commit eb2f851e65

@ -257,20 +257,22 @@ ifeq ($(ZT_USE_ARM32_NEON_ASM_CRYPTO),1)
override CORE_OBJS+=ext/arm32-neon-salsa2012-asm/salsa2012.o
endif
.PHONY: all
all: one
one: $(CORE_OBJS) $(ONE_OBJS) one.o
.PHONY: one
one: zerotier-one zerotier-idtool zerotier-cli
zerotier-one: $(CORE_OBJS) $(ONE_OBJS) one.o
$(CXX) $(CXXFLAGS) $(LDFLAGS) -o zerotier-one $(CORE_OBJS) $(ONE_OBJS) one.o $(LDLIBS)
$(STRIP) zerotier-one
zerotier-idtool: zerotier-one
ln -sf zerotier-one zerotier-idtool
zerotier-cli: zerotier-one
ln -sf zerotier-one zerotier-cli
zerotier-one: one
zerotier-idtool: one
zerotier-cli: one
libzerotiercore.a: FORCE
make CFLAGS="-O3 -fstack-protector -fPIC" CXXFLAGS="-O3 -std=c++11 -fstack-protector -fPIC" $(CORE_OBJS)
ar rcs libzerotiercore.a $(CORE_OBJS)