diff options
author | Guillem Jover <guillem@hadrons.org> | 2010-01-30 22:40:01 +0100 |
---|---|---|
committer | Guillem Jover <guillem@hadrons.org> | 2010-01-30 22:40:01 +0100 |
commit | 1f0b0b23cd0a215c575a4becf686e5e005732848 (patch) | |
tree | 54fd9750baceba663479567707c4a1630217c27f | |
parent | 32d79b0310b6602e4846a5972bebde6b169945f3 (diff) |
build: Use CCLD instead of hardcoded gcc for linking
-rw-r--r-- | Makefile | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -101,6 +101,7 @@ LIB_STATIC_OBJS := $(LIB_SRCS:%.c=%.o) | |||
101 | LIB_SHARED_OBJS := $(LIB_SRCS:%.c=%.lo) | 101 | LIB_SHARED_OBJS := $(LIB_SRCS:%.c=%.lo) |
102 | 102 | ||
103 | CC = gcc | 103 | CC = gcc |
104 | CCLD = $(CC) | ||
104 | 105 | ||
105 | # Set default value for compilation | 106 | # Set default value for compilation |
106 | CFLAGS ?= -g -Wall -Wextra -Wno-unused-variable | 107 | CFLAGS ?= -g -Wall -Wextra -Wno-unused-variable |
@@ -151,7 +152,8 @@ $(LIB_SONAME): $(LIB_SHARED) | |||
151 | ln -fs $^ $@ | 152 | ln -fs $^ $@ |
152 | 153 | ||
153 | $(LIB_SHARED): $(LIB_SHARED_OBJS) | 154 | $(LIB_SHARED): $(LIB_SHARED_OBJS) |
154 | gcc -shared \ | 155 | $(CCLD) \ |
156 | -shared \ | ||
155 | -Wl,-soname -Wl,$(LIB_SONAME) \ | 157 | -Wl,-soname -Wl,$(LIB_SONAME) \ |
156 | -Wl,--version-script=Versions \ | 158 | -Wl,--version-script=Versions \ |
157 | -o $@ $^ | 159 | -o $@ $^ |