OPTIONS = -DSTRICT $(_USE_W32API_HEADER_IF_SUPPORTED)
# Add "-mthreads" if you want to have threads under mingw32
-COMMON_THREADFLAGS =
+# Add "-mno-cygwin" if you want to link with msvcrt.dll in Cywin and Wine
+# Otherwise, you link against the native runtime (cygwin.dll
+# or libc). Having the flag in mingw32 does not hurt as you
+# always link against msvcrt.dll By default it should be on,
+# to minimize dependencies on Cygwin, and have more correct
+# filename behaviour in Wine.
+COMMON_FLAGS = -mno-cygwin # -mthreads
# Debugging information
ifeq ($(FINAL),0)
else
APPVER=4.0 # 3.50
# This means 'enable Windows 95 features' (in wxWindows and in the compiler).
-WINVERSION=-DWINVER=0x0400 -D__WIN95__ -D__GNUWIN32__
+WINVERSION=-DWINVER=0x0400 -D__GNUWIN32__
endif
# This is never used and should be expunged.
# build wxbase/wxMSW
ifeq ($(wxUSE_GUI),1)
TOOLKIT=msw
- GUI = -D__WXMSW__ -D__WINDOWS__
+ GUI =
else
TOOLKIT=base
- GUI = -D__WXMSW__ -D__WINDOWS__ -DwxUSE_GUI=0
+ GUI = -DwxUSE_GUI=0
endif
ifeq ($(FINAL),1)
BASELIBS=-lstdc++ -lgcc -lodbc32 -lwsock32
ifeq ($(wxUSE_GUI),1)
WINLIBS= $(BASELIBS) \
- -lwinspool -lwinmm -lshell32 \
- -lcomctl32 -lctl3d32 -lodbc32 -ladvapi32 \
- -lodbc32 -lwsock32 -lopengl32 -lglu32 $(OLELIBS) # -loldnames
+ -lwinspool -lwinmm -lshell32 \
+ -lcomctl32 -lctl3d32 -lodbc32 -ladvapi32 \
+ -lodbc32 -lwsock32 -lopengl32 -lglu32 $(OLELIBS) # -loldnames
else
WINLIBS=$(BASELIBS)
endif
#WINLIBS=-lstdc++ -lgcc \
-# -lwinspool -lwinmm -lshell32 \
+# -lwinspool -lwinmm -lshell32 \
# -lcomctl32 -lctl3d32 -lodbc32 -ladvapi32 -lwsock32 # -loldnames
# Shouldn't need to change these...
# C and C++ compiler flags for compatibility with old gcc versions
REQUIRED_GCC_FLAGS = $(_STRUCT_RETURN_WORKAROUND) $(_THUNK_WORKAROUND)
# C++ compiler flags
-ALL_CXXFLAGS = $(COMMON_THREADFLAGS) $(REQUIRED_GCC_FLAGS) $(UNICODE_OPT) $(OPTIONS) $(GUI) $(DEBUGFLAGS) $(WARN) $(OPT) $(EXTRADLLFLAGS) $(CXXFLAGS)
+ALL_CXXFLAGS = $(COMMON_FLAGS) $(REQUIRED_GCC_FLAGS) $(UNICODE_OPT) $(OPTIONS) $(GUI) $(DEBUGFLAGS) $(WARN) $(OPT) $(EXTRADLLFLAGS) $(CXXFLAGS)
# C compiler flags
-ALL_CFLAGS = $(COMMON_THREADFLAGS) $(REQUIRED_GCC_FLAGS) $(UNICODE_OPT) $(OPTIONS) $(GUI) $(DEBUGFLAGS) $(WARN) $(OPT) $(EXTRADLLFLAGS) $(CFLAGS)
+ALL_CFLAGS = $(COMMON_FLAGS) $(REQUIRED_GCC_FLAGS) $(UNICODE_OPT) $(OPTIONS) $(GUI) $(DEBUGFLAGS) $(WARN) $(OPT) $(EXTRADLLFLAGS) $(CFLAGS)
# Linker flags
-ALL_LDFLAGS = $(COMMON_THREADFLAGS) $(WINDOWSLDFLAGS) $(WINDOWSLDLIBS) $(WXLIBDIRS) $(EXTRALDFLAGS) $(LDFLAGS)
+ALL_LDFLAGS = $(COMMON_FLAGS) $(WINDOWSLDFLAGS) $(WINDOWSLDLIBS) $(WXLIBDIRS) $(EXTRALDFLAGS) $(LDFLAGS)
# under Cygwin, Dlls must not be linked with subsystem=windows
-ALL_LDFLAGS_DLL = $(COMMON_THREADFLAGS) $(WINDOWSLDLIBS) $(WXLIBDIRS) $(EXTRALDFLAGS) $(LDFLAGS)
+ALL_LDFLAGS_DLL = $(COMMON_FLAGS) $(WINDOWSLDLIBS) $(WXLIBDIRS) $(EXTRALDFLAGS) $(LDFLAGS)
.SUFFIXES: .rc .$(RESSUFF) .$(RSCSUFF) .cpp .cxx .cc .c