1 # Automatic configuration of the UCW Library
2 # (c) 2005 Martin Mares <mj@ucw.cz>
4 Set("CC" => "gcc-3.0");
6 # C flags: tell the compiler we're speaking C99
7 Set("CLANG" => "-std=gnu99");
10 Set("COPT" => '-O2 -fstrict-aliasing -march=$(CPU_ARCH)');
12 # C optimizations for highly exposed code
13 Set("COPT2" => '-O3');
16 Set("CWARNS" => '-Wall -W -Wno-parentheses -Wstrict-prototypes -Wmissing-prototypes -Winline');
24 # Extra flags for compiling and linking shared libraries
25 Set("CSHARED" => '-fPIC');
26 Set("LSHARED" => '-shared -Wl,-soname,lib/$(@F)');
28 # Extra switches depending on GCC version:
30 #GCCVER:=$(shell $(CC) --version | sed '2,$$d; s/^\(.* \)\?\([0-9]*\.[0-9]*\).*/\2/')
32 #CWARNS+=-Wundef -Wredundant-decls
33 #COPT+=-finline-limit=20000 --param max-inline-insns-auto=1000
36 #CWARNS+=-Wundef -Wredundant-decls
37 #COPT+=-finline-limit=5000 --param large-function-insns=5000 --param inline-unit-growth=200 --param large-function-growth=400
41 Set("CDEBUG" => '-DDEBUG_ASSERTS -ggdb');
42 #CDEBUG+=-DDEBUG_DIE_BY_ABORT
44 # If debugging memory allocations:
46 #CDEBUG+=-DDEBUG_DMALLOC
49 # If building release versions:
51 #COPT+=-fomit-frame-pointer
54 ### CPU Type and Features ###
56 Set("CPU_ARCH" => 'i686');
58 Set("CPU_LITTLE_ENDIAN");
60 Set("CPU_ALLOW_UNALIGNED");
61 Set("CPU_STRUCT_ALIGN" => 4);
62 Set("CPU_64BIT_POINTERS");