File: debug.mk

package info (click to toggle)
ufoai 2.5-9
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 82,120 kB
  • sloc: cpp: 225,232; python: 5,111; ansic: 4,133; php: 2,209; perl: 1,931; sh: 1,505; xml: 1,115; makefile: 406; sed: 11
file content (15 lines) | stat: -rw-r--r-- 1,020 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
CFLAGS += -fno-inline

ifeq ($(filter -O0 -O1 -O2 -O3 -O4 -Os -Ofast,$(CFLAGS)),) # If you use multiple -O options, with or without level numbers, the last such option is the one that is effective
  CFLAGS += -O0
endif

ifeq ($(SSE),1) # Not all -O options are working with sse
  ifneq ($(filter -O2 -O3 -O4 -Ofast,$(CFLAGS)),)
    CFLAGS += -O1 -fthread-jumps -falign-functions -falign-jumps -falign-loops -falign-labels -fcaller-saves -fcrossjumping -fcse-skip-blocks -fdelete-null-pointer-checks -fexpensive-optimizations -fgcse-lm -foptimize-sibling-calls -fpeephole2 -fregmove -freorder-blocks -freorder-functions -frerun-cse-after-loop -fsched-interblock -fsched-spec -fschedule-insns2 -fstrict-overflow -ftree-pre -ftree-vrp
  endif
  ifneq ($(filter -O3 -O4 -Ofast,$(CFLAGS)),)
    CFLAGS += -finline-functions -funswitch-loops -fpredictive-commoning -fgcse-after-reload -ftree-vectorize -fno-strict-aliasing
  endif
  CFLAGS := -msse -mfpmath=sse $(filter-out -O2 -O3 -O4 -Ofast -funroll-loops,$(CFLAGS))
endif