# OS specific compilation options:
ifeq ($(OS),Windows_NT)
	CFLAGS +=
	LIBS += -lws2_32
else
	UNAME_S := $(shell uname -s)
	ifeq ($(UNAME_S),Linux)
		CFLAGS +=
		LIBS +=
	else
		CFLAGS +=
		LIBS +=
	endif
endif

.PHONY: rebuild
rebuild: clean
	find . -mindepth 1 -type d \
	| while read d; do \
		if [ -f $$d/Makefile ]; then \
			echo "$$d"; \
			(cd $$d; check-included && make-makefile); \
		fi \
	done
	make
