1# Copyright (c) 2010 ARM Limited 2# All rights reserved. 3# 4# The license below extends only to copyright in the software and shall 5# not be construed as granting a license to any other intellectual 6# property including but not limited to intellectual property relating 7# to a hardware implementation of the functionality of the software 8# licensed hereunder. You may use the software subject to the license --- 33 unchanged lines hidden (view full) --- 42 43### If we are not compiling on an arm, we must use cross tools ### 44ifneq ($(shell uname -m), arm) 45CROSS_COMPILE?=arm-none-linux-gnueabi- 46endif 47CC=$(CROSS_COMPILE)gcc 48AS=$(CROSS_COMPILE)as 49LD=$(CROSS_COMPILE)ld |
50AR=$(CROSS_COMPILE)ar |
51 52#CFLAGS=-O2 -march=armv7 -mthumb 53CFLAGS=-O2 -mthumb |
54LDFLAGS=-L. -lm5 |
55 |
56OBJS=m5.o 57LIB_OBJS=m5op_arm.o |
58 |
59 60all: libm5.a m5 61 |
62%.o: %.S 63 $(CC) $(CFLAGS) -o $@ -c $< 64 65%.o: %.c 66 $(CC) $(CFLAGS) -o $@ -c $< 67 68m5: $(OBJS) |
69 $(CC) -o $@ -march=armv7 -mthumb $(OBJS) $(LDFLAGS) |
70 |
71libm5.a: $(LIB_OBJS) 72 $(AR) rcs $@ $< 73 74 |
75clean: |
76 rm -f *.o m5 libm5.a |