Version 0.4 from Mike Line
[keystone-rtos/ibl.git] / src / test / test2 / makestage2
1 # simple make file for test2
4 CC= cl6x
5 CFLAGS= -g -c -mv 6400+ $(OPT)
7 .PHONY: test2
9 test2: gen_cdefdep test2_$(ENDIAN).blob
11 ifeq ($(ENDIAN),little)
12  LIB= $(TOOLSC6X)/cgtools/lib/rts64plus.lib
13  OPT=
14 else
15  LIB= $(TOOLSC6X)/cgtools/lib/rts64pluse.lib
16  OPT= -me
17 endif
21 test2_$(ENDIAN).blob: test2_$(ENDIAN).bccs
22         ..\util\ccs2bin $< $@
24 test2_$(ENDIAN).bccs: test2_$(ENDIAN).b
25         ..\util\b2ccs $< $@
27 test2_$(ENDIAN).b: test2_$(ENDIAN).out test2.rmd
28         hex6x $< test2.rmd
29         copy test2im.hex $@
31 test2_$(ENDIAN).out: cdefdep c0.obj test2.obj test2ini.obj test2.cmd
32         cl6x -z -o $@ -m test2.map -e _enter test2.cmd $(LIB)
35 c0.obj: c0.c cdefdep
36         $(CC) $(CFLAGS) $<
39 test2.obj: test2.c cdefdep
40         $(CC) $(CFLAGS) $<
42 test2ini.obj: test2ini.s
43         $(CC) $(CFLAGS) $<
45 gen_cdefdep:
46         @echo checking endian dependency
47         @echo $(ENDIAN) > cdefdep.tmp
48         @sh -c 'if diff -q cdefdep.tmp cdefdep ; then echo same ; else cp cdefdep.tmp cdefdep ; fi '
50