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
#!smake
#
# Makefile for Project Reality development tools
#
# The main targets at the top level are:
#
# default:this performs a bootstrap (headers and exports) then
# builds all of the software in place. No rawidb is generated and
# targets are not installed anywhere. No images are generated.
#
# headers:install all headers. This should always be run without RAWIDB set.
#
# exports:builds and installs all libraries and data files that are required
# to build the rest of the ism. This should always be run without
# RAWIDB set.
#
# install:builds and installs the entire subtree. 'headers' and 'exports'
# must be run previous to 'install'. With RAWIDB set this will
# generate the rawidb for the ism. Without RAWIDB set, all the
# ism objects will be installed in $ROOT
#
# rawidb:executes 'install' with RAWIDB set to the file that the ism image
# generation makefile (in build/) expects. As with 'install'
# 'headers' and 'exports' must be run beforehand.
#
# ism:descends into the build directory and performs the steps to generate
# the final idb. At this point images may be generated.
# 'rawidb' must have already been run.
#
# images:descends into the build directory and builds ism images.
# 'rawidb' and 'ism' must have been run previously.
#
# clean:removes .o's
# clobber:removes all non-source. The effective of 'clobber' can be checked
# by running p_check -w after running 'clobber'
# rmtargets:removes TARGETS only
#
#
include $(ROOT)/usr/include/make/ismcommondefs
EXPORTS_SUBDIRS=libultra libleo tools debugger diags lib rdpsim \
rspasm rspcode rspsim assets libnaudio apps.released
HEADERS_SUBDIRS=include diags kern libnaudio
SUBDIRS=build debugger diags doc include kern libultra libleo \
rspasm rspcode rspsim tools lib rdpsim assets libnaudio \
apps.released html man
COMMONPREF=PR
SRC=`pwd`
IDBFILE="`pwd`/build/IDB"
ISM_NAME=PR
LDIRT=$(ISM_NAME).version
default $(COMMONTARGS): $(_FORCE)
$(SUBDIRS_MAKERULE)
include $(ISMCOMMONRULES)
exports:$(_FORCE)
$(EXPORTS_SUBDIRS_MAKERULE)
headers:$(_FORCE)
$(INSTALL) -m 444 -F /usr/include/make PRdefs
$(HEADERS_SUBDIRS_MAKERULE)
install:$(_FORCE)
$(INSTALL) -m 444 -F /usr/include/make PRdefs
$(SUBDIRS_MAKERULE)
rawidb:$(_FORCE)
@RAWIDB=$(IDBFILE); export RAWIDB ; \
if [ -f $$RAWIDB ] ; then mv $$RAWIDB $$RAWIDB.prev ; fi ;\
echo "RAWIDB=$$RAWIDB SRC=$(SRC) $(MAKE) install" ;\
$(MAKE) SRC=$(SRC) install
ism:$(_FORCE)
cd build; $(MAKE) buildism
images:$(_FORCE)
cd build; $(MAKE) buildimages