Makefile (8012:2f71125bf413) Makefile (8013:2dfcde2e9998)
1#Copyright (c) 2003, 2004
2#The Regents of The University of Michigan
3#All Rights Reserved
1# Copyright (c) 2003, 2004
2# The Regents of The University of Michigan
3# All Rights Reserved
4#
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.
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#
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.
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#
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.
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
28
29#Makefile for palcode
30#Works on alpha-linux and builds elf executable
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 ###
31
32### If we are not compiling on an alpha, we must use cross tools ###
33ifneq ($(ARCHNAME), alpha)
33ifneq ($(shell uname -m), alpha)
34CROSS_COMPILE?=alpha-unknown-linux-gnu-
35endif
36CC=$(CROSS_COMPILE)gcc
37AS=$(CROSS_COMPILE)as
38LD=$(CROSS_COMPILE)ld
39
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
40CFLAGS=-I . -I ../h -nostdinc -nostdinc++ -Wa,-m21164
41LDFLAGS=-Ttext 0x4000
42
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
43TLOBJS = osfpal.o platform_tlaser.o
44TLOBJS_COPY = osfpal_cache_copy.o platform_tlaser.o
45TLOBJS_COPY_UNALIGNED = osfpal_cache_copy_unaligned.o platform_tlaser.o
46TSOBJS = osfpal.o platform_tsunami.o
47TSBOBJS = osfpal.o platform_bigtsunami.o
48TSOBJS_COPY = osfpal_cache_copy.o platform_tsunami.o
49TSOBJS_COPY_UNALIGNED = osfpal_cache_copy_unaligned.o platform_bigtsunami.o
48
50
49%.o: %.S
51all: tlaser tsunami tsunami_b64
52
53all_copy: tlaser tlaser_copy tsunami tsunami_b64 tsunami_copy
54
55osfpal.o: osfpal.S
50 $(CC) $(CFLAGS) -o $@ -c $<
51
56 $(CC) $(CFLAGS) -o $@ -c $<
57
52all: tsunami tsunami_b64
53
54platform_m5b.o: platform_m5.S
58osfpal_cache_copy.o: osfpal.S
59 $(CC) $(CFLAGS) -DCACHE_COPY -o $@ -c $<
60
61osfpal_cache_copy_unaligned.o: osfpal.S
62 $(CC) $(CFLAGS) -DCACHE_COPY -DCACHE_COPY_UNALIGNED -o $@ -c $<
63
64platform_tlaser.o: platform.S
65 $(CC) $(CFLAGS) -DTLASER -o $@ -c $<
66
67platform_tsunami.o: platform.S
68 $(CC) $(CFLAGS) -DTSUNAMI -o $@ -c $<
69
70platform_bigtsunami.o: platform.S
55 $(CC) $(CFLAGS) -DBIG_TSUNAMI -o $@ -c $<
71 $(CC) $(CFLAGS) -DBIG_TSUNAMI -o $@ -c $<
56
72
57tlaser: $(TLOBJS)
73tlaser: $(TLOBJS)
58 $(LD) $(LDFLAGS) -o tl_osfpal osfpal.o platform_tlaser.o
74 $(LD) $(LDFLAGS) -o tl_osfpal $(TLOBJS)
59
75
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
76tlaser_copy: $(TLOBJS_COPY) $(TLOBJS_COPY_UNALIGNED)
77 $(LD) $(LDFLAGS) -o tl_osfpal_cache $(TLOBJS_COPY)
78 $(LD) $(LDFLAGS) -o tl_osfpal_unalign $(TLOBJS_COPY_UNALIGNED)
63
64tsunami: $(TSOBJS)
79
80tsunami: $(TSOBJS)
65 $(LD) $(LDFLAGS) -o ts_osfpal osfpal.o platform_m5.o
81 $(LD) $(LDFLAGS) -o ts_osfpal $(TSOBJS)
66
67tsunami_b64: $(TSBOBJS)
82
83tsunami_b64: $(TSBOBJS)
68 $(LD) $(LDFLAGS) -o tsb_osfpal osfpal.o platform_m5b.o
84 $(LD) $(LDFLAGS) -o tsb_osfpal $(TSBOBJS)
69
85
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
86tsunami_copy: $(TSOBJS_COPY) $(TSOBJS_COPY_UNALIGNED)
87 $(LD) $(LDFLAGS) -o ts_osfpal_cache $(TSOBJS_COPY)
88 $(LD) $(LDFLAGS) -o ts_osfpal_unalign $(TSOBJS_COPY_UNALIGNED)
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
89
90clean:
91 rm -f *.o tl_osfpal tl_osfpal_cache tl_osfpal_unalign ts_osfpal \
92 ts_osfpal_cache ts_osfpal_unalign tsb_osfpal