Makefile.thumb (7732:a2c660de7787) Makefile.thumb (9333:b037944e4908)
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
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
50
51#CFLAGS=-O2 -march=armv7 -mthumb
52CFLAGS=-O2 -mthumb
51
52#CFLAGS=-O2 -march=armv7 -mthumb
53CFLAGS=-O2 -mthumb
53OBJS=m5.o m5op_arm.o
54LDFLAGS=-L. -lm5
54
55
55all: m5
56OBJS=m5.o
57LIB_OBJS=m5op_arm.o
56
58
59
60all: libm5.a m5
61
57%.o: %.S
58 $(CC) $(CFLAGS) -o $@ -c $<
59
60%.o: %.c
61 $(CC) $(CFLAGS) -o $@ -c $<
62
63m5: $(OBJS)
62%.o: %.S
63 $(CC) $(CFLAGS) -o $@ -c $<
64
65%.o: %.c
66 $(CC) $(CFLAGS) -o $@ -c $<
67
68m5: $(OBJS)
64 $(CC) -o $@ -march=armv7 -mthumb $(OBJS)
69 $(CC) -o $@ -march=armv7 -mthumb $(OBJS) $(LDFLAGS)
65
70
71libm5.a: $(LIB_OBJS)
72 $(AR) rcs $@ $<
73
74
66clean:
75clean:
67 rm -f *.o m5
76 rm -f *.o m5 libm5.a