Makefile (8012:2f71125bf413) Makefile (8013:2dfcde2e9998)
1#Copyright (c) 2005
2#The Regents of The University of Michigan
3#All Rights Reserved
1# Copyright (c) 2005
2# The Regents of The University of Michigan
3# All Rights Reserved
4#
4#
5#This code is part of the M5 simulator, developed by Nathan Binkert,
6#Erik Hallnor, Steve Raasch, and Steve Reinhardt, with contributions
7#from Ron Dreslinski, Dave Greene, Lisa Hsu, Ali Saidi, and Andrew
8#Schultz.
5# This code is part of the M5 simulator, developed by Nathan Binkert,
6# Erik Hallnor, Steve Raasch, and Steve Reinhardt, with contributions
7# from Ron Dreslinski, Dave Greene, Lisa Hsu, Ali Saidi, and Andrew
8# Schultz.
9#
9#
10#Permission is granted to use, copy, create derivative works and
11#redistribute this software and such derivative works for any purpose,
12#so long as the copyright notice above, this grant of permission, and
13#the disclaimer below appear in all copies made; and so long as the
14#name of The University of Michigan is not used in any advertising or
15#publicity pertaining to the use or distribution of this software
16#without specific, written prior authorization.
10# Permission is granted to use, copy, create derivative works and
11# redistribute this software and such derivative works for any purpose,
12# so long as the copyright notice above, this grant of permission, and
13# the disclaimer below appear in all copies made; and so long as the
14# name of The University of Michigan is not used in any advertising or
15# publicity pertaining to the use or distribution of this software
16# without specific, written prior authorization.
17#
17#
18#THIS SOFTWARE IS PROVIDED AS IS, WITHOUT REPRESENTATION FROM THE
19#UNIVERSITY OF MICHIGAN AS TO ITS FITNESS FOR ANY PURPOSE, AND WITHOUT
20#WARRANTY BY THE UNIVERSITY OF MICHIGAN OF ANY KIND, EITHER EXPRESS OR
21#IMPLIED, INCLUDING WITHOUT LIMITATION THE IMPLIED WARRANTIES OF
22#MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE REGENTS OF
23#THE UNIVERSITY OF MICHIGAN SHALL NOT BE LIABLE FOR ANY DAMAGES,
24#INCLUDING DIRECT, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
25#DAMAGES, WITH RESPECT TO ANY CLAIM ARISING OUT OF OR IN CONNECTION
26#WITH THE USE OF THE SOFTWARE, EVEN IF IT HAS BEEN OR IS HEREAFTER
27#ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
18# THIS SOFTWARE IS PROVIDED AS IS, WITHOUT REPRESENTATION FROM THE
19# UNIVERSITY OF MICHIGAN AS TO ITS FITNESS FOR ANY PURPOSE, AND WITHOUT
20# WARRANTY BY THE UNIVERSITY OF MICHIGAN OF ANY KIND, EITHER EXPRESS OR
21# IMPLIED, INCLUDING WITHOUT LIMITATION THE IMPLIED WARRANTIES OF
22# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE REGENTS OF
23# THE UNIVERSITY OF MICHIGAN SHALL NOT BE LIABLE FOR ANY DAMAGES,
24# INCLUDING DIRECT, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
25# DAMAGES, WITH RESPECT TO ANY CLAIM ARISING OUT OF OR IN CONNECTION
26# WITH THE USE OF THE SOFTWARE, EVEN IF IT HAS BEEN OR IS HEREAFTER
27# ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
28
28
29DBMENTRY = fffffc0000010000
30CFLAGS=-I . -I ../h -I$(M5)/dev -nostdinc++ -Wa,-m21164
31
32ARCHNAME=$(shell uname -m)
33
34### If we are not compiling on an alpha, we must use cross tools ###
29### If we are not compiling on an alpha, we must use cross tools ###
35ifneq ($(ARCHNAME), alpha)
30ifneq ($(shell uname -m), alpha)
36CROSS_COMPILE?=alpha-unknown-linux-gnu-
37endif
38CC=$(CROSS_COMPILE)gcc
39AS=$(CROSS_COMPILE)as
40LD=$(CROSS_COMPILE)ld
41
31CROSS_COMPILE?=alpha-unknown-linux-gnu-
32endif
33CC=$(CROSS_COMPILE)gcc
34AS=$(CROSS_COMPILE)as
35LD=$(CROSS_COMPILE)ld
36
37DBMENTRY= fffffc0000010000
38CFLAGS=-I . -I ../h -I$(M5)/dev -fno-builtin -Wa,-m21164
42OBJS=dbmentry.o printf.o paljtokern.o paljtoslave.o
43TLOBJS+=$(OBJS) console_tl.o
44TSOBJS+=$(OBJS) console_ts.o
45
46### Make sure that the M5 variable is set ###
47ifndef M5
48$(error The M5 variable must be set)
49endif
50
51all: console_tl console_ts
52
53%.o: %.S
54 $(CC) $(CFLAGS) -nostdinc -o $@ -c $<
55
56console_ts.o: console.c
39OBJS=dbmentry.o printf.o paljtokern.o paljtoslave.o
40TLOBJS+=$(OBJS) console_tl.o
41TSOBJS+=$(OBJS) console_ts.o
42
43### Make sure that the M5 variable is set ###
44ifndef M5
45$(error The M5 variable must be set)
46endif
47
48all: console_tl console_ts
49
50%.o: %.S
51 $(CC) $(CFLAGS) -nostdinc -o $@ -c $<
52
53console_ts.o: console.c
57 $(CC) -g3 $(CFLAGS) -D _TIME_T -D TSUNAMI -o $@ -c $<
54 $(CC) -g3 $(CFLAGS) -D TSUNAMI -o $@ -c $<
58
59console_tl.o: console.c
55
56console_tl.o: console.c
60 $(CC) -g3 $(CFLAGS) -D _TIME_T -D TLASER -o $@ -c $<
57 $(CC) -g3 $(CFLAGS) -D TLASER -o $@ -c $<
61
62printf.o: printf.c
63 $(CC) -g3 $(CFLAGS) -o $@ -c $<
64
65console_ts: $(TSOBJS)
58
59printf.o: printf.c
60 $(CC) -g3 $(CFLAGS) -o $@ -c $<
61
62console_ts: $(TSOBJS)
66 $(LD) -o console_ts -N -Ttext $(DBMENTRY) -non_shared $(TSOBJS) -lc
63 $(LD) -o console_ts -N -Ttext $(DBMENTRY) -non_shared $(TSOBJS) -lc
67
68console_tl: $(TLOBJS)
64
65console_tl: $(TLOBJS)
69 $(LD) -o console_tl -N -Ttext $(DBMENTRY) -non_shared $(TLOBJS) -lc
66 $(LD) -o console_tl -N -Ttext $(DBMENTRY) -non_shared $(TLOBJS) -lc
70
71clean:
72 rm -f *.o console_t?
67
68clean:
69 rm -f *.o console_t?