Initial commit of OpenSPARC T2 architecture model.
[OpenSPARC-T2-SAM] / sam-t2 / sam / Makefile.targetspecs
# ========== Copyright Header Begin ==========================================
#
# OpenSPARC T2 Processor File: Makefile.targetspecs
# 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.targetspecs"
#
#
# Target-dependent configuration specifications
#
# so far these are the target configuration variables:
#
# BUILD_TARGET the name of the target being built
# DEFAULT_INSTALL_DIR name for package/install directory
# BITS simulator executable binary type, 32 or 64 ---- To be Depricated (always 64)
# CPU_DIR, CPU what subdir to build the cpu in, what target to build
# DEVICES.export_ok list of subdirs under devices/ to build that are OK for export
# DEVICES. list of subdirs under devices/ to build that are not OK for export
# ANALYZERS list of subdirs under analyzers/ to build
# OTHER list of other (top level) subdirs to build
# DEFINES compiler/cpp defines to build this target
# IMPORT list of extra targets to build
#
ANYBUILD =
DEFINES = -I$(PWD)/include
install-%:
@echo "You are using a depricated make target"
@echo "The correct target name is: $*"
# --------------------- n2 -----------------
# The n2 target for building generic N2 systems or
# Huron style systems. The -DN2 is for system specific
# builds to make sure we build N2 versions of devices
# like cassine and gem.
ANYBUILD += n2
SYSTEM_TARGET = n2
N2_INSTALL_TARGET = install-n2
$(SYSTEM_TARGET):= DEFAULT_INSTALL_DIR = $(N2_INSTALL_TARGET)
$(SYSTEM_TARGET):= BUILD_TARGET = n2
$(SYSTEM_TARGET):= CPU_DIR = vonk
$(SYSTEM_TARGET):= CPU = n2sam
$(SYSTEM_TARGET):= DEVICES.export_ok = \
py dummy_mods serial_4v tod_4v \
pcie_bus pci_bus n2_piu n2_ncu sas \
bridge ll \
ioram pcie_bridge
$(SYSTEM_TARGET):= DEVICES. = $(DEVICES.export_ok)
$(SYSTEM_TARGET):= ANALYZERS = rstracer trapcount
$(SYSTEM_TARGET):= HEADERS =
$(SYSTEM_TARGET):= OTHER = system
$(SYSTEM_TARGET):= DEFINES += -DN2 -DMEMORY_SPARSE -DBITS=$(BITS)
$(SYSTEM_TARGET):= IMPORT =
ANYBUILD += n2-cosim
SYSTEM_TARGET = n2-cosim
$(SYSTEM_TARGET):= DEFAULT_INSTALL_DIR = install-n2-cosim
$(SYSTEM_TARGET):= BUILD_TARGET = n2-cosim
$(SYSTEM_TARGET):= CPU_DIR = vonk
$(SYSTEM_TARGET):= CPU = n2nas
$(SYSTEM_TARGET):= DEVICES.export_ok =
$(SYSTEM_TARGET):= DEVICES. = $(DEVICES.export_ok)
$(SYSTEM_TARGET):= ANALYZERS =
$(SYSTEM_TARGET):= HEADERS =
$(SYSTEM_TARGET):= OTHER =
$(SYSTEM_TARGET):= IMPORT =
# create a n2nas package for RTL verification co-simulation
INSTALL=.
INSTALL_TARGET = $(SYSTEM_TARGET:%=install-%)
n2-cosim-pkg: $(INSTALL)/nas,5.n2.opens.$(USER)
$(INSTALL)/nas,%: n2-cosim
if [ ! -d $@ ]; then mkdir -p $@ ; fi
if [ ! -d $@/bin ]; then mkdir -p $@/bin ; fi
if [ ! -d $@/lib ]; then mkdir -p $@/lib ; fi
if [ ! -d $@/pfe ]; then mkdir -p $@/pfe ; fi
if [ ! -d $@/home/common ]; then mkdir -p $@/home/common ; fi
/bin/cp -pf $(INSTALL_TARGET)/bin/n2nas $@/bin/n2nas
/bin/cp -pf $(INSTALL_TARGET)/bin/_n2nas $@/bin/_n2nas
/bin/cp -pf $(INSTALL_TARGET)/bin/n2_start-riesling $@/bin/start-riesling
/bin/cp -pf $(INSTALL_TARGET)/lib/*.so $@/lib/.
/bin/cp -pf $(INSTALL_TARGET)/etc/n2_common.conf $@/home/common/common.conf
/bin/cp -pf $(INSTALL_TARGET)/etc/n2_common.rs $@/home/common/common.simics
/bin/cp -prf $(INSTALL_TARGET)/pfe/* $@/pfe/.
# ------------- more agglomerations of targets -----------------
ANYINSTALL = $(ANYBUILD:%=install-%)
ANYCLEAN = $(ANYBUILD:%=clean-%)
# ------------------------- -=oOo=- ------------------------