Makefile revision 8026:680f5c014bed
16157Snate@binkert.org# Copyright (c) 2005 
26157Snate@binkert.org# The Regents of The University of Michigan
36157Snate@binkert.org# All Rights Reserved
46157Snate@binkert.org#
56157Snate@binkert.org# This code is part of the M5 simulator.
66157Snate@binkert.org#
76157Snate@binkert.org# Permission is granted to use, copy, create derivative works and
86157Snate@binkert.org# redistribute this software and such derivative works for any purpose,
96157Snate@binkert.org# so long as the copyright notice above, this grant of permission, and
106157Snate@binkert.org# the disclaimer below appear in all copies made; and so long as the
116157Snate@binkert.org# name of The University of Michigan is not used in any advertising or
126157Snate@binkert.org# publicity pertaining to the use or distribution of this software
136157Snate@binkert.org# without specific, written prior authorization.
146157Snate@binkert.org#
156157Snate@binkert.org# THIS SOFTWARE IS PROVIDED AS IS, WITHOUT REPRESENTATION FROM THE
166157Snate@binkert.org# UNIVERSITY OF MICHIGAN AS TO ITS FITNESS FOR ANY PURPOSE, AND WITHOUT
176157Snate@binkert.org# WARRANTY BY THE UNIVERSITY OF MICHIGAN OF ANY KIND, EITHER EXPRESS OR
186157Snate@binkert.org# IMPLIED, INCLUDING WITHOUT LIMITATION THE IMPLIED WARRANTIES OF
196157Snate@binkert.org# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE REGENTS OF
206157Snate@binkert.org# THE UNIVERSITY OF MICHIGAN SHALL NOT BE LIABLE FOR ANY DAMAGES,
216157Snate@binkert.org# INCLUDING DIRECT, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
226157Snate@binkert.org# DAMAGES, WITH RESPECT TO ANY CLAIM ARISING OUT OF OR IN CONNECTION
236157Snate@binkert.org# WITH THE USE OF THE SOFTWARE, EVEN IF IT HAS BEEN OR IS HEREAFTER
246157Snate@binkert.org# ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
256157Snate@binkert.org#
266157Snate@binkert.org# Authors: Nathan L. Binkert
276157Snate@binkert.org#          Ali G. Saidi
286157Snate@binkert.org
296157Snate@binkert.org### If we are not compiling on an alpha, we must use cross tools ###    
306157Snate@binkert.orgifneq ($(shell uname -m), alpha)
316157Snate@binkert.orgCROSS_COMPILE?=alpha-unknown-linux-gnu-
326157Snate@binkert.orgendif
336157Snate@binkert.orgCC=$(CROSS_COMPILE)gcc
346157Snate@binkert.orgAS=$(CROSS_COMPILE)as
356157Snate@binkert.orgLD=$(CROSS_COMPILE)ld
366157Snate@binkert.org
376157Snate@binkert.orgDBMENTRY= fffffc0000010000
386157Snate@binkert.orgCFLAGS=-I . -I ../h -I$(M5)/dev -I$(M5)/util/m5/ -fno-builtin -Wa,-m21164
396157Snate@binkert.orgOBJS=dbmentry.o printf.o paljtokern.o paljtoslave.o console.o m5op.o
4010133Sandreas.hansson@arm.com
4110133Sandreas.hansson@arm.com### Make sure that the M5 variable is set ###
4210133Sandreas.hansson@arm.comifndef M5
4310133Sandreas.hansson@arm.com$(error The M5 variable must be set)
4410133Sandreas.hansson@arm.comendif
4510133Sandreas.hansson@arm.com
4610133Sandreas.hansson@arm.comall: console
4710133Sandreas.hansson@arm.com
4810133Sandreas.hansson@arm.comm5op.o: $(M5)/util/m5/m5op.S
4910133Sandreas.hansson@arm.com	$(CC) $(CFLAGS) -nostdinc -o $@ -c $<
5010133Sandreas.hansson@arm.com
5110133Sandreas.hansson@arm.com%.o: %.S
5210133Sandreas.hansson@arm.com	$(CC) $(CFLAGS) -nostdinc -o $@ -c $<
5310133Sandreas.hansson@arm.com
5410133Sandreas.hansson@arm.com%.o: %.c
5510133Sandreas.hansson@arm.com	$(CC)  -g3 $(CFLAGS) -o $@ -c $<
5610133Sandreas.hansson@arm.com
5710133Sandreas.hansson@arm.comconsole: $(OBJS)
5810133Sandreas.hansson@arm.com	$(LD) -o console -N -Ttext $(DBMENTRY) -non_shared $(OBJS) -lc
5910133Sandreas.hansson@arm.com
6010133Sandreas.hansson@arm.comclean:
6110133Sandreas.hansson@arm.com	rm -f *.o console
629850Sandreas.hansson@arm.com