makefile.mingw-cygwin/CFLAGS [ Variables ]
FUNCTION
Defined the flags used for the C compiler:
- -W, -Wall and -std=gnu99 -- This turns on all warnings based on the C99 standard. Making the source warning free for an earlier standard is not necessary as this code is compiled on Unix, Windows, and Mac systems that all have C99 compliant C compilers. It also allows some gnu extensions. Using -std=c99 gives some spurious warnings about popen()
- -O3 -- optimize, turning optimization on finds more errors and warnings.
- -mno-cygwin -- Tells gcc not to link with cygwin1.dll but use the windows standard C library. (make mingw windows native executable under cygwin)
- -s -- Strip debug info out from objects, making the executable smaller
- -g -- Include all debugger info for GDB
SOURCE
# Use CYGWIN = 1 to compile under native cygwin mode ifdef CYGWIN CYGFLAGS = -DHAVE_FORK -DHAVE_SYMLINK else CYGFLAGS = -mno-cygwin endif # Use DEBUG = 1 to include debugging symbols and to turn off optimisations ifdef DEBUG DFLAGS = -g else DFLAGS = -s -O3 endif # Effective compiler flags CFLAGS = -W -Wall -std=gnu99 -DHAVE_SNPRINTF $(DFLAGS) $(CYGFLAGS)