From 08d82638ff092e7c050c7b05ee5069aaa894c590 Mon Sep 17 00:00:00 2001 From: Leonid Evdokimov Date: Tue, 22 Jul 2014 13:41:24 +0400 Subject: reorder cc args for proper linking with libdl That's required on Ubuntu 14.04 with gcc 4.8.2-19ubuntu1. --- Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 4e44277..bc57764 100644 --- a/Makefile +++ b/Makefile @@ -6,7 +6,7 @@ CFLAGS = -O2 -Wall -g all: libnodelay.so libnodelay.so: nodelay.c - $(CC) $(CFLAGS) -fPIC -Wall -W -o $@ -shared -ldl $< + $(CC) $(CFLAGS) -fPIC -Wall -W -o $@ -shared $< -ldl clean: $(RM) $(shell cat .gitignore) install: libnodelay.so @@ -14,6 +14,7 @@ install: libnodelay.so $(INSTALL) -m 644 $< $(DESTDIR)$(libdir) test: libnodelay.so + ! ldd -r $^ | grep -q undefined test -n "$(TEST_PORT)" || { echo TEST_PORT not set; exit 1; } if [ -e test-server.pid ]; then echo test-server.pid exists; exit 1; fi if [ -e test-client.pid ]; then echo test-client.pid exists; exit 1; fi -- cgit v1.2.3-24-ge0c7