backbone server is ready
[webserver.git] / makefile
index b8a856e852aa552bd9a14e7e0735d2ada64269f5..00c9836cb428667d29f6674d1d53af9ab3fe64bd 100644 (file)
--- a/makefile
+++ b/makefile
@@ -13,6 +13,9 @@ CFLAGS += -W -Wall -Wextra -g
 CFLAGS += -std=c99 -D_XOPEN_SOURCE=500
 CFLAGS += $(OFLAGS) $(INCLUDES) $(GCOV)
 LDFLAGS += -g $(GCOV)
+ifeq ($(OS),Windows_NT)
+LDLIBS += -lws2_32
+endif
 
 # Targets
 
@@ -132,7 +135,7 @@ valgrind_%: %.exe
 
 %.exe: %.o %.d
        $(call TITLE, "Building $@")
-       $(CC) $(LDFLAGS) $< $(shell perl -- getcomments.pl -p='linker:\s' -f='%' ${<:.o=.c}) -o $@
+       $(CC) $(LDFLAGS) $< $(shell perl -- getcomments.pl -p='linker:\s' -f='%' ${<:.o=.c}) $(LDLIBS) -o $@
        $(call PASS, SUCCESS)
 
 ## Phony