# ========== Copyright Header Begin ==========================================
# OpenSPARC T2 Processor File: Makefile
# Copyright (c) 2006 Sun Microsystems, Inc. All Rights Reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES.
# The above named program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public
# License version 2 as published by the Free Software Foundation.
# The above named program is distributed in the hope that it will be
# useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# General Public License for more details.
# You should have received a copy of the GNU General Public
# License along with this work; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
# ========== Copyright Header End ============================================
# "@(#)1.2 06/04/24 Makefile, top level, SAM."
# ---------------- conditional/dependent defines -------------
include Makefile.targetspecs
# -----------------------------------------------------------------
# -----------------------------------------------------------------
@echo
" cpu - cpu one of: $(ANYBUILD)"
@echo
" clean - clean all"
# -----------------------------------------------------------------
# Build devices first. Then we build our cpu model, and
# we fiish with some analysers and other things (system for example).
# -----------------------------------------------------------------
@if
[ "`/bin/uname -r`" = "5.10" -a
"$(SOL10)" != "OK" ] ; then \
echo
'Do not build on a s10 machine (use make SOL10=OK $@ to overwrite,' ; \
echo
'or do setenv SOL10 OK)' ; \
@if
[ "$(CHECK_MODE)" = "" ]; then \
echo
"MODE=$(MODE) is unknown, try g or opt." ;\
@if
[ "$(CHECK_ARCH)" = "" ]; then \
echo
"ARCH=$(ARCH) is unknown, try v9, v8plus, or amd64." ;\
- /bin
/mkdir
-p
$(INSTALL_DIRS
)
if
[ "$(DEVICES.$(EXPORT_OK))" != "" ]; then \
for f in
`echo "$(DEVICES.$(EXPORT_OK))"` ; do \
$(MAKE
) $(PASSDOWN
) TREEPATH
="devices/$$f" \
$(MAKE
) $(CPU
) $(PASSDOWN
) TREEPATH
="cpus/$(CPU_DIR)" \
if
[ "$(ANALYZERS)" != "" ]; then \
for f in
`echo "$(ANALYZERS)"` ; do \
$(MAKE
) $(PASSDOWN
) TREEPATH
="analyzers/$$f" \
if
[ "$(OTHER)" != "" ]; then \
for f in
`echo "$(OTHER)"` ; do \
$(MAKE
) $(PASSDOWN
) TREEPATH
="$$f" \
if
[ "$(IMPORT)" != "" ]; then \
$(MAKE
) $(PASSDOWN
) $(IMPORT
) ;\
# -----------------------------------------------------------------
# This target cleans out all the make targets and intermittend
# results that get produced by the build processes
# -----------------------------------------------------------------
/bin
/rm -rf
$(BUILD_ROOT
) $(ANYBUILD
:%=install-
%)
( cd cpus
/vonk
; $(MAKE
) clean $(PASSDOWN
) TREEPATH
="cpus/vonk" )
( cd devices
/py
; $(MAKE
) $(PASSDOWN
) clean )
/bin
/rm -fr nas
,5.n2.opens.
$(USER
)
# -----------------------------------------------------------------
# -----------------------------------------------------------------
@
$(RM
) cscope.files cscope.files.raw
-find .
-name SCCS
-prune
-o
-name deleted_files
-prune
-o
-type f \
\
( -name
"*.[chs]" -o
-name
"*.cc" -o
-name
"Makefile*" \
-o
-name
'*.il*' \
) -print > cscope.files.raw
grep
-v Makefile cscope.files.raw
> cscope.files
grep Makefile cscope.files.raw
>> cscope.files
# ------------------------- -=oOo=- ------------------------