1
2#
3# This is just a Makefile fragment -- it is included by the master
4# makefile, cfe.mk
5#
6# This file should just append object file names to "ALLOBJS",
7# but since it is mean to be linked *first*, it will append
8# modules to "CRT0OBJS"
9#
10#
11#  Macro               Contains
12#  CRT0OBJS            Files that must be linked first for CFE
13#  ALLOBJS             Other files for CFE
14#  ZCRTO0OBJS          Files that must be linked first for ZIPSTART
15#  ZSOBJS              ZIPSTART object files
16#
17
18#
19# Allow makefile to override init_mips.S.  If not overridden, it's
20# either 'init_mips.S' or 'init_ram.o' for RAMAPP and ZIPSTART versions.
21#
22
23ifndef INIT_MIPS
24  INIT_MIPS = init_mips.o
25
26  ifeq ($(strip ${CFG_RAMAPP}),1)
27    INIT_MIPS = init_ram.o
28  endif
29
30  ifeq ($(strip ${CFG_ZIPSTART}),1)
31    INIT_MIPS = init_ram.o
32  endif
33endif
34
35FLASH_ENGINE ?= dev_flashop_engine.o
36
37CRT0OBJS += $(INIT_MIPS) apientry.o exception.o
38
39ZCRT0OBJS += zipstart_init.o zipstart_entry.o
40
41ALLOBJS += lib_setjmp.o disasm.o mips_arena.o exchandler.o
42ALLOBJS += dev_flash_all.o ${FLASH_ENGINE}
43ALLOBJS += lib_hssubr.o
44
45CLEANOBJS += cpu_socregs.inc
46
47makereg : ${TOP}/hosttools/makereg.c
48	$(HOST_CC) $(HOST_CFLAGS) -o makereg ${TOP}/hosttools/makereg.c
49
50%.inc : %.regdef makereg
51	./makereg $< $@ ${CPU}_regs.h
52	rm -f ./cpu_socregs.inc
53	ln -s $@ ./cpu_socregs.inc
54
55vapi.o : ${TOP}/verif/vapi.S ${CPU}_socregs.inc
56
57
58
59