diff options
| author | Mike Frysinger <vapier.adi@gmail.com> | 2007-08-04 01:02:18 -0400 |
|---|---|---|
| committer | Josh Triplett <josh@freedesktop.org> | 2007-08-04 13:49:19 -0700 |
| commit | fdd259520bdb9469d3010fff3b35a9c1f1cc4c7f (patch) | |
| tree | e9bb51c348dbf113f477ec8e74759833332efd9c /Makefile | |
| parent | 8ec193a995c2cc4b16a2051ebe96f495d8a87e05 (diff) | |
| download | sparse-dev-fdd259520bdb9469d3010fff3b35a9c1f1cc4c7f.tar.gz | |
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) |
