summaryrefslogtreecommitdiff
path: root/util/m5/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'util/m5/Makefile')
-rw-r--r--util/m5/Makefile29
1 files changed, 21 insertions, 8 deletions
diff --git a/util/m5/Makefile b/util/m5/Makefile
index f77a6cac3..6e4ad31a3 100644
--- a/util/m5/Makefile
+++ b/util/m5/Makefile
@@ -1,13 +1,26 @@
-all: m5
+AS=as
+CC=cc
+LD=cc
-m5: m5.o m5op.o
- cc -o m5 m5.o m5op.o
+CCFLAGS=-O2
+#LDFLAGS=-non_shared
-m5op.o: m5op.s
- as -o m5op.o m5op.s
+all: m5
-m5.o: m5.c
- cc -c -o m5.o m5.c
+m5: m5op.o m5.o
+ $(LD) $(LDFLAGS) -o $@ $>
+ strip $@
clean:
- @rm -f m5 *.o *~
+ @rm -f m5 *.o *.d *~ .#*
+
+.SUFFIXES:
+.SUFFIXES:.o .c .s
+
+# C Compilation
+.c.o:
+ $(CC) $(CCFLAGS) -o $@ -c $<
+
+# Assembly
+.s.o:
+ $(AS) $(ASFLAGS) -o $@ $<