CFLAGS += -std=c99 -D_XOPEN_SOURCE=500
CFLAGS += $(OFLAGS) $(INCLUDES) $(GCOV)
LDFLAGS += -g $(GCOV)
+ifeq ($(OS),Windows_NT)
+LDLIBS += -lws2_32
+endif
# Targets
%.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