# add "-DHAVE_W32API_H" if you have w32api >= 0.5
OPTIONS = -DSTRICT # -D__MINGW32__
+# Add "-mthreads" if you want to have threads under mingw32
+COMMON_THREADFLAGS =
+
# Debugging information
ifeq ($(FINAL),0)
DEBUGFLAGS = -g -D__WXDEBUG__
# You shouldn't need to change these...
-CPPFLAGS = $(XINCLUDE) $(INC) $(OPTIONS) $(GUI) $(DEBUGFLAGS) $(WARN) $(OPT) $(EXTRACPPFLAGS) $(EXTRADLLFLAGS)
-CFLAGS = $(XINCLUDE) $(INC) $(OPTIONS) $(GUI) $(DEBUGFLAGS) $(WARN) $(OPT) $(EXTRACFLAGS) -DWIN32_LEAN_AND_MEAN
+CPPFLAGS = $(XINCLUDE) $(INC) $(COMMON_THREADFLAGS) $(OPTIONS) $(GUI) $(DEBUGFLAGS) $(WARN) $(OPT) $(EXTRACPPFLAGS) $(EXTRADLLFLAGS)
+CFLAGS = $(XINCLUDE) $(INC) $(COMMON_THREADFLAGS) $(OPTIONS) $(GUI) $(DEBUGFLAGS) $(WARN) $(OPT) $(EXTRACFLAGS) -DWIN32_LEAN_AND_MEAN
ifeq ($(wxUSE_GUI),1)
WINDOWSLDFLAGS=-Wl,--subsystem,windows -mwindows
endif
-LDFLAGS = $(WINDOWSLDFLAGS) -L$(WXDIR)/lib -L$(WXDIR)/contrib/lib $(EXTRALDFLAGS)
+LDFLAGS = $(WINDOWSLDFLAGS) $(COMMON_THREADFLAGS) -L$(WXDIR)/lib -L$(WXDIR)/contrib/lib $(EXTRALDFLAGS)
.SUFFIXES: .rc .$(RESSUFF) .$(RSCSUFF) .cpp .cxx .c