summaryrefslogtreecommitdiff
path: root/util/m5/Makefile.thumb
diff options
context:
space:
mode:
Diffstat (limited to 'util/m5/Makefile.thumb')
-rw-r--r--util/m5/Makefile.thumb17
1 files changed, 13 insertions, 4 deletions
diff --git a/util/m5/Makefile.thumb b/util/m5/Makefile.thumb
index 9848f5d93..5e34e77af 100644
--- a/util/m5/Makefile.thumb
+++ b/util/m5/Makefile.thumb
@@ -47,12 +47,17 @@ endif
CC=$(CROSS_COMPILE)gcc
AS=$(CROSS_COMPILE)as
LD=$(CROSS_COMPILE)ld
+AR=$(CROSS_COMPILE)ar
#CFLAGS=-O2 -march=armv7 -mthumb
CFLAGS=-O2 -mthumb
-OBJS=m5.o m5op_arm.o
+LDFLAGS=-L. -lm5
-all: m5
+OBJS=m5.o
+LIB_OBJS=m5op_arm.o
+
+
+all: libm5.a m5
%.o: %.S
$(CC) $(CFLAGS) -o $@ -c $<
@@ -61,7 +66,11 @@ all: m5
$(CC) $(CFLAGS) -o $@ -c $<
m5: $(OBJS)
- $(CC) -o $@ -march=armv7 -mthumb $(OBJS)
+ $(CC) -o $@ -march=armv7 -mthumb $(OBJS) $(LDFLAGS)
+
+libm5.a: $(LIB_OBJS)
+ $(AR) rcs $@ $<
+
clean:
- rm -f *.o m5
+ rm -f *.o m5 libm5.a