# ========== 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 ============================================
$(INC_DIR)/%: $(SRC_DIR.ss.api.pli)/%
$(SRC_DIR)/SS_ConfigLexer.cc: $(SRC_DIR.ss.api.pli)/SS_ConfigLexer.l
$(LEX_BIN) -t $(SRC_DIR.ss.api.pli)/SS_ConfigLexer.l > $@
$(INC_DIR)/SS_ConfigParser.h: $(SRC_DIR.ss.api.pli)/SS_ConfigParser.y
$(YACC_BIN) -d -b $(INC_DIR)/SS_ConfigParser $(SRC_DIR.ss.api.pli)/SS_ConfigParser.y
$(RM) -f $(INC_DIR)/SS_ConfigParser.tab.c
$(MV) -f $(INC_DIR)/SS_ConfigParser.tab.h $@
$(SRC_DIR)/SS_ConfigParser.cc: $(SRC_DIR.ss.api.pli)/SS_ConfigParser.y
$(YACC_BIN) -d -b $(SRC_DIR)/SS_ConfigParser $(SRC_DIR.ss.api.pli)/SS_ConfigParser.y
$(RM) -f $(SRC_DIR)/SS_ConfigParser.tab.h
$(MV) -f $(SRC_DIR)/SS_ConfigParser.tab.c $@
$(TST_DIR.ss.api.pli)/test00:= TARGET=cosim
$(TST_DIR.ss.api.pli)/test00:= MEMORY=memsync
$(TST_DIR.ss.api.pli)/test00:\
$(INC_BUILD.ss.api.memsync)\
$(OBJ_DIR.ss.api.pli)/tst/SS_ConfigParserTest.o
$(CC_BIN) -mt $(CC_FLAGS.$(MODE)) -L$(LIB_DIR) -o $@ \
$(OBJ_DIR.ss.api.pli)/tst/SS_ConfigParserTest.o\
$(TST_DIR.ss.api.pli)/cosim:\
$(TST_DIR.ss.api.pli)/test00
$(TST_DIR.ss.api.pli)/test00 $(TST_DIR.ss.api.pli)/diag.conf > $(TST_DIR.ss.api.pli)/test00.out
diff $(TST_DIR.ss.api.pli)/test00.ref $(TST_DIR.ss.api.pli)/test00.out