Makefile revision 8012:2f71125bf413
1#Copyright (c) 2003, 2004
2#The Regents of The University of Michigan
3#All Rights Reserved
4#
5#This code is part of the M5 simulator, developed by Nathan Binkert,
6#Erik Hallnor, Steve Raasch, and Steve Reinhardt, with contributions
7#from Ron Dreslinski, Dave Greene, Lisa Hsu, Ali Saidi, and Andrew
8#Schultz.
9#
10#Permission is granted to use, copy, create derivative works and
11#redistribute this software and such derivative works for any purpose,
12#so long as the copyright notice above, this grant of permission, and
13#the disclaimer below appear in all copies made; and so long as the
14#name of The University of Michigan is not used in any advertising or
15#publicity pertaining to the use or distribution of this software
16#without specific, written prior authorization.
17#
18#THIS SOFTWARE IS PROVIDED AS IS, WITHOUT REPRESENTATION FROM THE
19#UNIVERSITY OF MICHIGAN AS TO ITS FITNESS FOR ANY PURPOSE, AND WITHOUT
20#WARRANTY BY THE UNIVERSITY OF MICHIGAN OF ANY KIND, EITHER EXPRESS OR
21#IMPLIED, INCLUDING WITHOUT LIMITATION THE IMPLIED WARRANTIES OF
22#MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE REGENTS OF
23#THE UNIVERSITY OF MICHIGAN SHALL NOT BE LIABLE FOR ANY DAMAGES,
24#INCLUDING DIRECT, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
25#DAMAGES, WITH RESPECT TO ANY CLAIM ARISING OUT OF OR IN CONNECTION
26#WITH THE USE OF THE SOFTWARE, EVEN IF IT HAS BEEN OR IS HEREAFTER
27#ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
28
29#Makefile for palcode
30#Works on alpha-linux and builds elf executable
31
32### If we are not compiling on an alpha, we must use cross tools ###    
33ifneq ($(ARCHNAME), alpha)
34CROSS_COMPILE?=alpha-unknown-linux-gnu-
35endif
36CC=$(CROSS_COMPILE)gcc
37AS=$(CROSS_COMPILE)as
38LD=$(CROSS_COMPILE)ld
39
40CFLAGS=-I . -I ../h -D SIMOS -D BUILD_PALCODE -nostdinc -nostdinc++ -Wa,-m21164
41LDFLAGS=-Ttext 0x4000
42
43TLOBJS = osfpal.o  platform_tlaser.o
44TLOBJS_COPY = osfpal_cache_copy.o osfpal_cache_copy_unaligned.o
45TSOBJS = osfpal.o platform_m5.o
46TSBOBJS = osfpal.o platform_m5b.o
47TSOBJS_COPY = osfpal_cache_copy.o osfpal_cache_copy_unaligned.o
48
49%.o: %.S
50	$(CC) $(CFLAGS) -o $@ -c $<
51
52all: tsunami tsunami_b64
53	
54platform_m5b.o: platform_m5.S
55	$(CC) $(CFLAGS) -DBIG_TSUNAMI -o $@ -c $<
56	
57tlaser:  $(TLOBJS)
58	$(LD) $(LDFLAGS) -o tl_osfpal osfpal.o platform_tlaser.o
59
60tlaser_copy: $(TLOBJS_COPY) $(TLOBJS)
61	$(LD) $(LDFLAGS) -o tl_osfpal_cache osfpal_cache_copy.o platform_tlaser.o
62	$(LD) $(LDFLAGS) -o tl_osfpal_unalign osfpal_cache_copy_unaligned.o platform_tlaser.o
63
64tsunami: $(TSOBJS)
65	$(LD) $(LDFLAGS) -o ts_osfpal osfpal.o platform_m5.o
66
67tsunami_b64: $(TSBOBJS)
68	$(LD) $(LDFLAGS) -o tsb_osfpal osfpal.o platform_m5b.o
69
70tsunami_copy: $(TSOBJS) $(TSOBJS_COPY)
71	$(LD) $(LDFLAGS) -o ts_osfpal_cache  osfpal_cache_copy.o platform_m5.o
72	$(LD) $(LDFLAGS) -o ts_osfpal_unalign osfpal_cache_copy_unaligned.o platform_m5.o
73
74clean:
75	rm -f *.o tl_osfpal tl_osfpal_cache tl_osfpal_unalign ts_osfpal \
76	ts_osfpal_cache ts_osfpal_unalign tsb_osfpal
77