# Automatic configuration of the UCW Library # (c) 2005 Martin Mares Set("CC" => "gcc-3.0"); # C flags: tell the compiler we're speaking C99 Set("CLANG" => "-std=gnu99"); # C optimizations Set("COPT" => '-O2 -fstrict-aliasing -march=$(CPU_ARCH)'); # C optimizations for highly exposed code Set("COPT2" => '-O3'); # Warnings Set("CWARNS" => '-Wall -W -Wno-parentheses -Wstrict-prototypes -Wmissing-prototypes -Winline'); # Linker flags Set("LOPT" => ""); # Extra libraries Set("LIBS" => ""); # Extra flags for compiling and linking shared libraries Set("CSHARED" => '-fPIC'); Set("LSHARED" => '-shared -Wl,-soname,lib/$(@F)'); # Extra switches depending on GCC version: # [FIXME] #GCCVER:=$(shell $(CC) --version | sed '2,$$d; s/^\(.* \)\?\([0-9]*\.[0-9]*\).*/\2/') #ifeq ($(GCCVER),3.3) #CWARNS+=-Wundef -Wredundant-decls #COPT+=-finline-limit=20000 --param max-inline-insns-auto=1000 #endif #ifeq ($(GCCVER),3.4) #CWARNS+=-Wundef -Wredundant-decls #COPT+=-finline-limit=5000 --param large-function-insns=5000 --param inline-unit-growth=200 --param large-function-growth=400 #endif # If debugging: Set("CDEBUG" => '-DDEBUG_ASSERTS -ggdb'); #CDEBUG+=-DDEBUG_DIE_BY_ABORT # If debugging memory allocations: #LIBS+=-lefence #CDEBUG+=-DDEBUG_DMALLOC #LIBS+=-ldmalloc # If building release versions: #CDEBUG= #COPT+=-fomit-frame-pointer #LOPT+=-s ### CPU Type and Features ### Set("CPU_ARCH" => 'i686'); Set("CPU_I386"); Set("CPU_LITTLE_ENDIAN"); #CPU_BIG_ENDIAN=1 Set("CPU_ALLOW_UNALIGNED"); Set("CPU_STRUCT_ALIGN" => 4); Set("CPU_64BIT_POINTERS"); ### OS Type ### Set("CONFIG_LINUX"); # Return success 1;