Makefile
2.44 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
#----------------------------------------------------------------------#
# Copyright (C) 1998, Nintendo.
#
# File Makefile
# Coded by Yoshitaka Yasumoto. Mar 11, 1998.
#
# $Id: Makefile,v 1.1.1.1 2002/05/02 03:29:11 blythe Exp $
#----------------------------------------------------------------------#
#-----------------------------------------------------------------------------
include $(ROOT)/usr/include/make/PRdefs
VERSION = 2.05
SUBVER = H
ARCHIVE = F3DFLX2-$(VERSION)$(SUBVER)
DEFINES = -DDEBUG
UCPKG = F3DEX2
SUBDIRS = F3DFLX2.Rej
COMMONPREF = $(UCPKG)
default:
@for i in $(SUBDIRS) ; do \
( cd $$i ; \
echo ======== $$i.fifo ======== ; \
$(MAKE) -f ../../Makefile UCODE=$$i \
OUTTYPE=fifo SUBVER=$(SUBVER) gsp$$i.fifo.o; \
echo ======== $$i.xbus ======== ; \
$(MAKE) -f ../../Makefile UCODE=$$i \
OUTTYPE=xbus SUBVER=$(SUBVER) gsp$$i.xbus.o );\
done
@echo ======== ucode_f.h ========
@$(MAKE) ucode_f.h
@echo \
----------------------------------------------------------------------
@strings -40 */gsp*.o
@echo \
----------------------------------------------------------------------
ucode_f.h: F3DFLX2.Rej/gspF3DFLX2.Rej.fifo.dbg
# 全ての ALTBL の位置が一致しているかの判定
@( LINE=`grep '^RSP_SAVE_ALTBL ' */*.dbg | \
awk '{print $$2}' | uniq | wc -l`; \
if [ $$LINE \!= 1 ] ; \
then \
grep '^RSP_SAVE_ALTBL ' */*.dbg; \
echo Unmatch RSP_SAVE_ALTBL; \
exit 1; \
fi )
# ALTBL の位置の ucode_f.h への埋め込み
@mv ucode_f.h ucode_f.h.org
@( ADRS=`grep '^RSP_SAVE_ALTBL ' $? | \
awk '{print "0x"$$2; exit}'` ; \
nawk -v ADRS=$$ADRS \
'/^#define.*G_FZ_ADRS_ALTBL/{$$0="#define G_FZ_ADRS_ALTBL "ADRS}{print}' \
ucode_f.h.org > ucode_f.h)
clean clobber:
@for i in $(SUBDIRS) ; do \
echo ======== $$i ======== ; \
( cd $$i ; \
$(MAKE) -f ../../Makefile UCODE=$$i $(COMMONPREF)$@ );\
done
@rm -f *~ ucode_f.h.org
install exports: default
$(INSTALL) -m 444 -F /usr/include/PR ucode_f.h
for i in $(SUBDIRS) ; do \
( cd $$i ; $(INSTALL) -m 555 -F /usr/lib/PR \
gsp$$i.fifo.o gsp$$i.xbus.o ); \
done
release: default
if test -d .rel/$(ARCHIVE); then rm -rf .rel/$(ARCHIVE); fi
mkdir -p .rel/$(ARCHIVE)/safe
for i in $(SUBDIRS); do \
cp $$i/gsp*.o .rel/$(ARCHIVE); \
done
cp README.jp ucode_f.h ALTable.h .rel/$(ARCHIVE)
(cd .rel;\
tar cvf $(ARCHIVE).tar $(ARCHIVE);\
uuencode $(ARCHIVE).tar $(ARCHIVE).tar > /tmp/$(ARCHIVE).tar.uu)
rm -rf .rel/$(ARCHIVE)
#======== End of Makefile ========#