Makefile revision 8015
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 398015Sbinkertn@umich.eduOBJS=dbmentry.o printf.o paljtokern.o paljtoslave.o console.o 408008Ssaidi@eecs.umich.edu 417992Ssaidi@eecs.umich.edu### Make sure that the M5 variable is set ### 427992Ssaidi@eecs.umich.eduifndef M5 437992Ssaidi@eecs.umich.edu$(error The M5 variable must be set) 447992Ssaidi@eecs.umich.eduendif 457992Ssaidi@eecs.umich.edu 468015Sbinkertn@umich.eduall: console 477977Shsul@eecs.umich.edu 488008Ssaidi@eecs.umich.edu%.o: %.S 498008Ssaidi@eecs.umich.edu $(CC) $(CFLAGS) -nostdinc -o $@ -c $< 507977Shsul@eecs.umich.edu 518015Sbinkertn@umich.edu%.o: %.c 528008Ssaidi@eecs.umich.edu $(CC) -g3 $(CFLAGS) -o $@ -c $< 537977Shsul@eecs.umich.edu 548015Sbinkertn@umich.educonsole: $(OBJS) 558015Sbinkertn@umich.edu $(LD) -o console -N -Ttext $(DBMENTRY) -non_shared $(OBJS) -lc 567977Shsul@eecs.umich.edu 577977Shsul@eecs.umich.educlean: 588015Sbinkertn@umich.edu rm -f *.o console 59