diff options
author | Mike Hommey <mh@glandium.org> | 2012-04-16 14:30:25 (GMT) |
---|---|---|
committer | Jason Evans <je@fb.com> | 2012-04-17 05:52:50 (GMT) |
commit | fa08da752bf91c146f77fff59b4ed09b42633260 (patch) | |
tree | 5ac9a76513c7cc00dd06410cba54e4edb5fa26b0 /Makefile.in | |
parent | 5bee66d3edec3bfd83bfb7c0e978e8d0c9e4888a (diff) | |
download | jemalloc-fa08da752bf91c146f77fff59b4ed09b42633260.zip jemalloc-fa08da752bf91c146f77fff59b4ed09b42633260.tar.gz jemalloc-fa08da752bf91c146f77fff59b4ed09b42633260.tar.bz2 |
Limit the number of flags directly given to the linker, and refactor rpath
This will make things easier for MSVC support.
Diffstat (limited to 'Makefile.in')
-rw-r--r-- | Makefile.in | 17 |
1 files changed, 5 insertions, 12 deletions
diff --git a/Makefile.in b/Makefile.in index 146f57f..ef8f717 100644 --- a/Makefile.in +++ b/Makefile.in @@ -33,23 +33,20 @@ O := @o@ A := @a@ EXE := @exe@ LIB := @lib@ -ifeq (macho, @abi@) -WL_SONAME := dylib_install_name -else -WL_SONAME := soname -endif REV := @rev@ install_suffix := @install_suffix@ ABI := @abi@ XSLTPROC := @XSLTPROC@ AUTOCONF := @AUTOCONF@ -RPATH := @RPATH@ +_RPATH = @RPATH@ +RPATH = $(if $(1),$(call _RPATH,$(1))) cfghdrs_in := @cfghdrs_in@ cfghdrs_out := @cfghdrs_out@ cfgoutputs_in := @cfgoutputs_in@ cfgoutputs_out := @cfgoutputs_out@ enable_autogen := @enable_autogen@ enable_experimental := @enable_experimental@ +DSO_LDFLAGS = @DSO_LDFLAGS@ ifeq (macho, $(ABI)) TEST_LIBRARY_PATH := DYLD_FALLBACK_LIBRARY_PATH=$(objroot)lib @@ -136,7 +133,7 @@ $(objroot)src/%.pic.$(O): $(srcroot)src/%.c $(objroot)lib/$(LIBJEMALLOC).$(SO).$(REV) : $(CSRCS:$(srcroot)%.c=$(objroot)%.pic.$(O)) @mkdir -p $(@D) - $(CC) -shared -Wl,-$(WL_SONAME),$(@F) $(RPATH_EXTRA:%=$(RPATH)%) -o $@ $+ $(LDFLAGS) $(LIBS) + $(CC) $(DSO_LDFLAGS) $(call RPATH,$(RPATH_EXTRA)) -o $@ $+ $(LDFLAGS) $(LIBS) $(objroot)lib/$(LIBJEMALLOC)_pic.$(A) : $(CSRCS:$(srcroot)%.c=$(objroot)%.pic.$(O)) @mkdir -p $(@D) @@ -154,11 +151,7 @@ $(objroot)test/%.$(O): $(srcroot)test/%.c $(objroot)test/%$(EXE): $(objroot)test/%.$(O) \ $(objroot)lib/$(LIBJEMALLOC).$(SO) @mkdir -p $(@D) -ifneq ($(RPATH), ) - $(CC) -o $@ $< $(RPATH)$(objroot)lib -L$(objroot)lib -ljemalloc$(install_suffix) $(LIBS) -else - $(CC) -o $@ $< -L$(objroot)lib -ljemalloc$(install_suffix) $(LIBS) -endif + $(CC) -o $@ $< $(call RPATH,$(objroot)lib) -L$(objroot)lib -ljemalloc$(install_suffix) $(LIBS) build_lib_shared: $(DSOS) build_lib_static: $(STATIC_LIBS) |