From: Felix Fietkau Date: Sun, 3 Feb 2008 01:33:48 +0000 (+0100) Subject: allow the make command line to override LD properly X-Git-Url: https://git.archive.openwrt.org/?p=project%2Fuci.git;a=commitdiff_plain;h=52531af950b0c5e482e11cb281867f699cbc0479 allow the make command line to override LD properly --- 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: