Initial commit of OpenSPARC T2 architecture model.
[OpenSPARC-T2-SAM] / legion / src / simcore / Makefile.inc
CommitLineData
920dae64
AT
1# ========== Copyright Header Begin ==========================================
2#
3# OpenSPARC T2 Processor File: Makefile.inc
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# Copyright 2006 Sun Microsystems, Inc. All rights reserved.
23# Use is subject to license terms.
24#
25# Simulator core makefile
26#
27# ident "@(#)Makefile.inc 1.12 06/10/25 SMI"
28#
29
30COREINSTNS=execinstns.c
31ifdef REMOVEMACROS
32CCCOREINSTNS=dem-execinstns.c
33MADESRCS+=$(CCCOREINSTNS)
34else
35CCCOREINSTNS=execinstns.c
36endif
37
38INSTNIMPL+=$(CCCOREINSTNS)
39
40CORESRCS=\
41 main.c \
42 signals.c \
43 control.c \
44 options.c \
45 dbgrif.c \
46 xicache.c \
47 xdcache.c \
48 execkern.c \
49 breakpoint.c \
50 callback.c \
51 $(CCCOREINSTNS)
52
53MADESRCS+=execinstns.h
54
55COREOBJS=$(CORESRCS:%.c=%.o) execkern_dh.o
56
57OBJS+=$(COREOBJS)
58
59execinstns.h : $(COREINSTNS)
60 ./implhdr $< decoded_impl_ $@
61
62
63EXECKERN_SUPPRESSED_ERRORS=-erroff=E_LOOP_NOT_ENTERED_AT_TOP
64
65execkern.o : execkern.c
66 $(CC) $(CFLAGS) $(CPPFLAGS) $(EXECKERN_SUPPRESSED_ERRORS) -c -o $@ $^
67
68execkern_dh.o : execkern.c
69 $(CC) $(CFLAGS) $(CPPFLAGS) $(EXECKERN_SUPPRESSED_ERRORS) -DDEBUG_HOOK_LOOP -c -o $@ $^
70
71execinstns.o : execinstns.h
72
73execinstns.o : execinstns.c
74 $(CC) $(CFLAGS) $(CPPFLAGS) -c $< -o $@
75
76dem-execinstns.c : execinstns.h
77
78dem-execinstns.c : execinstns.c
79 echo $(COREOBJS)
80 $(CC) $(CFLAGS) $(CPPFLAGS) -E $< > /tmp/prep-$@
81 code-tidy < /tmp/prep-$@ > $@