Makefile revision 8012
12139SN/A#Copyright (c) 2005 
22139SN/A#The Regents of The University of Michigan
32139SN/A#All Rights Reserved
42139SN/A#
52139SN/A#This code is part of the M5 simulator, developed by Nathan Binkert,
62139SN/A#Erik Hallnor, Steve Raasch, and Steve Reinhardt, with contributions
72139SN/A#from Ron Dreslinski, Dave Greene, Lisa Hsu, Ali Saidi, and Andrew
82139SN/A#Schultz.
92139SN/A#
102139SN/A#Permission is granted to use, copy, create derivative works and
112139SN/A#redistribute this software and such derivative works for any purpose,
122139SN/A#so long as the copyright notice above, this grant of permission, and
132139SN/A#the disclaimer below appear in all copies made; and so long as the
142139SN/A#name of The University of Michigan is not used in any advertising or
152139SN/A#publicity pertaining to the use or distribution of this software
162139SN/A#without specific, written prior authorization.
172139SN/A#
182139SN/A#THIS SOFTWARE IS PROVIDED AS IS, WITHOUT REPRESENTATION FROM THE
192139SN/A#UNIVERSITY OF MICHIGAN AS TO ITS FITNESS FOR ANY PURPOSE, AND WITHOUT
202139SN/A#WARRANTY BY THE UNIVERSITY OF MICHIGAN OF ANY KIND, EITHER EXPRESS OR
212139SN/A#IMPLIED, INCLUDING WITHOUT LIMITATION THE IMPLIED WARRANTIES OF
222139SN/A#MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE REGENTS OF
232139SN/A#THE UNIVERSITY OF MICHIGAN SHALL NOT BE LIABLE FOR ANY DAMAGES,
242139SN/A#INCLUDING DIRECT, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
252139SN/A#DAMAGES, WITH RESPECT TO ANY CLAIM ARISING OUT OF OR IN CONNECTION
262139SN/A#WITH THE USE OF THE SOFTWARE, EVEN IF IT HAS BEEN OR IS HEREAFTER
272139SN/A#ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
282665Ssaidi@eecs.umich.edu
292665Ssaidi@eecs.umich.eduDBMENTRY	= fffffc0000010000
302139SN/ACFLAGS=-I . -I ../h -I$(M5)/dev -nostdinc++ -Wa,-m21164
314202Sbinkertn@umich.edu
322139SN/AARCHNAME=$(shell uname -m)
334202Sbinkertn@umich.edu
342152SN/A### If we are not compiling on an alpha, we must use cross tools ###    
352152SN/Aifneq ($(ARCHNAME), alpha)
362139SN/ACROSS_COMPILE?=alpha-unknown-linux-gnu-
372139SN/Aendif
382139SN/ACC=$(CROSS_COMPILE)gcc
392139SN/AAS=$(CROSS_COMPILE)as
402139SN/ALD=$(CROSS_COMPILE)ld
412152SN/A
422152SN/AOBJS=dbmentry.o printf.o paljtokern.o paljtoslave.o
432139SN/ATLOBJS+=$(OBJS) console_tl.o
442139SN/ATSOBJS+=$(OBJS) console_ts.o
452139SN/A
462984Sgblack@eecs.umich.edu### Make sure that the M5 variable is set ###
472439SN/Aifndef M5
483520Sgblack@eecs.umich.edu$(error The M5 variable must be set)
492139SN/Aendif
503565Sgblack@eecs.umich.edu
513170Sstever@eecs.umich.eduall: console_tl console_ts
523806Ssaidi@eecs.umich.edu
532439SN/A%.o: %.S
544182Sgblack@eecs.umich.edu	$(CC) $(CFLAGS) -nostdinc -o $@ -c $<
552460SN/A
563536Sgblack@eecs.umich.educonsole_ts.o: console.c
572439SN/A	$(CC)  -g3 $(CFLAGS) -D _TIME_T -D TSUNAMI -o $@ -c $<
582972Sgblack@eecs.umich.edu
592171SN/Aconsole_tl.o: console.c
602439SN/A	$(CC)  -g3 $(CFLAGS) -D _TIME_T -D TLASER  -o $@ -c $< 
612439SN/A
622170SN/Aprintf.o: printf.c 
632139SN/A	$(CC)  -g3 $(CFLAGS) -o $@ -c $<
642139SN/A
653546Sgblack@eecs.umich.educonsole_ts: $(TSOBJS)
664202Sbinkertn@umich.edu	$(LD) -o console_ts  -N -Ttext $(DBMENTRY) -non_shared $(TSOBJS) -lc
672152SN/A
682152SN/Aconsole_tl: $(TLOBJS)
692152SN/A	$(LD) -o console_tl  -N -Ttext $(DBMENTRY) -non_shared $(TLOBJS) -lc
702152SN/A
712152SN/Aclean:
722152SN/A	rm -f *.o console_t?
732152SN/A