GNUmakefile 2.83 KB
#!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 
EXPORTS_SUBDIRS=libultra ${libleo} lib tools debugger diags rdpsim \
	rspasm rspcode rspsim ${assets} libnaudio ${apps.released} simos bbapps
HEADERS_SUBDIRS=include diags kern libnaudio lib
#SUBDIRS=build debugger diags doc include kern libultra libleo \
	rspasm rspcode rspsim tools lib rdpsim assets libnaudio \
	apps.released html man
SUBDIRS=${build} debugger diags doc include ${kern} libultra ${libleo} \
	rspasm rspasm1201 rspcode rspsim lib tools rdpsim ${assets} libnaudio \
	${apps.released} ${html} ${man} iosim simos cpusim bbapps

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
	[ -L $(ROOT)/PR ] || ln -sf `pwd` $(ROOT)/PR
	$(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