Makefile: fix nonetwork location and `make -t`

This commit is contained in:
Tony Theodore 2015-11-30 18:39:57 +11:00
parent ac63ff22c8
commit 8861c392ef
1 changed files with 4 additions and 2 deletions

View File

@ -418,13 +418,15 @@ $(foreach PKG,$(PKGS),$(eval $(call PKG_RULE,$(PKG))))
# disable networking during build-only rules for reproducibility
ifeq ($(findstring darwin,$(BUILD)),)
NONET_LIB := $(PREFIX)/lib/nonetwork.so
NONET_LIB := $(PREFIX)/$(BUILD)/lib/nonetwork.so
PRELOAD := LD_PRELOAD='$(NONET_LIB)'
else
NONET_LIB := $(PREFIX)/lib/nonetwork.dylib
NONET_LIB := $(PREFIX)/$(BUILD)/lib/nonetwork.dylib
PRELOAD := DYLD_FORCE_FLAT_NAMESPACE=1 DYLD_INSERT_LIBRARIES='$(NONET_LIB)'
endif
$(shell [ -d '$(PREFIX)/$(BUILD)/lib' ] || mkdir -p '$(PREFIX)/$(BUILD)/lib')
$(NONET_LIB): $(TOP_DIR)/tools/nonetwork.c
@mkdir -p $(dir $@)
@$(BUILD_CC) -shared -fPIC -o $@ $<