GNUmakefile
3.67 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
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
#!smake
#
# local all inclusive Makefile for Project Reality diags
#
DIAGSDEPTH=..
PRDEPTH=../..
include $(PRDEPTH)/PRdefs
CC=$(HOST_CC)
GCINCS=
GLDOPTS=
AIDIR = $(DIAGSDEPTH)/ai
COMMONDIR = $(DIAGSDEPTH)/common
IODIR = $(DIAGSDEPTH)/io
NDEVDIR = $(DIAGSDEPTH)/ndev
PIDIR = $(DIAGSDEPTH)/pi
RDPDIR = $(DIAGSDEPTH)/rdp
RDRAMDIR = $(DIAGSDEPTH)/rdram
RSPDIR = $(DIAGSDEPTH)/rsp
SIDIR = $(DIAGSDEPTH)/si
VIDIR = $(DIAGSDEPTH)/vi
DIAGCMD = prcmd
TARGET = u64ide
AIOBJS = \
$(AIDIR)/ai.o \
$(AIDIR)/ai_regtests.o \
$(AIDIR)/ai_pintests.o \
$(AIDIR)/ai_sounds.o
COMMONOBJS = \
$(COMMONDIR)/examineMem.o \
$(COMMONDIR)/rdpDump.o \
$(COMMONDIR)/reg.o
IOOBJS = $(IODIR)/io.o
NDEVOBJS = $(NDEVDIR)/ndev_bcopy.o \
$(NDEVDIR)/ndev_bzero.o \
$(NDEVDIR)/ndev_memtest.o
PIOBJS = $(PIDIR)/pi.o
RDPOBJS = $(RDPDIR)/rdp.o \
$(RDPDIR)/rdp_dl.o
RDRAMOBJS = $(RDRAMDIR)/rdram.o
RSPOBJS = $(RSPDIR)/rsp.o \
$(RSPDIR)/rspcor.o \
$(RSPDIR)/rspcor1.o \
$(RSPDIR)/rsp_regr_common.o \
$(RSPDIR)/rsp_regr_dummy.o \
$(RSPDIR)/rsp_regr_su_alu.o \
$(RSPDIR)/rsp_regr_su_br.o \
$(RSPDIR)/rsp_regr_su_cp2.o \
$(RSPDIR)/rsp_regr_su_ld.o \
$(RSPDIR)/rsp_regr_su_log.o \
$(RSPDIR)/rsp_regr_su_sh.o \
$(RSPDIR)/rsp_regr_su_st.o \
$(RSPDIR)/rsp_regr_vu_abs.o \
$(RSPDIR)/rsp_regr_vu_add.o \
$(RSPDIR)/rsp_regr_vu_cmp.o \
$(RSPDIR)/rsp_regr_vu_dp_recp.o \
$(RSPDIR)/rsp_regr_vu_dp_sqrt.o \
$(RSPDIR)/rsp_regr_vu_ld.o \
$(RSPDIR)/rsp_regr_vu_log.o \
$(RSPDIR)/rsp_regr_vu_mac.o \
$(RSPDIR)/rsp_regr_vu_mad.o \
$(RSPDIR)/rsp_regr_vu_mov.o \
$(RSPDIR)/rsp_regr_vu_mrg.o \
$(RSPDIR)/rsp_regr_vu_mud.o \
$(RSPDIR)/rsp_regr_vu_mul.o \
$(RSPDIR)/rsp_regr_vu_rnd.o \
$(RSPDIR)/rsp_regr_vu_rom_tests.o \
$(RSPDIR)/rsp_regr_vu_sax.o \
$(RSPDIR)/rsp_regr_vu_sp_recp.o \
$(RSPDIR)/rsp_regr_vu_sp_sqrt.o \
$(RSPDIR)/rsp_regr_vu_st.o \
$(RSPDIR)/rsp_regr_vu_sub.o \
$(RSPDIR)/rsp_regr_vu_vcx.o \
$(RSPDIR)/rsp_regr_pipe.o \
$(RSPDIR)/rsp_regr_dma.o \
$(RSPDIR)/rsp_other_ucode.o \
$(RSPDIR)/rsp_other.o
SIOBJS = $(SIDIR)/si.o \
$(SIDIR)/si_controller.o
VIOBJS = $(VIDIR)/vi.o
CFILES = $(DIAGCMD).c stubs.c rev.o
LOCALOBJS = $(DIAGCMD).o stubs.o rev.o
OBJECTS = $(AIOBJS) $(COMMONOBJS) $(IOOBJS) $(NDEVOBJS) $(PIOBJS) $(RDRAMOBJS) \
$(RSPOBJS) $(SIOBJS) $(VIOBJS) $(LOCALOBJS) $(RDPOBJS)
IDEAWKSCRIPT=$(PRDEPTH)/diags/ide/builtins.awk
LIBDG= $(ROOT)/usr/lib/PR/libdg.a
LIBIDE= $(PRDEPTH)/diags/ide/libide.a
LCOPTS= -g
STDINC= $(ROOT)/usr/include
IDEINC= $(ROOT)/usr/include/ide
PRINC= $(PRDEPTH)/include
LCINCS= -I$(PRINC) -I$(STDINC) -I$(IDEINC)
LLDOPTS = -L$(ROOT)/usr/lib/PR -L$(PRDEPTH)/diags/ide
LLDLIBS = -ldg -lide
$(TARGET): $(OBJECTS)
echo "OBJECTS= $(OBJECTS)"
$(CC) -o $@ $(OBJECTS) $(LDFLAGS)
$(DIAGCMD).awk: Makefile $(AIDIR)/aicmd.awk $(COMMONDIR)/commoncmd.awk \
$(IODIR)/iocmd.awk $(NDEVDIR)/ndevcmd.awk $(PIDIR)/picmd.awk \
$(RDPDIR)/rdpcmd.awk $(RDRAMDIR)/rdramcmd.awk $(RSPDIR)/rspcmd.awk \
$(SIDIR)/sicmd.awk $(VIDIR)/vicmd.awk
cat $(AIDIR)/aicmd.awk $(COMMONDIR)/commoncmd.awk \
$(IODIR)/iocmd.awk $(NDEVDIR)/ndevcmd.awk $(PIDIR)/picmd.awk \
$(RDPDIR)/rdpcmd.awk $(RDRAMDIR)/rdramcmd.awk \
$(RSPDIR)/rspcmd.awk $(SIDIR)/sicmd.awk \
$(VIDIR)/vicmd.awk \
| sed -e '/^#/d' > $(DIAGCMD).awk
# generate the commands source file
$(DIAGCMD).c: $(DIAGCMD).awk
$(NAWK) -v FILENAME=$(DIAGCMD).awk -F'\t[\t ]*' -f $(IDEAWKSCRIPT) $(DIAGCMD).awk > $@
rev.o: _forcerev
_forcerev:
/bin/sh rev.sh $(RELEASE) > rev.c
$(CC) $(CFLAGS) -c rev.c
default: $(TARGET)
install : default
$(INSTALL) -F /usr/diags/bin $(TARGET) u64ide.script u64cor.script
clobber: clean
rm -f $(TARGET) Makedepend rev.c $(DIAGCMD).c $(DIAGCMD).awk
clean:
rm -f $(LOCALOBJS)