summaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorTony Theodore <tonyt@logyst.com>2015-11-30 07:39:57 (GMT)
committerTony Theodore <tonyt@logyst.com>2015-11-30 07:39:57 (GMT)
commit8861c392ef94124d602d55b046af331d9b5d5d5f (patch)
tree686bf60f2b854813f3e2848fecd09a902aee3ff8 /Makefile
parentac63ff22c8277417caee2c246644626cdf0bbb9c (diff)
downloadmxe-8861c392ef94124d602d55b046af331d9b5d5d5f.zip
mxe-8861c392ef94124d602d55b046af331d9b5d5d5f.tar.gz
mxe-8861c392ef94124d602d55b046af331d9b5d5d5f.tar.bz2
Makefile: fix nonetwork location and `make -t`
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile6
1 files changed, 4 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index 03b42b8..ef2ca96 100644
--- a/Makefile
+++ b/Makefile
@@ -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 $@ $<