diff --git a/examples/Makefile b/examples/Makefile index 7759464b..93e84632 100644 --- a/examples/Makefile +++ b/examples/Makefile @@ -1,10 +1,12 @@ # Copyright (c) 2014 Cesanta Software # All rights reserved -SUBDIRS = $(sort $(dir $(wildcard */))) +# `wildcard ./*/` works in both linux and linux/wine, while `wildcard */` enumerates nothing under wine +SUBDIRS = $(sort $(dir $(wildcard ./*/))) +SUBDIRS:=$(filter-out ./, $(SUBDIRS)) ifeq ($(OS), Windows_NT) - SUBDIRS:=$(filter-out load_balancer/ netcat/ raspberry_pi_mjpeg_led/, $(SUBDIRS)) + SUBDIRS:=$(filter-out ./load_balancer/ ./netcat/ ./raspberry_pi_mjpeg_led/ ./captive_dns_server/, $(SUBDIRS)) endif .PHONY: $(SUBDIRS) diff --git a/examples/api_server/Makefile b/examples/api_server/Makefile index 4886a593..49910c17 100644 --- a/examples/api_server/Makefile +++ b/examples/api_server/Makefile @@ -5,7 +5,7 @@ CFLAGS = -W -Wall $(CFLAGS_EXTRA) ifeq ($(OS), Windows_NT) CFLAGS += -lws2_32 -D_MG_PROVIDE_STRNLEN - CC = mingw32-gcc + CC = gcc else UNAME_S := $(shell uname -s) ifeq ($(UNAME_S), Linux) diff --git a/examples/examples.mk b/examples/examples.mk index 7edd607d..45e66abb 100644 --- a/examples/examples.mk +++ b/examples/examples.mk @@ -6,7 +6,7 @@ all: $(PROG) ifeq ($(OS), Windows_NT) # TODO(alashkin): enable SSL in Windows CFLAGS += -lws2_32 -D_MG_PROVIDE_STRNLEN -CC = mingw32-gcc +CC = gcc else ifeq ($(SSL_LIB),openssl) CFLAGS += -DMG_ENABLE_SSL -lssl -lcrypto