Subversion Repositories DevTools

Rev

Rev 235 | Rev 241 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 235 Rev 237
Line 43... Line 43...
43
#   -c      - Produces an object file but not an executable file.
43
#   -c      - Produces an object file but not an executable file.
44
#   -Feo    - Writes diagnostic messages to standard output.
44
#   -Feo    - Writes diagnostic messages to standard output.
45
#   -Fsm    - Includes high-level source code as comments in the assembly output file.
45
#   -Fsm    - Includes high-level source code as comments in the assembly output file.
46
#   -g      - Generates debugging information.
46
#   -g      - Generates debugging information.
47
#   -H      - Saves assembly file.
47
#   -H      - Saves assembly file.
48
#   -Og     - Enables global-flow optimizations.
48
#   -Og     - Enables global-flow optimizations. (-nOg is default)
49
#   -Ol     - Enables local optimizations.
49
#   -Ol     - Enables local optimizations.
50
#   -OR     - Allocates heavily used variables to registers.
50
#   -OR     - Allocates heavily used variables to registers.
51
#   -Ob     - Performs optimizations that assume that global memory objects are not changed through aliases.
51
#   -Ob     - Performs optimizations that assume that global memory objects are not changed through aliases.
52
#             Do not use. More troible than its worth.
52
#             Do not use. More troible than its worth.
53
#   -Oe     - Generates only one exit (return) from a function.
53
#   -Oe     - Generates only one exit (return) from a function.
Line 89... Line 89...
89
cc_error_filter = $(awk) -f $(GBE_ROOT)/warnings.mri
89
cc_error_filter = $(awk) -f $(GBE_ROOT)/warnings.mri
90
endif
90
endif
91
 
91
 
92
mri_includes    += $(MRI_INC)
92
mri_includes    += $(MRI_INC)
93
mri_flags       += -c $(mri_compiler_flags)
93
mri_flags       += -c $(mri_compiler_flags)
94
mri_flags       += -v -Feo
-
 
95
 
94
 
96
ifdef USE_32BIT_RELATIVE
95
ifdef USE_32BIT_RELATIVE
97
mri_flags       += -Ml
96
mri_flags       += -Ml
98
endif
97
endif
99
 
98
 
100
ifdef LEAVETMP
99
ifdef LEAVETMP
101
mri_flags       += -H -Fsm
100
mri_flags       += -H -Fsm
102
endif
101
endif
103
 
102
 
-
 
103
mri_compiler_strict_ansi    ?= -A -nx
-
 
104
mri_compiler_no_strict_ansi ?= -A -x
-
 
105
 
104
ifdef USE_STRICT_ANSI
106
ifdef USE_STRICT_ANSI
105
mri_flags       += -A -nx
107
mri_flags       += $(mri_compiler_strict_ansi)
106
else
108
else
107
mri_flags       += -A -x
109
mri_flags       += $(mri_compiler_no_strict_ansi)
108
endif
110
endif
109
 
111
 
110
mri_compiler_opt ?= -Ol -OR -Or -Os -Oe -nOb
112
mri_compiler_opt    ?= -Ol -OR -Or -Os -Oe -nOb
-
 
113
mri_compiler_no_opt ?= -nOl -nOR -nOg
-
 
114
 
-
 
115
mri_compiler_nogopt ?= -nOg
-
 
116
mri_compiler_gopt   ?= -Og
-
 
117
 
111
ifdef USE_OPTIMISE
118
ifdef USE_OPTIMISE
112
ifdef NO_OPT_GLOBAL
119
ifdef NO_OPT_GLOBAL
113
mri_flags       += -nOg
120
mri_flags       += $(mri_compiler_no_gopt)
114
else
121
else
115
mri_flags       += -Og
122
mri_flags       += $(mri_compiler_gopt)
116
endif
123
endif
117
mri_flags       += $(mri_compiler_opt)
124
mri_flags       += $(mri_compiler_opt)
118
else
125
else
119
mri_flags       += -nOl -nOR -nOg
126
mri_flags       += $(mri_compiler_no_opt)
120
endif
127
endif
121
 
128
 
-
 
129
mri_compiler_flags_debug    ?= -g -DDEBUG -Kf
-
 
130
mri_compiler_flags_no_debug ?= -DNDEBUG -U_DEBUG -UDEBUG    # Compiler bug. _DEBUG is defined by default
-
 
131
 
122
ifdef USE_DEBUGINFO
132
ifdef USE_DEBUGINFO
123
mri_flags       += -g -DDEBUG -Kf
133
mri_flags       += $(mri_compiler_flags_debug)
124
else
134
else
125
mri_flags       += -DNDEBUG -U_DEBUG -UDEBUG    # Compiler bug. _DEBUG is defined by default
135
mri_flags       += $(mri_compiler_flags_no_debug)
126
endif
136
endif
127
 
137
 
128
ifdef ALVL
138
ifdef ALVL
129
mri_flags       += -DALVL=$(ALVL)
139
mri_flags       += -DALVL=$(ALVL)
130
endif
140
endif