Makefile revision 8012
112771Sqtt2@cornell.edu#Copyright (c) 2005 
212771Sqtt2@cornell.edu#The Regents of The University of Michigan
312771Sqtt2@cornell.edu#All Rights Reserved
412771Sqtt2@cornell.edu#
512771Sqtt2@cornell.edu#This code is part of the M5 simulator, developed by Nathan Binkert,
612771Sqtt2@cornell.edu#Erik Hallnor, Steve Raasch, and Steve Reinhardt, with contributions
712771Sqtt2@cornell.edu#from Ron Dreslinski, Dave Greene, Lisa Hsu, Ali Saidi, and Andrew
812771Sqtt2@cornell.edu#Schultz.
912771Sqtt2@cornell.edu#
1012771Sqtt2@cornell.edu#Permission is granted to use, copy, create derivative works and
1112771Sqtt2@cornell.edu#redistribute this software and such derivative works for any purpose,
1212771Sqtt2@cornell.edu#so long as the copyright notice above, this grant of permission, and
1312771Sqtt2@cornell.edu#the disclaimer below appear in all copies made; and so long as the
1412771Sqtt2@cornell.edu#name of The University of Michigan is not used in any advertising or
1512771Sqtt2@cornell.edu#publicity pertaining to the use or distribution of this software
1612771Sqtt2@cornell.edu#without specific, written prior authorization.
1712771Sqtt2@cornell.edu#
1812771Sqtt2@cornell.edu#THIS SOFTWARE IS PROVIDED AS IS, WITHOUT REPRESENTATION FROM THE
1912771Sqtt2@cornell.edu#UNIVERSITY OF MICHIGAN AS TO ITS FITNESS FOR ANY PURPOSE, AND WITHOUT
2012771Sqtt2@cornell.edu#WARRANTY BY THE UNIVERSITY OF MICHIGAN OF ANY KIND, EITHER EXPRESS OR
2112771Sqtt2@cornell.edu#IMPLIED, INCLUDING WITHOUT LIMITATION THE IMPLIED WARRANTIES OF
2212771Sqtt2@cornell.edu#MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE REGENTS OF
2312771Sqtt2@cornell.edu#THE UNIVERSITY OF MICHIGAN SHALL NOT BE LIABLE FOR ANY DAMAGES,
2412771Sqtt2@cornell.edu#INCLUDING DIRECT, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
2512771Sqtt2@cornell.edu#DAMAGES, WITH RESPECT TO ANY CLAIM ARISING OUT OF OR IN CONNECTION
2612771Sqtt2@cornell.edu#WITH THE USE OF THE SOFTWARE, EVEN IF IT HAS BEEN OR IS HEREAFTER
2712771Sqtt2@cornell.edu#ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
2812771Sqtt2@cornell.edu
2912771Sqtt2@cornell.eduDBMENTRY	= fffffc0000010000
3012771Sqtt2@cornell.eduCFLAGS=-I . -I ../h -I$(M5)/dev -nostdinc++ -Wa,-m21164
3112771Sqtt2@cornell.edu
3212771Sqtt2@cornell.eduARCHNAME=$(shell uname -m)
3312771Sqtt2@cornell.edu
3412771Sqtt2@cornell.edu### If we are not compiling on an alpha, we must use cross tools ###    
3512771Sqtt2@cornell.eduifneq ($(ARCHNAME), alpha)
3612771Sqtt2@cornell.eduCROSS_COMPILE?=alpha-unknown-linux-gnu-
3712771Sqtt2@cornell.eduendif
3812771Sqtt2@cornell.eduCC=$(CROSS_COMPILE)gcc
3912771Sqtt2@cornell.eduAS=$(CROSS_COMPILE)as
4012771Sqtt2@cornell.eduLD=$(CROSS_COMPILE)ld
4112771Sqtt2@cornell.edu
4212771Sqtt2@cornell.eduOBJS=dbmentry.o printf.o paljtokern.o paljtoslave.o
4312771Sqtt2@cornell.eduTLOBJS+=$(OBJS) console_tl.o
4412771Sqtt2@cornell.eduTSOBJS+=$(OBJS) console_ts.o
4512771Sqtt2@cornell.edu
4612771Sqtt2@cornell.edu### Make sure that the M5 variable is set ###
4712771Sqtt2@cornell.eduifndef M5
4812771Sqtt2@cornell.edu$(error The M5 variable must be set)
4912771Sqtt2@cornell.eduendif
50
51all: console_tl console_ts
52
53%.o: %.S
54	$(CC) $(CFLAGS) -nostdinc -o $@ -c $<
55
56console_ts.o: console.c
57	$(CC)  -g3 $(CFLAGS) -D _TIME_T -D TSUNAMI -o $@ -c $<
58
59console_tl.o: console.c
60	$(CC)  -g3 $(CFLAGS) -D _TIME_T -D TLASER  -o $@ -c $< 
61
62printf.o: printf.c 
63	$(CC)  -g3 $(CFLAGS) -o $@ -c $<
64
65console_ts: $(TSOBJS)
66	$(LD) -o console_ts  -N -Ttext $(DBMENTRY) -non_shared $(TSOBJS) -lc
67
68console_tl: $(TLOBJS)
69	$(LD) -o console_tl  -N -Ttext $(DBMENTRY) -non_shared $(TLOBJS) -lc
70
71clean:
72	rm -f *.o console_t?
73