Makefile revision 8029
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
307992Ssaidi@eecs.umich.edu### If we are not compiling on an alpha, we must use cross tools ###    
318013Sbinkertn@umich.eduifneq ($(shell uname -m), alpha)
328012Ssaidi@eecs.umich.eduCROSS_COMPILE?=alpha-unknown-linux-gnu-
337992Ssaidi@eecs.umich.eduendif
348012Ssaidi@eecs.umich.eduCC=$(CROSS_COMPILE)gcc
358012Ssaidi@eecs.umich.eduAS=$(CROSS_COMPILE)as
368012Ssaidi@eecs.umich.eduLD=$(CROSS_COMPILE)ld
377992Ssaidi@eecs.umich.edu
388013Sbinkertn@umich.eduDBMENTRY= fffffc0000010000
398027Ssaidi@eecs.umich.eduCFLAGS=-I . -I ../h -I$(M5)/src/dev -I$(M5)/util/m5/ -fno-builtin -Wa,-m21164
408024Ssaidi@eecs.umich.eduOBJS=dbmentry.o printf.o paljtokern.o paljtoslave.o console.o m5op.o
418008Ssaidi@eecs.umich.edu
427992Ssaidi@eecs.umich.edu### Make sure that the M5 variable is set ###
437992Ssaidi@eecs.umich.eduifndef M5
447992Ssaidi@eecs.umich.edu$(error The M5 variable must be set)
457992Ssaidi@eecs.umich.eduendif
467992Ssaidi@eecs.umich.edu
478015Sbinkertn@umich.eduall: console
487977Shsul@eecs.umich.edu
498024Ssaidi@eecs.umich.edum5op.o: $(M5)/util/m5/m5op.S
508024Ssaidi@eecs.umich.edu	$(CC) $(CFLAGS) -nostdinc -o $@ -c $<
518024Ssaidi@eecs.umich.edu
528008Ssaidi@eecs.umich.edu%.o: %.S
538008Ssaidi@eecs.umich.edu	$(CC) $(CFLAGS) -nostdinc -o $@ -c $<
547977Shsul@eecs.umich.edu
558015Sbinkertn@umich.edu%.o: %.c
568008Ssaidi@eecs.umich.edu	$(CC)  -g3 $(CFLAGS) -o $@ -c $<
577977Shsul@eecs.umich.edu
588015Sbinkertn@umich.educonsole: $(OBJS)
598015Sbinkertn@umich.edu	$(LD) -o console -N -Ttext $(DBMENTRY) -non_shared $(OBJS) -lc
607977Shsul@eecs.umich.edu
617977Shsul@eecs.umich.educlean:
628015Sbinkertn@umich.edu	rm -f *.o console
63