Commit e2886f1e7e93426f76c286605d0048b27f12f137

lionel vitte 2013-03-20T21:13:43

Fix link issue in network examples

diff --git a/examples/network/Makefile b/examples/network/Makefile
index 60969bd..810eb70 100644
--- a/examples/network/Makefile
+++ b/examples/network/Makefile
@@ -3,7 +3,8 @@ default: all
 CC = gcc
 CFLAGS += -g
 CFLAGS += -I../../include
-LDFLAGS += -L../../build -L../.. -lgit2 -lpthread
+LDFLAGS += -L../../build -L../..
+LIBRARIES += -lgit2 -lpthread
 
 OBJECTS = \
   git2.o \
@@ -13,7 +14,7 @@ OBJECTS = \
   index-pack.o
 
 all: $(OBJECTS)
-	$(CC) $(CFLAGS) $(LDFLAGS) -o git2 $(OBJECTS)
+	$(CC) $(CFLAGS) $(LDFLAGS) -o git2 $(OBJECTS) $(LIBRARIES)
 
 clean:
 	$(RM) $(OBJECTS)