Initial commit of OpenSPARC T2 architecture model.
[OpenSPARC-T2-SAM] / sam-t2 / sam / Makefile.targetspecs
CommitLineData
920dae64
AT
1# ========== Copyright Header Begin ==========================================
2#
3# OpenSPARC T2 Processor File: Makefile.targetspecs
4# Copyright (c) 2006 Sun Microsystems, Inc. All Rights Reserved.
5# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES.
6#
7# The above named program is free software; you can redistribute it and/or
8# modify it under the terms of the GNU General Public
9# License version 2 as published by the Free Software Foundation.
10#
11# The above named program is distributed in the hope that it will be
12# useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
13# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14# General Public License for more details.
15#
16# You should have received a copy of the GNU General Public
17# License along with this work; if not, write to the Free Software
18# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
19#
20# ========== Copyright Header End ============================================
21#
22# "@(#)1.2 06/04/24 Makefile.targetspecs"
23#
24#
25# Target-dependent configuration specifications
26#
27# so far these are the target configuration variables:
28#
29# BUILD_TARGET the name of the target being built
30# DEFAULT_INSTALL_DIR name for package/install directory
31# BITS simulator executable binary type, 32 or 64 ---- To be Depricated (always 64)
32# CPU_DIR, CPU what subdir to build the cpu in, what target to build
33# DEVICES.export_ok list of subdirs under devices/ to build that are OK for export
34# DEVICES. list of subdirs under devices/ to build that are not OK for export
35# ANALYZERS list of subdirs under analyzers/ to build
36# OTHER list of other (top level) subdirs to build
37# DEFINES compiler/cpp defines to build this target
38# IMPORT list of extra targets to build
39#
40
41ANYBUILD =
42
43DEFINES = -I$(PWD)/include
44
45install-%:
46 @echo "You are using a depricated make target"
47 @echo "The correct target name is: $*"
48
49# --------------------- n2 -----------------
50# The n2 target for building generic N2 systems or
51# Huron style systems. The -DN2 is for system specific
52# builds to make sure we build N2 versions of devices
53# like cassine and gem.
54
55ANYBUILD += n2
56SYSTEM_TARGET = n2
57
58N2_INSTALL_TARGET = install-n2
59
60$(SYSTEM_TARGET):= DEFAULT_INSTALL_DIR = $(N2_INSTALL_TARGET)
61$(SYSTEM_TARGET):= BUILD_TARGET = n2
62$(SYSTEM_TARGET):= CPU_DIR = vonk
63$(SYSTEM_TARGET):= CPU = n2sam
64$(SYSTEM_TARGET):= DEVICES.export_ok = \
65 py dummy_mods serial_4v tod_4v \
66 pcie_bus pci_bus n2_piu n2_ncu sas \
67 bridge ll \
68 ioram pcie_bridge
69$(SYSTEM_TARGET):= DEVICES. = $(DEVICES.export_ok)
70$(SYSTEM_TARGET):= ANALYZERS = rstracer trapcount
71$(SYSTEM_TARGET):= HEADERS =
72$(SYSTEM_TARGET):= OTHER = system
73$(SYSTEM_TARGET):= DEFINES += -DN2 -DMEMORY_SPARSE -DBITS=$(BITS)
74$(SYSTEM_TARGET):= IMPORT =
75
76ANYBUILD += n2-cosim
77SYSTEM_TARGET = n2-cosim
78
79$(SYSTEM_TARGET):= DEFAULT_INSTALL_DIR = install-n2-cosim
80$(SYSTEM_TARGET):= BUILD_TARGET = n2-cosim
81$(SYSTEM_TARGET):= CPU_DIR = vonk
82$(SYSTEM_TARGET):= CPU = n2nas
83$(SYSTEM_TARGET):= DEVICES.export_ok =
84$(SYSTEM_TARGET):= DEVICES. = $(DEVICES.export_ok)
85$(SYSTEM_TARGET):= ANALYZERS =
86$(SYSTEM_TARGET):= HEADERS =
87$(SYSTEM_TARGET):= OTHER =
88$(SYSTEM_TARGET):= IMPORT =
89
90# create a n2nas package for RTL verification co-simulation
91INSTALL=.
92INSTALL_TARGET = $(SYSTEM_TARGET:%=install-%)
93
94n2-cosim-pkg: $(INSTALL)/nas,5.n2.opens.$(USER)
95
96$(INSTALL)/nas,%: n2-cosim
97 if [ ! -d $@ ]; then mkdir -p $@ ; fi
98 if [ ! -d $@/bin ]; then mkdir -p $@/bin ; fi
99 if [ ! -d $@/lib ]; then mkdir -p $@/lib ; fi
100 if [ ! -d $@/pfe ]; then mkdir -p $@/pfe ; fi
101 if [ ! -d $@/home/common ]; then mkdir -p $@/home/common ; fi
102 /bin/cp -pf $(INSTALL_TARGET)/bin/n2nas $@/bin/n2nas
103 /bin/cp -pf $(INSTALL_TARGET)/bin/_n2nas $@/bin/_n2nas
104 /bin/cp -pf $(INSTALL_TARGET)/bin/n2_start-riesling $@/bin/start-riesling
105 /bin/cp -pf $(INSTALL_TARGET)/lib/*.so $@/lib/.
106 /bin/cp -pf $(INSTALL_TARGET)/etc/n2_common.conf $@/home/common/common.conf
107 /bin/cp -pf $(INSTALL_TARGET)/etc/n2_common.rs $@/home/common/common.simics
108 /bin/cp -prf $(INSTALL_TARGET)/pfe/* $@/pfe/.
109
110# ------------- more agglomerations of targets -----------------
111
112ANYINSTALL = $(ANYBUILD:%=install-%)
113
114ANYCLEAN = $(ANYBUILD:%=clean-%)
115
116# ------------------------- -=oOo=- ------------------------