c64x: Add Multi Boot Support
[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 utils test2_$(ENDIAN).blob
11 ifeq ($(ENDIAN),little)
12  LIB= $(TOOLSC6X)/lib/rts64plus.lib
13  OPT=
14  C2B_OPT=
15 else
16  LIB= $(TOOLSC6X)/lib/rts64pluse.lib
17  OPT= -me
18  C2B_OPT= -swap
19 endif
23 test2_$(ENDIAN).blob: test2_$(ENDIAN).bccs
24         ..\..\util\btoccs\ccs2bin $(C2B_OPT) $< $@
26 test2_$(ENDIAN).bccs: test2_$(ENDIAN).b
27         ..\..\util\btoccs\b2ccs $< $@
29 test2_$(ENDIAN).b: test2_$(ENDIAN).out test2.rmd
30         hex6x $< test2.rmd
31         copy test2im.hex $@
33 test2_$(ENDIAN).out: cdefdep c0.obj test2.obj test2ini.obj test2.cmd
34         cl6x -z -o $@ -m test2.map -e _enter test2.cmd $(LIB)
37 c0.obj: c0.c cdefdep
38         $(CC) $(CFLAGS) $<
41 test2.obj: test2.c cdefdep
42         $(CC) $(CFLAGS) $<
44 test2ini.obj: test2ini.s cdefdep
45         $(CC) $(CFLAGS) $<
47 gen_cdefdep:
48         @echo checking endian dependency
49         @echo $(ENDIAN) > cdefdep.tmp
50         @sh -c 'if diff -q cdefdep.tmp cdefdep ; then echo same ; else cp cdefdep.tmp cdefdep ; fi '
52         
53 utils:
54         make -C ../../util/btoccs
57 clean:
58         rm -rf test2_little.blob test2_big.blob
59         rm -rf test2_little.bccs test2_big.bccs
60         rm -rf test2_little.b    test2_big.b
61         rm -rf test2_little.out  test2_big.out
62         rm -rf c0.obj
63         rm -rf test2.obj
64         rm -rf test2ini.obj
65         rm -rf test2im.hex
66         rm -rf test2.map