GNUmakefile
1.88 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
#!smake
PRDEPTH = ../..
include $(PRDEPTH)/PRdefs
COMMONPREF = BringupBoot
LASINCS = -I$(PRDEPTH)/iosim/src -I../include -I$(PRDEPTH)/include
LCINCS = -I$(ROOT)/PR/iosim/src -I../../include -I$(PRDEPTH)/include
ENDIAN = -EB
#if defined(HW_FLAGS) && $(HW_FLAGS) == "-D_HW_VERSION_1"
BOOT_LDFLAGS = -allow_jump_at_eop -coff -N -T 04000400 -G 0
#else
#BOOT_LDFLAGS = -allow_jump_at_eop -coff -N -T 04000040 -G 0
BOOT_LDFLAGS = -N -Ttext 04000040 -G 0
#endif
#PIF2BOOT_LDFLAGS = -allow_jump_at_eop -coff -N -T b0001000 -G 0
PIF2BOOT_LDFLAGS = -N -Ttext 0xb0001000 -G 0
#LASOPTS = -Wab,-mips3 -Wab,-diag -non_shared -coff -G 0
LASOPTS = -Wab,-mips3 -Wab,-diag -non_shared -G 0
#LCOPTS = -Wab,-mips3 -Wab,-diag -non_shared -coff -g -G 0
LCOPTS = -Wa,-mips3 -Wab,-diag -non_shared -g -G 0
LDV= ${LD} ${LLDFLAGS} ${VLDFLAGS} ${ENDIAN}
ASFILES = Boot.s pif2Boot.s
TARGETS = Boot pif2Boot
#if defined(HW_FLAGS) && $(HW_FLAGS) == "-D_HW_VERSION_1"
ROMHEADER= romheader.v1
#else
ROMHEADER= romheader
#endif
LDIRT = $(TARGETS) $(TARGETS:=.elf)
OBJECTS = $(ASFILES:.s=.o) $(CFILES:.c=.o)
include $(PRDEPTH)/PRrules
SUBDIRS = IPL4
default all: $(TARGETS)
$(SUBDIRS_MAKERULE)
#$(COMMONTARGS): $(_FORCE) $(COMMONPREF)$@
$(COMMONTARGS): % : $(COMMONPREF)% $(_FORCE)
$(SUBDIRS_MAKERULE)
headers:
#
# install to the same directory as rsp ucode (/usr/lib/PR)
#
install exports: $(TARGETS)
$(SUBDIRS_MAKERULE)
$(INSTALL) -m 444 -F /usr/lib/PR $(TARGETS) font
$(INSTALL) -m 444 -F /usr/lib/PR -src $(ROMHEADER) -O romheader
Boot: $(OBJECTS) Makefile
$(LD) $(BOOT_LDFLAGS) Boot.o -o Boot.elf
mips-linux-objcopy -O ecoff-bigmips -R .mdebug -R .reginfo Boot.elf Boot
# $(SIZE) -x Boot | grep "Size of Boot"
pif2Boot: $(OBJECTS) Makefile
$(LD) $(PIF2BOOT_LDFLAGS) pif2Boot.o -o pif2Boot.elf
mips-linux-objcopy -O ecoff-bigmips -R .mdebug -R .reginfo pif2Boot.elf pif2Boot
# $(SIZE) -x pif2Boot | grep "Size of pif2Boot"