Makefile.arm revision 7732
17732SAli.Saidi@ARM.com# Copyright (c) 2010 ARM Limited
27732SAli.Saidi@ARM.com# All rights reserved.
37732SAli.Saidi@ARM.com#
47732SAli.Saidi@ARM.com# The license below extends only to copyright in the software and shall
57732SAli.Saidi@ARM.com# not be construed as granting a license to any other intellectual
67732SAli.Saidi@ARM.com# property including but not limited to intellectual property relating
77732SAli.Saidi@ARM.com# to a hardware implementation of the functionality of the software
87732SAli.Saidi@ARM.com# licensed hereunder.  You may use the software subject to the license
97732SAli.Saidi@ARM.com# terms below provided that you ensure that this notice is replicated
107732SAli.Saidi@ARM.com# unmodified and in its entirety in all distributions of the software,
117732SAli.Saidi@ARM.com# modified or unmodified, in source code or in binary form.
127732SAli.Saidi@ARM.com#
137732SAli.Saidi@ARM.com# Copyright (c) 2005-2006 The Regents of The University of Michigan
147732SAli.Saidi@ARM.com# All rights reserved.
157732SAli.Saidi@ARM.com#
167732SAli.Saidi@ARM.com# Redistribution and use in source and binary forms, with or without
177732SAli.Saidi@ARM.com# modification, are permitted provided that the following conditions are
187732SAli.Saidi@ARM.com# met: redistributions of source code must retain the above copyright
197732SAli.Saidi@ARM.com# notice, this list of conditions and the following disclaimer;
207732SAli.Saidi@ARM.com# redistributions in binary form must reproduce the above copyright
217732SAli.Saidi@ARM.com# notice, this list of conditions and the following disclaimer in the
227732SAli.Saidi@ARM.com# documentation and/or other materials provided with the distribution;
237732SAli.Saidi@ARM.com# neither the name of the copyright holders nor the names of its
247732SAli.Saidi@ARM.com# contributors may be used to endorse or promote products derived from
257732SAli.Saidi@ARM.com# this software without specific prior written permission.
267732SAli.Saidi@ARM.com#
277732SAli.Saidi@ARM.com# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
287732SAli.Saidi@ARM.com# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
297732SAli.Saidi@ARM.com# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
307732SAli.Saidi@ARM.com# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
317732SAli.Saidi@ARM.com# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
327732SAli.Saidi@ARM.com# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
337732SAli.Saidi@ARM.com# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
347732SAli.Saidi@ARM.com# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
357732SAli.Saidi@ARM.com# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
367732SAli.Saidi@ARM.com# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
377732SAli.Saidi@ARM.com# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
387732SAli.Saidi@ARM.com#
397732SAli.Saidi@ARM.com# Authors: Nathan Binkert
407732SAli.Saidi@ARM.com#          Ali Saidi
417732SAli.Saidi@ARM.com
427732SAli.Saidi@ARM.com### If we are not compiling on an arm, we must use cross tools ###    
437732SAli.Saidi@ARM.comifneq ($(shell uname -m), arm)
447732SAli.Saidi@ARM.comCROSS_COMPILE?=arm-none-linux-gnueabi-
457732SAli.Saidi@ARM.comendif
467732SAli.Saidi@ARM.comCC=$(CROSS_COMPILE)gcc
477732SAli.Saidi@ARM.comAS=$(CROSS_COMPILE)as
487732SAli.Saidi@ARM.comLD=$(CROSS_COMPILE)ld
497732SAli.Saidi@ARM.com
507732SAli.Saidi@ARM.comCFLAGS=-O2 
517732SAli.Saidi@ARM.comOBJS=m5.o m5op_arm.o
527732SAli.Saidi@ARM.com
537732SAli.Saidi@ARM.comall: m5
547732SAli.Saidi@ARM.com
557732SAli.Saidi@ARM.com%.o: %.S
567732SAli.Saidi@ARM.com	$(CC) $(CFLAGS) -o $@ -c $<
577732SAli.Saidi@ARM.com
587732SAli.Saidi@ARM.com%.o: %.c
597732SAli.Saidi@ARM.com	$(CC)  $(CFLAGS) -o $@ -c $<
607732SAli.Saidi@ARM.com
617732SAli.Saidi@ARM.comm5: $(OBJS)
627732SAli.Saidi@ARM.com	$(CC) -o $@ $(OBJS)
637732SAli.Saidi@ARM.com
647732SAli.Saidi@ARM.comclean:
657732SAli.Saidi@ARM.com	rm -f *.o m5
66