Makefile revision 8013
18013Sbinkertn@umich.edu# Copyright (c) 2005 
28013Sbinkertn@umich.edu# The Regents of The University of Michigan
38013Sbinkertn@umich.edu# All Rights Reserved
48012Ssaidi@eecs.umich.edu#
58013Sbinkertn@umich.edu# This code is part of the M5 simulator, developed by Nathan Binkert,
68013Sbinkertn@umich.edu# Erik Hallnor, Steve Raasch, and Steve Reinhardt, with contributions
78013Sbinkertn@umich.edu# from Ron Dreslinski, Dave Greene, Lisa Hsu, Ali Saidi, and Andrew
88013Sbinkertn@umich.edu# Schultz.
98012Ssaidi@eecs.umich.edu#
108013Sbinkertn@umich.edu# Permission is granted to use, copy, create derivative works and
118013Sbinkertn@umich.edu# redistribute this software and such derivative works for any purpose,
128013Sbinkertn@umich.edu# so long as the copyright notice above, this grant of permission, and
138013Sbinkertn@umich.edu# the disclaimer below appear in all copies made; and so long as the
148013Sbinkertn@umich.edu# name of The University of Michigan is not used in any advertising or
158013Sbinkertn@umich.edu# publicity pertaining to the use or distribution of this software
168013Sbinkertn@umich.edu# without specific, written prior authorization.
178012Ssaidi@eecs.umich.edu#
188013Sbinkertn@umich.edu# THIS SOFTWARE IS PROVIDED AS IS, WITHOUT REPRESENTATION FROM THE
198013Sbinkertn@umich.edu# UNIVERSITY OF MICHIGAN AS TO ITS FITNESS FOR ANY PURPOSE, AND WITHOUT
208013Sbinkertn@umich.edu# WARRANTY BY THE UNIVERSITY OF MICHIGAN OF ANY KIND, EITHER EXPRESS OR
218013Sbinkertn@umich.edu# IMPLIED, INCLUDING WITHOUT LIMITATION THE IMPLIED WARRANTIES OF
228013Sbinkertn@umich.edu# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE REGENTS OF
238013Sbinkertn@umich.edu# THE UNIVERSITY OF MICHIGAN SHALL NOT BE LIABLE FOR ANY DAMAGES,
248013Sbinkertn@umich.edu# INCLUDING DIRECT, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
258013Sbinkertn@umich.edu# DAMAGES, WITH RESPECT TO ANY CLAIM ARISING OUT OF OR IN CONNECTION
268013Sbinkertn@umich.edu# WITH THE USE OF THE SOFTWARE, EVEN IF IT HAS BEEN OR IS HEREAFTER
278013Sbinkertn@umich.edu# ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
287992Ssaidi@eecs.umich.edu
297992Ssaidi@eecs.umich.edu### If we are not compiling on an alpha, we must use cross tools ###    
308013Sbinkertn@umich.eduifneq ($(shell uname -m), alpha)
318012Ssaidi@eecs.umich.eduCROSS_COMPILE?=alpha-unknown-linux-gnu-
327992Ssaidi@eecs.umich.eduendif
338012Ssaidi@eecs.umich.eduCC=$(CROSS_COMPILE)gcc
348012Ssaidi@eecs.umich.eduAS=$(CROSS_COMPILE)as
358012Ssaidi@eecs.umich.eduLD=$(CROSS_COMPILE)ld
367992Ssaidi@eecs.umich.edu
378013Sbinkertn@umich.eduDBMENTRY= fffffc0000010000
388013Sbinkertn@umich.eduCFLAGS=-I . -I ../h -I$(M5)/dev -fno-builtin -Wa,-m21164
398008Ssaidi@eecs.umich.eduOBJS=dbmentry.o printf.o paljtokern.o paljtoslave.o
408008Ssaidi@eecs.umich.eduTLOBJS+=$(OBJS) console_tl.o
418008Ssaidi@eecs.umich.eduTSOBJS+=$(OBJS) console_ts.o
428008Ssaidi@eecs.umich.edu
437992Ssaidi@eecs.umich.edu### Make sure that the M5 variable is set ###
447992Ssaidi@eecs.umich.eduifndef M5
457992Ssaidi@eecs.umich.edu$(error The M5 variable must be set)
467992Ssaidi@eecs.umich.eduendif
477992Ssaidi@eecs.umich.edu
488003Ssaidi@eecs.umich.eduall: console_tl console_ts
497977Shsul@eecs.umich.edu
508008Ssaidi@eecs.umich.edu%.o: %.S
518008Ssaidi@eecs.umich.edu	$(CC) $(CFLAGS) -nostdinc -o $@ -c $<
527977Shsul@eecs.umich.edu
538003Ssaidi@eecs.umich.educonsole_ts.o: console.c
548013Sbinkertn@umich.edu	$(CC)  -g3 $(CFLAGS) -D TSUNAMI -o $@ -c $<
558003Ssaidi@eecs.umich.edu
568003Ssaidi@eecs.umich.educonsole_tl.o: console.c
578013Sbinkertn@umich.edu	$(CC)  -g3 $(CFLAGS) -D TLASER  -o $@ -c $< 
587977Shsul@eecs.umich.edu
597977Shsul@eecs.umich.eduprintf.o: printf.c 
608008Ssaidi@eecs.umich.edu	$(CC)  -g3 $(CFLAGS) -o $@ -c $<
617977Shsul@eecs.umich.edu
628008Ssaidi@eecs.umich.educonsole_ts: $(TSOBJS)
638013Sbinkertn@umich.edu	$(LD) -o console_ts -N -Ttext $(DBMENTRY) -non_shared $(TSOBJS) -lc
647977Shsul@eecs.umich.edu
658008Ssaidi@eecs.umich.educonsole_tl: $(TLOBJS)
668013Sbinkertn@umich.edu	$(LD) -o console_tl -N -Ttext $(DBMENTRY) -non_shared $(TLOBJS) -lc
677977Shsul@eecs.umich.edu
687977Shsul@eecs.umich.educlean:
698008Ssaidi@eecs.umich.edu	rm -f *.o console_t?
70