| 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 | $(SRC_DIR)/N2_Python.cc: $(SRC_DIR.n2.api.pfe)/N2_Python.i $(INC_DIR)/SS_Python.i |
| 23 | $(SWIG_BIN) $(SWIG_FLAGS) -o $@ $(SRC_DIR.n2.api.pfe)/N2_Python.i |
| 24 | $(RM) $(SRC_DIR)/N2_Python.py |
| 25 | |
| 26 | $(PFE_DIR)/N2_Python.py: $(SRC_DIR.n2.api.pfe)/N2_Python.i $(INC_DIR)/SS_Python.i |
| 27 | $(SWIG_BIN) $(SWIG_FLAGS) -o $(PFE_DIR)/N2_Python.cc $(SRC_DIR.n2.api.pfe)/N2_Python.i |
| 28 | $(RM) $(PFE_DIR)/N2_Python.cc |
| 29 | |
| 30 | $(OBJ_DIR.n2.api.pfe)/src/N2_Python.o: $(SRC_DIR.n2.api.pfe)/N2_Python.py |
| 31 | |
| 32 | $(INC_DIR)/%: $(SRC_DIR.n2.api.pfe)/% |
| 33 | $(TARGET_MKDIR) |
| 34 | $(CP) -f $< $@ |
| 35 | |
| 36 | $(PFE_DIR)/%: $(SRC_DIR.n2.api.pfe)/% |
| 37 | $(TARGET_MKDIR) |
| 38 | $(CP) -f $< $@ |
| 39 | |
| 40 | $(OBJ_DIR)/N2_Python.o: $(SRC_DIR)/N2_Python.cc |
| 41 | $(TARGET_MKDIR) |
| 42 | $(CC_BIN) $(CC_FLAGS) -I$(PY_INC) -I$(SPIX_INC) -c -o $@ $(SRC_DIR)/N2_Python.cc |
| 43 | |
| 44 | $(OBJ_DIR.n2.api.pfe)/%.o: $(SRC_DIR.n2.api.pfe)/%.cc |
| 45 | $(TARGET_MKDIR) |
| 46 | $(CC_BIN) $(CC_FLAGS) -I$(PY_INC) -c -o $@ $< |
| 47 | |
| 48 | |
| 49 | $(PFE_DIR)/_N2_Python.so: $(LIB_DIR)/$(LIBPRE)n2$(LIBPFE).so |
| 50 | $(RM) -f $(PFE_DIR)/_N2_Python.so |
| 51 | $(LN) -s ../lib/$(LIBPRE)n2$(LIBPFE).so $@ |
| 52 | |
| 53 | $(PFE_DIR)/N2_Model.py: $(BIN_DIR.ss.api.pfe)/SS_Model.py |
| 54 | PYTHONPATH=$(PYTHONPATH) $(PY_BIN) $(BIN_DIR.ss.api.pfe)/sed.py $(BIN_DIR.ss.api.pfe)/SS_Model.py '[ARCH:N2,ARCH-VF:N2]' $@ |
| 55 | |
| 56 | $(SRC_DIR.n2.api.pfe): |
| 57 | @if [ ! -d $@ ] ; then $(MKDIR) -p $@ ; fi |
| 58 | |
| 59 | $(LIB_DIR)/$(LIBPRE)n2$(LIBPFE).so:\ |
| 60 | $(BUILD_DIRS)\ |
| 61 | $(LIB_DIR)/$(LIBPRE)n2$(LIBCPU).so\ |
| 62 | $(PFE_DIR)/_Pfe_Conversion.so\ |
| 63 | $(PFE_BUILD.fw.api.pfe)\ |
| 64 | $(PFE_BUILD.ss.api.pfe)\ |
| 65 | $(PFE_BUILD.n2.api.pfe)\ |
| 66 | $(OBJ_BUILD.ss.api.pfe)\ |
| 67 | $(OBJ_BUILD.n2.api.pfe) |
| 68 | $(LD_BIN) $(LD_FLAGS) -o $@\ |
| 69 | $(OBJ_BUILD.ss.api.pfe)\ |
| 70 | $(OBJ_BUILD.n2.api.pfe)\ |
| 71 | $(SPIX_LIB)/libspix_sparc.a\ |
| 72 | -l$(LIBNAME)n2$(LIBCPU)\ |
| 73 | -lCstd |