From 52531af950b0c5e482e11cb281867f699cbc0479 Mon Sep 17 00:00:00 2001 From: Felix Fietkau Date: Sun, 3 Feb 2008 02:33:48 +0100 Subject: [PATCH] allow the make command line to override LD properly --- Makefile | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 0514269..989f890 100644 --- a/Makefile +++ b/Makefile @@ -17,10 +17,11 @@ ifneq ($(DEBUG),) endif OS=$(shell uname) ifeq ($(OS),Darwin) + LINK=$(LD) SHLIB_EXT=dylib SHLIB_FLAGS=-dylib else - LD=$(CC) + LINK=$(CC) SHLIB_EXT=so SHLIB_FLAGS=-shared -Wl,-soname,$(SHLIB_FILE) endif @@ -48,7 +49,7 @@ libuci.a: libuci-static.o $(RANLIB) $@ libuci.$(SHLIB_EXT): libuci-shared.o - $(LD) $(SHLIB_FLAGS) -o $(SHLIB_FILE) $^ $(LIBS) + $(LINK) $(SHLIB_FLAGS) -o $(SHLIB_FILE) $^ $(LIBS) ln -sf $(SHLIB_FILE) $@ clean: -- 2.25.1