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)