dlgTextEntry_Keyboard: rename to TouchTextEntry
[xcsoar.git] / build / debug.mk
blob6ffc2a6bd121e4584f9a56b6d52463dea115e4b7
1 DEBUG ?= y
3 ifeq ($(DEBUG),y)
4 OPTIMIZE := -O0
5 OPTIMIZE += -funit-at-a-time
6 else
7 OPTIMIZE := -Os -DNDEBUG -Wuninitialized
8 endif
10 ifeq ($(CLANG),y)
11 OPTIMIZE += -g
12 else
13 ifeq ($(HAVE_WIN32),y)
14 # WINE works best with stabs debug symbols
15 OPTIMIZE += -gstabs
16 else
17 OPTIMIZE += -g
18 endif
19 endif
21 # Enable fast floating point math. XCSoar does not rely on strict
22 # IEEE/ISO semantics, for example it is not interested in "errno" or
23 # the difference between -0 and +0. This allows using non-conforming
24 # vector units on some platforms, e.g. ARM NEON.
25 OPTIMIZE += -ffast-math
27 ifeq ($(CLANG)$(DEBUG),nn)
28 # Enable gcc auto-vectorisation on some architectures (e.g. ARM NEON).
29 # This requires -ffast-math, because some vector units don't conform
30 # stricly with IEEE/ISO (see above).
31 OPTIMIZE += -ftree-vectorize
33 OPTIMIZE += -funsafe-loop-optimizations
34 endif
36 ifeq ($(LTO),y)
37 OPTIMIZE += -flto -fwhole-program
39 # workaround for gcc 4.5.0 bug, see
40 # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43898
41 OPTIMIZE := $(filter-out -ggdb -gstabs,$(OPTIMIZE))
42 endif
44 ifeq ($(LLVM),y)
45 # generate LLVM bitcode
46 OPTIMIZE += -emit-llvm
47 endif
49 ifeq ($(PROFILE),y)
50 FLAGS_PROFILE := -pg
51 else
52 FLAGS_PROFILE :=
53 endif