DEPFLAGS = -MT $@ -MMD -MP -MF $(DEPDIR)/$(notdir $*).Td
POSTCOMPILE = mv -f $(DEPDIR)/$(notdir $*).Td $(DEPDIR)/$(notdir $*).d
-ifeq ($(filter-out CYGWIN_NT,$(UNAME)),CYGWIN_NT)
+ifeq ($(findstring CYGWIN_NT,$(UNAME)),CYGWIN_NT)
CYGWIN_DLIBRARY_NAME := $(subst lib,cyg,$(LIBRARY_NAME))
GOLD_SUPPORT = no
# Cygwin ncurses do not contain tinfo
@echo "[AR StO] $@"
@$(AR) rcs $@ $^
-ifeq ($(filter-out CYGWIN_NT,$(UNAME)),CYGWIN_NT)
+ifeq ($(findstring CYGWIN_NT,$(UNAME)),CYGWIN_NT)
$(LIBRARY_PATH)/$(DLIB_PREFIX)$(LIBRARY_NAME)$(DLIB_SUFFIX).a: $(LIBRARY_PATH)/$(DLIB_PREFIX)$(CYGWIN_DLIBRARY_NAME)$(DLIB_SUFFIX)
$(LIBRARY_PATH)/$(DLIB_PREFIX)$(CYGWIN_DLIBRARY_NAME)$(DLIB_SUFFIX): $(LIBOBJS)
@echo "[LD DLL] $@"
@echo "[LD ] $@"
@$(LD) $(CFLAGS) $(STATICLIBLDFLAGS) $^ $(LDLIBS) -o $@
-ifeq ($(filter-out CYGWIN_NT,$(UNAME)),CYGWIN_NT)
+ifeq ($(findstring CYGWIN_NT,$(UNAME)),CYGWIN_NT)
$(BINARY_NAME).dynamic$(BINARY_SUFFIX): $(OBJS) $(LIBRARY_PATH)/$(DLIB_PREFIX)$(LIBRARY_NAME)$(DLIB_SUFFIX).a
else
$(BINARY_NAME).dynamic$(BINARY_SUFFIX): $(OBJS) $(LIBRARY_PATH)/$(DLIB_PREFIX)$(LIBRARY_NAME)$(DLIB_SUFFIX)
endif
-@rm $(BINARY_NAME).dynamic$(BINARY_SUFFIX)
-@rm $(LIBRARY_PATH)/$(SLIB_PREFIX)$(LIBRARY_NAME)$(SLIB_SUFFIX)
-ifeq ($(filter-out CYGWIN_NT,$(UNAME)),CYGWIN_NT)
+ifeq ($(findstring CYGWIN_NT,$(UNAME)),CYGWIN_NT)
-@rm $(LIBRARY_PATH)/$(DLIB_PREFIX)$(CYGWIN_DLIBRARY_NAME)$(DLIB_SUFFIX)
-@rm $(LIBRARY_PATH)/$(DLIB_PREFIX)$(LIBRARY_NAME)$(DLIB_SUFFIX).a
else