18029Snate@binkert.org# Copyright (c) 2005 The Regents of The University of Michigan
28029Snate@binkert.org# All rights reserved.
38012Ssaidi@eecs.umich.edu#
48029Snate@binkert.org# Redistribution and use in source and binary forms, with or without
58029Snate@binkert.org# modification, are permitted provided that the following conditions are
68029Snate@binkert.org# met: redistributions of source code must retain the above copyright
78029Snate@binkert.org# notice, this list of conditions and the following disclaimer;
88029Snate@binkert.org# redistributions in binary form must reproduce the above copyright
98029Snate@binkert.org# notice, this list of conditions and the following disclaimer in the
108029Snate@binkert.org# documentation and/or other materials provided with the distribution;
118029Snate@binkert.org# neither the name of the copyright holders nor the names of its
128029Snate@binkert.org# contributors may be used to endorse or promote products derived from
138029Snate@binkert.org# this software without specific prior written permission.
148012Ssaidi@eecs.umich.edu#
158029Snate@binkert.org# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
168029Snate@binkert.org# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
178029Snate@binkert.org# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
188029Snate@binkert.org# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
198029Snate@binkert.org# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
208029Snate@binkert.org# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
218029Snate@binkert.org# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
228029Snate@binkert.org# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
238029Snate@binkert.org# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
248029Snate@binkert.org# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
258029Snate@binkert.org# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
268026Ssaidi@eecs.umich.edu#
278026Ssaidi@eecs.umich.edu# Authors: Nathan L. Binkert
288026Ssaidi@eecs.umich.edu#          Ali G. Saidi
297992Ssaidi@eecs.umich.edu
308030Snate@binkert.org# Point to the M5 diretory so we can get some headers
318030Snate@binkert.orgM5?=../../..
328030Snate@binkert.org
337992Ssaidi@eecs.umich.edu### If we are not compiling on an alpha, we must use cross tools ###    
348013Sbinkertn@umich.eduifneq ($(shell uname -m), alpha)
358012Ssaidi@eecs.umich.eduCROSS_COMPILE?=alpha-unknown-linux-gnu-
367992Ssaidi@eecs.umich.eduendif
378012Ssaidi@eecs.umich.eduCC=$(CROSS_COMPILE)gcc
388012Ssaidi@eecs.umich.eduAS=$(CROSS_COMPILE)as
398012Ssaidi@eecs.umich.eduLD=$(CROSS_COMPILE)ld
407992Ssaidi@eecs.umich.edu
418013Sbinkertn@umich.eduDBMENTRY= fffffc0000010000
428030Snate@binkert.orgCFLAGS=-I . -I ../h -I$(M5)/src/dev/alpha -I$(M5)/util/m5/ -fno-builtin -Wa,-m21164
438024Ssaidi@eecs.umich.eduOBJS=dbmentry.o printf.o paljtokern.o paljtoslave.o console.o m5op.o
448008Ssaidi@eecs.umich.edu
458015Sbinkertn@umich.eduall: console
467977Shsul@eecs.umich.edu
478030Snate@binkert.orgm5op.o: $(M5)/util/m5/m5op_alpha.S
488024Ssaidi@eecs.umich.edu	$(CC) $(CFLAGS) -nostdinc -o $@ -c $<
498024Ssaidi@eecs.umich.edu
508008Ssaidi@eecs.umich.edu%.o: %.S
518008Ssaidi@eecs.umich.edu	$(CC) $(CFLAGS) -nostdinc -o $@ -c $<
527977Shsul@eecs.umich.edu
538015Sbinkertn@umich.edu%.o: %.c
548008Ssaidi@eecs.umich.edu	$(CC)  -g3 $(CFLAGS) -o $@ -c $<
557977Shsul@eecs.umich.edu
568015Sbinkertn@umich.educonsole: $(OBJS)
578015Sbinkertn@umich.edu	$(LD) -o console -N -Ttext $(DBMENTRY) -non_shared $(OBJS) -lc
587977Shsul@eecs.umich.edu
597977Shsul@eecs.umich.educlean:
608015Sbinkertn@umich.edu	rm -f *.o console
61