diff --git a/examples/.gitignore b/examples/.gitignore new file mode 100644 index 00000000..b883f1fd --- /dev/null +++ b/examples/.gitignore @@ -0,0 +1 @@ +*.exe diff --git a/examples/Makefile b/examples/Makefile index 2964d37e..43483c3f 100644 --- a/examples/Makefile +++ b/examples/Makefile @@ -3,13 +3,18 @@ SUBDIRS = $(sort $(filter-out csharp/, $(dir $(wildcard */)))) X = $(SUBDIRS) +ifdef WINDIR + # appending the Winsock2 library at the end of the compiler + # invocation + CFLAGS_EXTRA += -lws2_32 +endif .PHONY: $(SUBDIRS) all: $(SUBDIRS) $(SUBDIRS): - @$(MAKE) -C $@ + @$(MAKE) CFLAGS_EXTRA="$(CFLAGS_EXTRA)" -C $@ clean: - for d in $(SUBDIRS) ; do $(MAKE) -C $$d clean ; done \ No newline at end of file + for d in $(SUBDIRS) ; do $(MAKE) -C $$d clean ; done