Initial commit of OpenSPARC T2 architecture model.
[OpenSPARC-T2-SAM] / sam-t2 / sam / cpus / vonk / n2 / api / pfe / Makefile.rules
# ========== Copyright Header Begin ==========================================
#
# OpenSPARC T2 Processor File: Makefile.rules
# 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 ============================================
$(SRC_DIR)/N2_Python.cc: $(SRC_DIR.n2.api.pfe)/N2_Python.i $(INC_DIR)/SS_Python.i
$(SWIG_BIN) $(SWIG_FLAGS) -o $@ $(SRC_DIR.n2.api.pfe)/N2_Python.i
$(RM) $(SRC_DIR)/N2_Python.py
$(PFE_DIR)/N2_Python.py: $(SRC_DIR.n2.api.pfe)/N2_Python.i $(INC_DIR)/SS_Python.i
$(SWIG_BIN) $(SWIG_FLAGS) -o $(PFE_DIR)/N2_Python.cc $(SRC_DIR.n2.api.pfe)/N2_Python.i
$(RM) $(PFE_DIR)/N2_Python.cc
$(OBJ_DIR.n2.api.pfe)/src/N2_Python.o: $(SRC_DIR.n2.api.pfe)/N2_Python.py
$(INC_DIR)/%: $(SRC_DIR.n2.api.pfe)/%
$(TARGET_MKDIR)
$(CP) -f $< $@
$(PFE_DIR)/%: $(SRC_DIR.n2.api.pfe)/%
$(TARGET_MKDIR)
$(CP) -f $< $@
$(OBJ_DIR)/N2_Python.o: $(SRC_DIR)/N2_Python.cc
$(TARGET_MKDIR)
$(CC_BIN) $(CC_FLAGS) -I$(PY_INC) -I$(SPIX_INC) -c -o $@ $(SRC_DIR)/N2_Python.cc
$(OBJ_DIR.n2.api.pfe)/%.o: $(SRC_DIR.n2.api.pfe)/%.cc
$(TARGET_MKDIR)
$(CC_BIN) $(CC_FLAGS) -I$(PY_INC) -c -o $@ $<
$(PFE_DIR)/_N2_Python.so: $(LIB_DIR)/$(LIBPRE)n2$(LIBPFE).so
$(RM) -f $(PFE_DIR)/_N2_Python.so
$(LN) -s ../lib/$(LIBPRE)n2$(LIBPFE).so $@
$(PFE_DIR)/N2_Model.py: $(BIN_DIR.ss.api.pfe)/SS_Model.py
PYTHONPATH=$(PYTHONPATH) $(PY_BIN) $(BIN_DIR.ss.api.pfe)/sed.py $(BIN_DIR.ss.api.pfe)/SS_Model.py '[ARCH:N2,ARCH-VF:N2]' $@
$(SRC_DIR.n2.api.pfe):
@if [ ! -d $@ ] ; then $(MKDIR) -p $@ ; fi
$(LIB_DIR)/$(LIBPRE)n2$(LIBPFE).so:\
$(BUILD_DIRS)\
$(LIB_DIR)/$(LIBPRE)n2$(LIBCPU).so\
$(PFE_DIR)/_Pfe_Conversion.so\
$(PFE_BUILD.fw.api.pfe)\
$(PFE_BUILD.ss.api.pfe)\
$(PFE_BUILD.n2.api.pfe)\
$(OBJ_BUILD.ss.api.pfe)\
$(OBJ_BUILD.n2.api.pfe)
$(LD_BIN) $(LD_FLAGS) -o $@\
$(OBJ_BUILD.ss.api.pfe)\
$(OBJ_BUILD.n2.api.pfe)\
$(SPIX_LIB)/libspix_sparc.a\
-l$(LIBNAME)n2$(LIBCPU)\
-lCstd