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# Chander Sudanthi 427732SAli.Saidi@ARM.com 437732SAli.Saidi@ARM.com### If we are not compiling on an arm, we must use cross tools ### 447732SAli.Saidi@ARM.comifneq ($(shell uname -m), arm) 457732SAli.Saidi@ARM.comCROSS_COMPILE?=arm-none-linux-gnueabi- 467732SAli.Saidi@ARM.comendif 477732SAli.Saidi@ARM.comCC=$(CROSS_COMPILE)gcc 487732SAli.Saidi@ARM.comAS=$(CROSS_COMPILE)as 497732SAli.Saidi@ARM.comLD=$(CROSS_COMPILE)ld 509333Sjames.clarkson@arm.comAR=$(CROSS_COMPILE)ar 517732SAli.Saidi@ARM.com 5213103Skevin.brodsky@arm.com#CFLAGS=-O2 -march=armv7 -mthumb -I../../include 5313103Skevin.brodsky@arm.comCFLAGS=-O2 -mthumb -I../../include 549333Sjames.clarkson@arm.comLDFLAGS=-L. -lm5 557732SAli.Saidi@ARM.com 569333Sjames.clarkson@arm.comOBJS=m5.o 5712464Sjang.hanhwi@gmail.comLIB_OBJS=m5op_arm.o m5_mmap.o 589333Sjames.clarkson@arm.com 599333Sjames.clarkson@arm.comall: libm5.a m5 607732SAli.Saidi@ARM.com 617732SAli.Saidi@ARM.com%.o: %.S 627732SAli.Saidi@ARM.com $(CC) $(CFLAGS) -o $@ -c $< 637732SAli.Saidi@ARM.com 647732SAli.Saidi@ARM.com%.o: %.c 657732SAli.Saidi@ARM.com $(CC) $(CFLAGS) -o $@ -c $< 667732SAli.Saidi@ARM.com 6712464Sjang.hanhwi@gmail.comm5: $(OBJS) libm5.a 689333Sjames.clarkson@arm.com $(CC) -o $@ -march=armv7 -mthumb $(OBJS) $(LDFLAGS) 699333Sjames.clarkson@arm.com 709333Sjames.clarkson@arm.comlibm5.a: $(LIB_OBJS) 7112464Sjang.hanhwi@gmail.com $(AR) rcs $@ $^ 729333Sjames.clarkson@arm.com 737732SAli.Saidi@ARM.com 747732SAli.Saidi@ARM.comclean: 759333Sjames.clarkson@arm.com rm -f *.o m5 libm5.a 76