Commit | Line | Data |
---|---|---|
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 | ||
30 | COREINSTNS=execinstns.c | |
31 | ifdef REMOVEMACROS | |
32 | CCCOREINSTNS=dem-execinstns.c | |
33 | MADESRCS+=$(CCCOREINSTNS) | |
34 | else | |
35 | CCCOREINSTNS=execinstns.c | |
36 | endif | |
37 | ||
38 | INSTNIMPL+=$(CCCOREINSTNS) | |
39 | ||
40 | CORESRCS=\ | |
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 | ||
53 | MADESRCS+=execinstns.h | |
54 | ||
55 | COREOBJS=$(CORESRCS:%.c=%.o) execkern_dh.o | |
56 | ||
57 | OBJS+=$(COREOBJS) | |
58 | ||
59 | execinstns.h : $(COREINSTNS) | |
60 | ./implhdr $< decoded_impl_ $@ | |
61 | ||
62 | ||
63 | EXECKERN_SUPPRESSED_ERRORS=-erroff=E_LOOP_NOT_ENTERED_AT_TOP | |
64 | ||
65 | execkern.o : execkern.c | |
66 | $(CC) $(CFLAGS) $(CPPFLAGS) $(EXECKERN_SUPPRESSED_ERRORS) -c -o $@ $^ | |
67 | ||
68 | execkern_dh.o : execkern.c | |
69 | $(CC) $(CFLAGS) $(CPPFLAGS) $(EXECKERN_SUPPRESSED_ERRORS) -DDEBUG_HOOK_LOOP -c -o $@ $^ | |
70 | ||
71 | execinstns.o : execinstns.h | |
72 | ||
73 | execinstns.o : execinstns.c | |
74 | $(CC) $(CFLAGS) $(CPPFLAGS) -c $< -o $@ | |
75 | ||
76 | dem-execinstns.c : execinstns.h | |
77 | ||
78 | dem-execinstns.c : execinstns.c | |
79 | echo $(COREOBJS) | |
80 | $(CC) $(CFLAGS) $(CPPFLAGS) -E $< > /tmp/prep-$@ | |
81 | code-tidy < /tmp/prep-$@ > $@ |