diff --git a/examples/Makefile b/examples/Makefile
index b01a969d414a0276e869bbd549ec667026e20607..f1dac204967fcb494bcffc1888a9cbdb4da1cbaf 100644
--- a/examples/Makefile
+++ b/examples/Makefile
@@ -4,5 +4,5 @@ CFLAGS=	-W -Wall -I.. -pthread -g
 all:
 	OS=`uname`; \
 	  test "$$OS" = Linux && LIBS="-ldl" ; \
-	  $(CC) $(CFLAGS) chat.c ../mongoose.c  $(LIBS) $(ADD) -o $(PROG) 
+	  $(CC) $(CFLAGS) chat.c ../mongoose.c  $$LIBS $(ADD) -o $(PROG) 
 	./$(PROG)