Commit f7110e6ca3f7a6a03a0c4d5d1b6c911ac7c419e0

Russell Belfer 2013-03-25T10:11:32

Merge pull request #1427 from Lionelon/development 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)