summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDiego Elio Pettenò <flameeyes@gmail.com>2011-03-21 20:13:53 +0100
committerJens Axboe <jaxboe@fusionio.com>2011-03-21 20:13:53 +0100
commite52947d15cf0d7d31c30ccdc43450a10081976da (patch)
tree8079e1a63b264012096b7bcfb0201a25ad11f8cb
parentad0a273593b93f61e72fbdf1910fcf8cdcac738c (diff)
downloadfio-e52947d15cf0d7d31c30ccdc43450a10081976da.tar.gz
fio-e52947d15cf0d7d31c30ccdc43450a10081976da.tar.bz2
Fix linking of fio executable
First of all make sure that $(LDFLAGS) are used during linking so that the user can set the linker's flags. Then also make sure that libraries are listed after the objects, so that GNU ld's --as-needed option will not cause fio linking to fail. Cc: Robin H. Johnson <robbat2@gentoo.org> Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
-rw-r--r--Makefile4
1 files changed, 2 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index 07e011e3..1d815624 100644
--- a/Makefile
+++ b/Makefile
@@ -70,9 +70,9 @@ mandir = $(prefix)/man
.c.o:
$(QUIET_CC)$(CC) -o $@ -c $(CFLAGS) $(CPPFLAGS) $<
-
+
fio: $(OBJS)
- $(QUIET_CC)$(CC) $(CFLAGS) -o $@ $(LIBS) $(OBJS)
+ $(QUIET_CC)$(CC) $(LDFLAGS) $(CFLAGS) -o $@ $(OBJS) $(LIBS)
depend:
$(QUIET_DEP)$(CC) -MM $(CFLAGS) $(CPPFLAGS) $(SOURCE) 1> .depend