Makefile
2.42 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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
PRDEPTH = ../..
include $(PRDEPTH)/PRdefs
LASINCS = -I../include -I$(ROOT)/usr/include/sys -I$(ROOT)/usr/include/PR
TM_DMEM_LDFLAGS = -coff -allow_jump_at_eop -n -N -T 84000000 -G 0
TM_IMEM_LDFLAGS = -coff -allow_jump_at_eop -n -N -T 84001000 -G 0
RAMROM_BOOT_LDFLAGS = -coff -allow_jump_at_eop -n -N -T b0000400 -G 0
RDRAM_LDFLAGS = -coff -allow_jump_at_eop -n -N -T 80000000 -G 0
PIF2DIAGBOOT_LDFLAGS = -allow_jump_at_eop -coff -N -T b0001000 -G 0
LCFLAGS = -D_HW_VERSION_1
LLDFLAGS = -coff -allow_jump_at_eop -nN -T bfc00000 -G 0
LASOPTS = -non_shared -G 0
LDV= ${LD} ${LLDFLAGS} ${VLDFLAGS}
ASFILES = pifdebug1.s pifdebug2.s pifmon.s tinymon_pif.s tm_rdram_boot.s \
tm_rdram.s tm_imem_boot.s tm_dmem_boot.s pif2DiagBoot.s
TARGETS = pifdebug1 pifdebug2 pifmon pif2DiagBoot $(UCODE_TARGETS)
UCODE_TARGETS = tinymon_pif.rom tm_rdram_boot tm_rdram.rom \
tm_imem.rom tm_imem_boot tm_dmem.rom tm_dmem_boot
LDIRT_TARGETS = fakerom tm_rdram tm_imem tm_dmem
LDIRT = $(OBJECTS) $(LDIRT_TARGETS)
OBJECTS = $(ASFILES:.s=.o)
include $(PRDEPTH)/PRrules
default all: $(TARGETS)
install: default
$(INSTALL) -m 444 -F /usr/diags/ucode $(UCODE_TARGETS)
pifdebug1: pifdebug1.o
$(LDV) pifdebug1.o -o pifdebug1
pifdebug2: pifdebug2.o
$(LDV) pifdebug2.o -o pifdebug2
pifmon: pifmon.o
$(LDV) pifmon.o -o pifmon
tinymon_pif: tinymon_pif.o
${LD} ${RAMROM_BOOT_LDFLAGS} ${VLDFLAGS} tinymon_pif.o -o tinymon_pif
tinymon_pif.rom: tinymon_pif fakerom
fakerom tinymon_pif tinymon_pif
tm_rdram: tm_rdram.o
${LD} ${RDRAM_LDFLAGS} ${VLDFLAGS} tm_rdram.o \
-o tm_rdram
tm_rdram.rom: tm_rdram tm_rdram_boot fakerom
fakerom tm_rdram_boot tm_rdram
tm_rdram_boot: tm_rdram_boot.o
${LD} ${RAMROM_BOOT_LDFLAGS} ${VLDFLAGS} tm_rdram_boot.o \
-o tm_rdram_boot
fakerom: fakerom.c
$(CCF) -g $(LASINCS) -nostdlib -L $(ROOT)/usr/lib -o fakerom fakerom.c -lmld
tm_imem: tm_rspmem.o
${LD} ${TM_IMEM_LDFLAGS} ${VLDFLAGS} tm_rspmem.o -o tm_imem
tm_imem.rom: tm_imem_boot tm_imem fakerom
fakerom tm_imem_boot tm_imem
tm_imem_boot: tm_imem_boot.o
${LD} ${RAMROM_BOOT_LDFLAGS} ${VLDFLAGS} tm_imem_boot.o \
-o tm_imem_boot
tm_dmem: tm_rspmem.o
${LD} ${TM_DMEM_LDFLAGS} ${VLDFLAGS} tm_rspmem.o -o tm_dmem
tm_dmem.rom: tm_dmem_boot tm_dmem fakerom
fakerom tm_dmem_boot tm_dmem
tm_dmem_boot: tm_dmem_boot.o
${LD} ${RAMROM_BOOT_LDFLAGS} ${VLDFLAGS} tm_dmem_boot.o \
-o tm_dmem_boot
pif2DiagBoot: $(OBJECTS) Makefile
$(LD) $(PIF2DIAGBOOT_LDFLAGS) pif2DiagBoot.o -o pif2DiagBoot