Makefile
1.7 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
include locdefs
default all:
echo Nothing to do for '$@'
DEVKIT=$(ROOT)/opt/devkit
DEVKIT_U=$(DEVKIT)/per_user
BBTREE=../../bbplayer
DEVROOT=../../devroot/linux
install install_devkit:
test "" != "$(ROOT)"
make -C $(BBTREE) headers
make -C $(BBTREE) exports
make -C $(BBTREE) default
make -C ../n64kit install
make -C ../N64SoundTools install
-rm -rf $(DEVKIT)
mkdir -p $(DEVKIT)
test "" != "$(DEVROOT)"
make -C $(DEVROOT) install_devkit DEVKIT=$(DEVKIT)
# extract files from $ROOT
mkdir -p $(DEVKIT_U)/PR
cp $(ROOT)/PR/PRdefs $(DEVKIT_U)/PR
cp $(ROOT)/PR/BBdefs $(DEVKIT_U)/PR
mkdir -p $(DEVKIT_U)/usr/include
mkdir -p $(DEVKIT_U)/usr/lib
mkdir -p $(DEVKIT_U)/usr/sbin
(cd $(ROOT)/usr/include; tar cf - --exclude CVS . ) | (cd $(DEVKIT_U)/usr/include; tar xf -)
(cd export_headers; tar cf - --exclude CVS . ) | (cd $(DEVKIT_U)/usr/include; tar xf -)
(cd $(ROOT)/usr/sbin; tar cf - . ) | (cd $(DEVKIT_U)/usr/sbin; tar xf -)
(cd $(ROOT)/usr/lib; tar cf - . ) | (cd $(DEVKIT_U)/usr/lib; tar xf -)
# remove headers, binaries and libs not intended for export
cat rmlist | (cd $(DEVKIT_U); xargs rm -f)
# add links to export versions of headers
(cd $(DEVKIT_U)/usr/include/PR; \
ln -sf bbfs_export.h bbfs.h; \
ln -sf bbskapi_export.h bbskapi.h; \
ln -sf os_bbexec_export.h os_bbexec.h; \
ln -sf os_bbfs_export.h os_bbfs.h; \
ln -sf os_bb_export.h os_bb.h)
cp install.sh $(DEVKIT)
cp index.html $(DEVKIT)
mkdir -p $(DEVKIT)/doc
cp doc/gdb.html $(DEVKIT)/doc
cp doc/auxdata.html $(DEVKIT)/doc
cat Nintendo/allman52.tgz | (cd $(DEVKIT)/doc; tar xzf -)
(cd doc; tar cf - --exclude CVS . ) | (cd $(DEVKIT)/doc; tar xf -)
clean clobber:
test "" != "$(ROOT)"
-rm -rf $(DEVKIT)
make -C $(BBTREE) clobber