Subversion Repositories DevTools

Rev

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

Rev 5709 Rev 6177
Line 1... Line 1...
1
# -*- mode: mak; -*-
1
# -*- mode: mak; -*-
2
###############################################################################
2
###############################################################################
3
# Copyright (c) VIX TECHNOLOGY (AUST) LTD
3
# COPYRIGHT - VIX IP PTY LTD ("VIX"). ALL RIGHTS RESERVED.
4
#
4
#
5
# File:         TOOLSET/mos_mri.rul[e]
5
# File:         TOOLSET/mos_mri.rul[e]
6
# Contents:     MRI 68k/CF rules as used for the MOS
6
# Contents:     MRI 68k/CF rules as used for the MOS
7
#               Make definitions for the Microtec tools.
7
#               Make definitions for the Microtec tools.
8
#
8
#
Line 152... Line 152...
152
#      ensure that the files are empty before it uses them.
152
#      ensure that the files are empty before it uses them.
153
#      The work around is to generate the temp files in a known directory
153
#      The work around is to generate the temp files in a known directory
154
#      and to delete all temp files before we compile.
154
#      and to delete all temp files before we compile.
155
#
155
#
156
define cc_pre
156
define cc_pre
157
        @$(echo) [$<] compiling.. ; \
157
        @$(echo) '[$<] compiling..' ; \
158
        $(cmdfile) -ko$(cc_cmdfile) "\
158
        $(cmdfile) -ko$(cc_cmdfile) "\
159
                $(patsubst %,%\\n,$(CFLAGS)) \
159
                $(patsubst %,%\\n,$(CFLAGS)) \
160
                $(patsubst %,-D%\\n,$(cc_defines)) \
160
                $(patsubst %,-D%\\n,$(cc_defines)) \
161
                $(patsubst %,%\\n,$(mri_flags)) \
161
                $(patsubst %,%\\n,$(mri_flags)) \
162
                -J$(subst /,\\\\,$(dir $<))\\n \
162
                -J$(subst /,\\\\,$(dir $<))\\n \
Line 238... Line 238...
238
cxx_source      = $<
238
cxx_source      = $<
239
cxx_cmdfile     = $(basename $@).cmd
239
cxx_cmdfile     = $(basename $@).cmd
240
cxx_flags       = -d$(cxx_cmdfile)
240
cxx_flags       = -d$(cxx_cmdfile)
241
 
241
 
242
define cxx_pre
242
define cxx_pre
243
        @$(echo) [\$<] compiling.. ; \
243
        @$(echo) '[$<] compiling..' ; \
244
        $(cmdfile) -ko$(cxx_cmdfile) "\
244
        $(cmdfile) -ko$(cxx_cmdfile) "\
245
                $(patsubst %,%\\n,$(CFLAGS)) \
245
                $(patsubst %,%\\n,$(CFLAGS)) \
246
                $(patsubst %,-D%\\n,$(cc_defines)) \
246
                $(patsubst %,-D%\\n,$(cc_defines)) \
247
                $(patsubst %,%\\n,$(mri_flags)) \
247
                $(patsubst %,%\\n,$(mri_flags)) \
248
                -J$(subst /,\\\\,$(dir $<))\\n \
248
                -J$(subst /,\\\\,$(dir $<))\\n \
Line 297... Line 297...
297
endif
297
endif
298
 
298
 
299
as_flags       += $(patsubst %,-I%,$(INCDIRS))
299
as_flags       += $(patsubst %,-I%,$(INCDIRS))
300
 
300
 
301
define as_pre
301
define as_pre
302
    @$(echo) [$@] Assembling file.. ; \
302
    @$(echo) '[$@] Assembling file..' ; \
303
    if [ -n "$(MRI_TMP)" ] ; then\
303
    if [ -n "$(MRI_TMP)" ] ; then\
304
        if [ ! -d $(MRI_TMP) ] ; then mkdir -p $(MRI_TMP) ; fi;\
304
        if [ ! -d $(MRI_TMP) ] ; then mkdir -p $(MRI_TMP) ; fi;\
305
        touch $(MRI_TMP)/xxx;\
305
        touch $(MRI_TMP)/xxx;\
306
        cd "$(MRI_TMP)" && rm -f *;\
306
        cd "$(MRI_TMP)" && rm -f *;\
307
    fi
307
    fi
Line 320... Line 320...
320
ar_flags        =
320
ar_flags        =
321
ar_o_switch     = < $(ar_cmdfile)
321
ar_o_switch     = < $(ar_cmdfile)
322
ar_term         = > $(ar_logfile)
322
ar_term         = > $(ar_logfile)
323
 
323
 
324
define ar_pre
324
define ar_pre
325
        @$(echo) [\$@] Creating library archive.. ; \
325
        @$(echo) '[$@] Creating library archive..' ; \
326
        $(rm) -f $@ ;\
326
        $(rm) -f $@ ;\
327
        $(cmdfile) -ko$(ar_cmdfile) \
327
        $(cmdfile) -ko$(ar_cmdfile) \
328
                create $@\\n\
328
                create $@\\n\
329
                $(patsubst %,addmod %\\n,$(filter %.obj, $^))\
329
                $(patsubst %,addmod %\\n,$(filter %.obj, $^))\
330
                save\\n end\\n
330
                save\\n end\\n
Line 348... Line 348...
348
armerge_logfile      = $(basename $@).armerge.log
348
armerge_logfile      = $(basename $@).armerge.log
349
armerge_flags        =
349
armerge_flags        =
350
armerge_o_switch     = < $(armerge_cmdfile) > $(armerge_logfile)
350
armerge_o_switch     = < $(armerge_cmdfile) > $(armerge_logfile)
351
 
351
 
352
define armerge_pre
352
define armerge_pre
353
        @$(echo) [\$@] Creating a Merged library.. ; \
353
        @$(echo) '[$@] Creating a Merged library..' ; \
354
        $(rm) -f $@ ;\
354
        $(rm) -f $@ ;\
355
        $(cmdfile) -ko$(armerge_cmdfile) \
355
        $(cmdfile) -ko$(armerge_cmdfile) \
356
                create $@\\n\
356
                create $@\\n\
357
                $(patsubst %,addlib %\\n,$^)\
357
                $(patsubst %,addlib %\\n,$^)\
358
                save\\n end\\n
358
                save\\n end\\n
Line 374... Line 374...
374
shld_cmdfile      = $(basename $@).ld
374
shld_cmdfile      = $(basename $@).ld
375
shldabs_flags     = -m -c$(shld_cmdfile)
375
shldabs_flags     = -m -c$(shld_cmdfile)
376
shldabs_o_switch  = -o$(basename $@).abs > $(basename $@).map
376
shldabs_o_switch  = -o$(basename $@).abs > $(basename $@).map
377
 
377
 
378
define shld_pre
378
define shld_pre
379
        @$(echo) [$@] Linking program .. ;\
379
        @$(echo) '[$@] Linking program ..' ;\
380
        export MRI_LIB; \
380
        export MRI_LIB; \
381
                MRI_LIB="$(subst $(space),;,$(LIBDIRS))"; \
381
                MRI_LIB="$(subst $(space),;,$(LIBDIRS))"; \
382
        $(cmdfile) -ko$(shld_cmdfile) "$($(notdir $(SHBASE))_shld)"
382
        $(cmdfile) -ko$(shld_cmdfile) "$($(notdir $(SHBASE))_shld)"
383
endef
383
endef
384
 
384