diff options
author | 2007-08-04 01:02:18 -0400 | |
---|---|---|
committer | 2007-08-04 13:49:19 -0700 | |
commit | fdd259520bdb9469d3010fff3b35a9c1f1cc4c7f (patch) | |
tree | e9bb51c348dbf113f477ec8e74759833332efd9c /Makefile | |
parent | Add another test case to validation/comma.c (diff) | |
download | sparse-fdd259520bdb9469d3010fff3b35a9c1f1cc4c7f.tar.gz sparse-fdd259520bdb9469d3010fff3b35a9c1f1cc4c7f.tar.bz2 sparse-fdd259520bdb9469d3010fff3b35a9c1f1cc4c7f.zip |
Makefile: improve flag handling
Tweak the makefile so that it respects CFLAGS set in the environment and it
makes sure to link the shared libsparse with $(LDFLAGS).
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 9 |
1 files changed, 5 insertions, 4 deletions
@@ -2,9 +2,10 @@ VERSION=0.3 OS=linux -CC=gcc -CFLAGS=-O2 -finline-functions -g -Wall -Wwrite-strings -LDFLAGS=-g +CC ?= gcc +CFLAGS ?= -O2 -finline-functions -g +CFLAGS += -Wall -Wwrite-strings +LDFLAGS ?= -g AR=ar HAVE_LIBXML=$(shell pkg-config --exists libxml-2.0 && echo 'yes') @@ -129,7 +130,7 @@ $(LIB_FILE): $(LIB_OBJS) $(QUIET_AR)$(AR) rcs $@ $(LIB_OBJS) $(SLIB_FILE): $(LIB_OBJS) - $(QUIET_LINK)$(CC) -shared -o $@ $(LIB_OBJS) + $(QUIET_LINK)$(CC) $(LDFLAGS) -Wl,-soname,$@ -shared -o $@ $(LIB_OBJS) evaluate.o: $(LIB_H) expression.o: $(LIB_H) |