about summary refs log tree commit homepage
diff options
context:
space:
mode:
-rw-r--r--Makefile3
1 files changed, 2 insertions, 1 deletions
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