@matheusbsbs / matheus-bagliano / commits / f5b904db6b
Fork 0

Makefile: Allow CC_LD_DYNPATH to be overriden

Current Makefile does not allow config.mak to override CC_LD_DYNPATH; it only lets it affect indirectly via NO_R_TO_GCC_LINKER. If the command line, config.mak or config.mak.autogen wants to set CC_LD_DYNPATH differently, we should just allow it. Signed-off-by: Junio C Hamano <gitster@pobox.com>

Junio C Hamano committed Aug 16, 2008 at 21:56 UTC f5b904db6b02e0ded76732eabe106069a87859fd
1 file changed +9 -8
Makefile
+9 -8
@@ -688,8 +688,7 @@ ifeq ($(uname_S),NetBSD)
688 NEEDS_LIBICONV = YesPlease
689 endif
690 BASIC_CFLAGS += -I/usr/pkg/include
691 - BASIC_LDFLAGS += -L/usr/pkg/lib
692 - ALL_LDFLAGS += -Wl,-rpath,/usr/pkg/lib
691 + BASIC_LDFLAGS += -L/usr/pkg/lib $(CC_LD_DYNPATH)/usr/pkg/lib
692 endif
693 ifeq ($(uname_S),AIX)
694 NO_STRCASESTR=YesPlease
@@ -781,12 +780,14 @@ ifeq ($(uname_S),Darwin)
780 endif
781 endif
782
784 -ifdef NO_R_TO_GCC_LINKER
785 - # Some gcc does not accept and pass -R to the linker to specify
786 - # the runtime dynamic library path.
787 - CC_LD_DYNPATH = -Wl,-rpath=
788 -else
789 - CC_LD_DYNPATH = -R
783 +ifndef CC_LD_DYNPATH
784 + ifdef NO_R_TO_GCC_LINKER
785 + # Some gcc does not accept and pass -R to the linker to specify
786 + # the runtime dynamic library path.
787 + CC_LD_DYNPATH = -Wl,-rpath,
788 + else
789 + CC_LD_DYNPATH = -R
790 + endif
791 endif
792
793 ifdef NO_CURL