Initial commit of OpenSPARC T2 architecture model.
[OpenSPARC-T2-SAM] / sam-t2 / sam / cpus / vonk / n2 / exe / nas / Makefile.rules
CommitLineData
920dae64
AT
1# ========== Copyright Header Begin ==========================================
2#
3# OpenSPARC T2 Processor File: Makefile.rules
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$(PFE_DIR)/%: $(SRC_DIR.n2.exe.nas)/%
23 $(TARGET_MKDIR)
24 $(CP) -f $< $@
25
26$(ETC_DIR)/%: $(SRC_DIR.n2.exe.nas)/%
27 $(TARGET_MKDIR)
28 $(CP) -f $< $@
29
30$(BIN_DIR)/n2nas: $(BIN_DIR)/_n2nas $(SRC_DIR.n2.exe.nas)/n2nas
31 $(TARGET_MKDIR)
32 $(SED) -e 's!@-PYTHONHOME-@!$(DEVTOOLS_HOME)!g' < $(SRC_DIR.n2.exe.nas)/n2nas > $@
33 $(CHMOD) +x $@
34 $(SED) -e 's!@-PYTHONHOME-@!$(DEVTOOLS_HOME)!g' < $(SRC_DIR.n2.exe.nas)/n2_start-riesling > $(BIN_DIR)/n2_start-riesling
35 $(CHMOD) +x $(BIN_DIR)/n2_start-riesling
36
37$(OBJ_DIR)/N2_Main.o: $(SRC_DIR)/N2_Main.cc
38 $(TARGET_MKDIR)
39 $(CC_BIN) $(CC_FLAGS) -I$(PY_INC) -I$(SPIX_INC) -c -o $@ $(SRC_DIR)/N2_Main.cc
40
41$(SRC_DIR)/N2_Main.cc: $(BIN_DIR.ss.exe.nas)/SS_Main.cc
42 PYTHONPATH=$(PYTHONPATH) $(PY_BIN) $(BIN_DIR.ss.api.pfe)/sed.py $(BIN_DIR.ss.exe.nas)/SS_Main.cc '[ARCH:N2,ARCH-VF:N2,arch:n2,PLICMD:]' $@
43
44$(PFE_DIR)/N2_Main.py: $(BIN_DIR.ss.exe.nas)/SS_Main.py
45 PYTHONPATH=$(PYTHONPATH) $(PY_BIN) $(BIN_DIR.ss.api.pfe)/sed.py $(BIN_DIR.ss.exe.nas)/SS_Main.py '[ARCH:N2,arch:n2]' $@
46
47$(SRC_DIR.n2.exe.nas):
48 @if [ ! -d $@ ] ; then $(MKDIR) -p $@ ; fi
49
50$(BIN_DIR)/_n2nas:\
51 $(BUILD_DIRS)\
52 $(LIB_DIR)/$(LIBPRE)n2$(LIBCPU).so\
53 $(PFE_DIR)/_N2_Python.so\
54 $(PFE_DIR)/_SS_Ram.so\
55 $(PFE_BUILD.ss.api.samfe)\
56 $(PFE_BUILD.n2.exe.nas)\
57 $(OBJ_BUILD.n2.lib.csr)\
58 $(OBJ_BUILD.ss.api.memsync)\
59 $(OBJ_BUILD.ss.api.pli)\
60 $(OBJ_BUILD.ss.lib.csr)\
61 $(OBJ_BUILD.n2.api.pli)\
62 $(OBJ_BUILD.n2.exe.nas)
63 $(PURIFY) $(CC_BIN) -mt $(CC_FLAGS.$(MODE)) -L$(LIB_DIR) -o $@\
64 $(OBJ_BUILD.n2.lib.csr)\
65 $(OBJ_BUILD.ss.api.memsync)\
66 $(OBJ_BUILD.ss.api.pli)\
67 $(OBJ_BUILD.ss.lib.csr)\
68 $(OBJ_BUILD.n2.api.pli)\
69 $(OBJ_BUILD.n2.exe.nas)\
70 -l$(LIBNAME)n2$(LIBCPU)\
71 -l$(LIBNAME)n2$(LIBPFE)\
72 $(LD_FLAGS.exe)