Subversion Repositories DevTools

Rev

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

Rev 7299 Rev 7300
Line 1... Line 1...
1
###############################################################################
1
###############################################################################
2
# Copyright (c) VIX TECHNOLOGY (AUST) LTD
2
# COPYRIGHT - VIX IP PTY LTD ("VIX"). ALL RIGHTS RESERVED.
3
#
3
#
4
# File:         TOOLSET/AVR_IAR.rul[e]
4
# File:         TOOLSET/AVR_IAR.rul[e]
5
# Contents:     IAR rules as used for the AVR
5
# Contents:     IAR rules as used for the AVR
6
#               Make definitions for the IAR tools.
6
#               Make definitions for the IAR tools.
7
#
7
#
Line 186... Line 186...
186
cxx_source      = $<
186
cxx_source      = $<
187
cxx_cmdfile     = $(basename $@).cmd
187
cxx_cmdfile     = $(basename $@).cmd
188
cxx_flags       = --ec++ -f $(cxx_cmdfile)
188
cxx_flags       = --ec++ -f $(cxx_cmdfile)
189
 
189
 
190
define cxx_pre
190
define cxx_pre
191
        @$(echo) [\$<] compiling.. ; \
191
        @$(echo) '[$<] compiling..' ; \
192
        $(cmdfile) -ko$(cxx_cmdfile) "\
192
        $(cmdfile) -ko$(cxx_cmdfile) "\
193
                $(patsubst %,%\\n,$(CFLAGS)) \
193
                $(patsubst %,%\\n,$(CFLAGS)) \
194
                $(patsubst %,-D%\\n,$(cc_defines)) \
194
                $(patsubst %,-D%\\n,$(cc_defines)) \
195
                $(subst =,$(space),$(patsubst %,%\\n,$(iar_flags))) \
195
                $(subst =,$(space),$(patsubst %,%\\n,$(iar_flags))) \
196
                -I $(dir $<)\\n \
196
                -I $(dir $<)\\n \
Line 261... Line 261...
261
#ifdef AVR_IAR_INCLUDES
261
#ifdef AVR_IAR_INCLUDES
262
as_flags      += $(subst $(spacealt),$(space),$(patsubst %,"-I%",$(subst ;,$(space),$(subst \,/,$(subst $(space),$(spacealt),$(subst ;$(space),;,$(AVR_IAR_INCLUDES))))) ))
262
as_flags      += $(subst $(spacealt),$(space),$(patsubst %,"-I%",$(subst ;,$(space),$(subst \,/,$(subst $(space),$(spacealt),$(subst ;$(space),;,$(AVR_IAR_INCLUDES))))) ))
263
#endif
263
#endif
264
 
264
 
265
define as_pre
265
define as_pre
266
    @$(echo) [$@] Assembling file
266
    @$(echo) '[$@] Assembling file..'
267
endef
267
endef
268
define as_post
268
define as_post
269
endef
269
endef
270
 
270
 
271
 
271
 
Line 283... Line 283...
283
ar_term         =
283
ar_term         =
284
 
284
 
285
 
285
 
286
 
286
 
287
define ar_pre
287
define ar_pre
288
        @$(echo) [\$@] Creating library archive.. ; \
288
        @$(echo) '[$@] Creating library archive..' ; \
289
        $(rm) -f $@
289
        $(rm) -f $@
290
endef
290
endef
291
 
291
 
292
ifndef LEAVETMP
292
ifndef LEAVETMP
293
define ar_post
293
define ar_post
Line 305... Line 305...
305
armerge_init         =
305
armerge_init         =
306
armerge_flags        = $^
306
armerge_flags        = $^
307
armerge_o_switch     = -o $@
307
armerge_o_switch     = -o $@
308
 
308
 
309
define armerge_pre
309
define armerge_pre
310
        @$(echo) [\$@] Creating a Merged library.. ; \
310
        @$(echo) '[$@] Creating a Merged library..' ; \
311
        $(rm) -f $@
311
        $(rm) -f $@
312
endef
312
endef
313
 
313
 
314
ifndef LEAVETMP
314
ifndef LEAVETMP
315
define armerge_post
315
define armerge_post
Line 326... Line 326...
326
ld              = $(XX_PRE) "$(avr_iar_linker)"
326
ld              = $(XX_PRE) "$(avr_iar_linker)"
327
ld_cmdfile      = $(basename $@).ld
327
ld_cmdfile      = $(basename $@).ld
328
ld_flags        = -f $(ld_cmdfile)
328
ld_flags        = -f $(ld_cmdfile)
329
 
329
 
330
define ld_pre
330
define ld_pre
331
        $(XX_PRE)$(echo) [$@] Linking program .. ;\
331
        $(XX_PRE)$(echo) '[$@] Linking program ..' ;\
332
        export IAR_LIB; \
332
        export IAR_LIB; \
333
                IAR_LIB="$(subst $(space),;,$(LIBDIRS))"; \
333
                IAR_LIB="$(subst $(space),;,$(LIBDIRS))"; \
334
        $(cmdfile) -W2ko$(ld_cmdfile) "$($(notdir $(basename $@))_ld)"
334
        $(cmdfile) -W2ko$(ld_cmdfile) "$($(notdir $(basename $@))_ld)"
335
endef
335
endef
336
 
336