Makefile revision 8024
15584Snate@binkert.org# Copyright (c) 2005 
25584Snate@binkert.org# The Regents of The University of Michigan
35584Snate@binkert.org# All Rights Reserved
45584Snate@binkert.org#
55584Snate@binkert.org# This code is part of the M5 simulator, developed by Nathan Binkert,
65584Snate@binkert.org# Erik Hallnor, Steve Raasch, and Steve Reinhardt, with contributions
75584Snate@binkert.org# from Ron Dreslinski, Dave Greene, Lisa Hsu, Ali Saidi, and Andrew
85584Snate@binkert.org# Schultz.
95584Snate@binkert.org#
105584Snate@binkert.org# Permission is granted to use, copy, create derivative works and
115584Snate@binkert.org# redistribute this software and such derivative works for any purpose,
125584Snate@binkert.org# so long as the copyright notice above, this grant of permission, and
135584Snate@binkert.org# the disclaimer below appear in all copies made; and so long as the
145584Snate@binkert.org# name of The University of Michigan is not used in any advertising or
155584Snate@binkert.org# publicity pertaining to the use or distribution of this software
165584Snate@binkert.org# without specific, written prior authorization.
175584Snate@binkert.org#
185584Snate@binkert.org# THIS SOFTWARE IS PROVIDED AS IS, WITHOUT REPRESENTATION FROM THE
195584Snate@binkert.org# UNIVERSITY OF MICHIGAN AS TO ITS FITNESS FOR ANY PURPOSE, AND WITHOUT
205584Snate@binkert.org# WARRANTY BY THE UNIVERSITY OF MICHIGAN OF ANY KIND, EITHER EXPRESS OR
215584Snate@binkert.org# IMPLIED, INCLUDING WITHOUT LIMITATION THE IMPLIED WARRANTIES OF
225584Snate@binkert.org# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE REGENTS OF
235584Snate@binkert.org# THE UNIVERSITY OF MICHIGAN SHALL NOT BE LIABLE FOR ANY DAMAGES,
245584Snate@binkert.org# INCLUDING DIRECT, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
255584Snate@binkert.org# DAMAGES, WITH RESPECT TO ANY CLAIM ARISING OUT OF OR IN CONNECTION
265584Snate@binkert.org# WITH THE USE OF THE SOFTWARE, EVEN IF IT HAS BEEN OR IS HEREAFTER
275584Snate@binkert.org# ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
285584Snate@binkert.org
295584Snate@binkert.org### If we are not compiling on an alpha, we must use cross tools ###    
305584Snate@binkert.orgifneq ($(shell uname -m), alpha)
315584Snate@binkert.orgCROSS_COMPILE?=alpha-unknown-linux-gnu-
325584Snate@binkert.orgendif
337768SAli.Saidi@ARM.comCC=$(CROSS_COMPILE)gcc
347768SAli.Saidi@ARM.comAS=$(CROSS_COMPILE)as
357768SAli.Saidi@ARM.comLD=$(CROSS_COMPILE)ld
365584Snate@binkert.org
375584Snate@binkert.orgDBMENTRY= fffffc0000010000
385584Snate@binkert.orgCFLAGS=-I . -I ../h -I$(M5)/dev -I$(M5)/util/m5/ -fno-builtin -Wa,-m21164
395584Snate@binkert.orgOBJS=dbmentry.o printf.o paljtokern.o paljtoslave.o console.o m5op.o
405584Snate@binkert.org
415584Snate@binkert.org### Make sure that the M5 variable is set ###
425584Snate@binkert.orgifndef M5
435584Snate@binkert.org$(error The M5 variable must be set)
445584Snate@binkert.orgendif
455584Snate@binkert.org
465584Snate@binkert.orgall: console
475584Snate@binkert.org
485584Snate@binkert.orgm5op.o: $(M5)/util/m5/m5op.S
495584Snate@binkert.org	$(CC) $(CFLAGS) -nostdinc -o $@ -c $<
505584Snate@binkert.org
515584Snate@binkert.org%.o: %.S
52	$(CC) $(CFLAGS) -nostdinc -o $@ -c $<
53
54%.o: %.c
55	$(CC)  -g3 $(CFLAGS) -o $@ -c $<
56
57console: $(OBJS)
58	$(LD) -o console -N -Ttext $(DBMENTRY) -non_shared $(OBJS) -lc
59
60clean:
61	rm -f *.o console
62