+# Note: WIN32_LEAN_AND_MEAN is defined only for C and not for C++ compiles.
+# Defining this macro means that a great deal of less commonly used stuff
+# is ignored in the windows headers, resulting in faster compiles. It can't
+# be used with some C++ source files. It just so happens that it can be
+# used with all C source files.
+
+CFLAGS = -DWIN32_LEAN_AND_MEAN
+
+WXLIBDIRS = -L$(WXDIR)/lib -L$(WXDIR)/contrib/lib
+
+# You shouldn't need to change these flags, which are merely composed of
+# the options selected above. You can add more flags by specifying them on
+# the make command line, e.g.
+# make CXXFLAGS='-O3 -march=i686' -f makefile.g95
+# The gnu make manual says
+# 'Users expect to be able to specify CFLAGS freely themselves'
+# That was unsafe with older versions of this makefile, but now it works.
+#
+# C preprocessor flags
+# Some makefiles pass extra flags in $(EXTRACPPFLAGS); although earlier
+# versions of this file used CPPFLAGS as C++ compiler flags (instead of
+# as C preprocessor flags), it is OK to add them to the preprocessor
+# flags, which are always used for C++ compiles. Because other makefiles
+# use this method to override these flags, they are added after $(CPPFLAGS),
+# which would normally come last.
+ALL_CPPFLAGS = $(XINCLUDE) $(INC) $(CPPFLAGS) $(EXTRACPPFLAGS)
+# 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_FLAGS) $(REQUIRED_GCC_FLAGS) $(UNICODE_OPT) $(OPTIONS) $(GUI) $(DEBUGFLAGS) $(WARN) $(OPT) $(EXTRADLLFLAGS) $(CXXFLAGS)
+# C compiler flags
+ALL_CFLAGS = $(COMMON_FLAGS) $(REQUIRED_GCC_FLAGS) $(UNICODE_OPT) $(OPTIONS) $(GUI) $(DEBUGFLAGS) $(WARN) $(OPT) $(EXTRADLLFLAGS) $(CFLAGS)
+# Linker flags
+ALL_LDFLAGS = $(COMMON_FLAGS) $(WINDOWSLDFLAGS) $(WINDOWSLDLIBS) $(WXLIBDIRS) $(EXTRALDFLAGS) $(LDFLAGS)
+# under Cygwin, Dlls must not be linked with subsystem=windows
+ALL_LDFLAGS_DLL = $(COMMON_FLAGS) $(WINDOWSLDLIBS) $(WXLIBDIRS) $(EXTRALDFLAGS) $(LDFLAGS)
+