]> pilppa.com Git - uci.git/commitdiff
allow the make command line to override LD properly
authorFelix Fietkau <nbd@openwrt.org>
Sun, 3 Feb 2008 01:33:48 +0000 (02:33 +0100)
committerFelix Fietkau <nbd@openwrt.org>
Sun, 3 Feb 2008 01:33:48 +0000 (02:33 +0100)
Makefile

index 051426998e900d28c7c14516b9dae5d3806a5e05..989f89056c577dd416225e5296193cfdbed42c99 100644 (file)
--- 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: