Makefile.aarch64 (12157:c27b548bad70) Makefile.aarch64 (12464:a02f2484c710)
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

--- 44 unchanged lines hidden (view full) ---

53JR=jar
54### JDK_PATH must be set to build gem5OpJni
55#JDK_PATH=/path/to/jdk/version_number
56
57CFLAGS=-O2 -I $(JDK_PATH)/include/ -I $(JDK_PATH)/include/linux \
58 -I$(PWD)/../../include -march=armv8-a
59LDFLAGS=-static -L. -lm5
60
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

--- 44 unchanged lines hidden (view full) ---

53JR=jar
54### JDK_PATH must be set to build gem5OpJni
55#JDK_PATH=/path/to/jdk/version_number
56
57CFLAGS=-O2 -I $(JDK_PATH)/include/ -I $(JDK_PATH)/include/linux \
58 -I$(PWD)/../../include -march=armv8-a
59LDFLAGS=-static -L. -lm5
60
61LIB_OBJS=m5op_arm_A64.o
61LIB_OBJS=m5op_arm_A64.o m5_mmap.o
62OBJS=m5.o
63JNI_OBJS=m5op_arm_A64.o jni_gem5Op.o
62OBJS=m5.o
63JNI_OBJS=m5op_arm_A64.o jni_gem5Op.o
64LUA_OBJS=lua_gem5Op.o m5op_arm_A64.o m5_mmap.o
64
65
66### Need to install lua5.1 library to compile gem5OpLua.so
67LUA_HEADER_INCLUDE=$(shell pkg-config --cflags lua51) -I/usr/include/x86_64-linux-gnu
68
65all: libm5.a m5
66
67%.o: %.S
68 $(CC) $(CFLAGS) -o $@ -c $<
69
70%.o: %.c
71 $(CC) $(CFLAGS) -o $@ -c $<
72
73m5: $(OBJS) libm5.a
69all: libm5.a m5
70
71%.o: %.S
72 $(CC) $(CFLAGS) -o $@ -c $<
73
74%.o: %.c
75 $(CC) $(CFLAGS) -o $@ -c $<
76
77m5: $(OBJS) libm5.a
74 $(CC) -o $@ $(OBJS) $(LDFLAGS)
78 $(CC) -o $@ $^ $(LDFLAGS)
75
76libm5.a: $(LIB_OBJS)
79
80libm5.a: $(LIB_OBJS)
77 $(AR) rcs $@ $<
81 $(AR) rcs $@ $^
78
79gem5OpJni: gem5OpJni.jar $(JNI_OBJS)
80 $(CC) --shared -o lib$@.so $(JNI_OBJS)
81
82gem5OpJni.jar:
83 $(JC) jni/gem5Op.java; \
84 $(JH) jni.gem5Op; \
85 $(JR) cvf $@ jni/*.class
86
82
83gem5OpJni: gem5OpJni.jar $(JNI_OBJS)
84 $(CC) --shared -o lib$@.so $(JNI_OBJS)
85
86gem5OpJni.jar:
87 $(JC) jni/gem5Op.java; \
88 $(JH) jni.gem5Op; \
89 $(JR) cvf $@ jni/*.class
90
91lua_gem5Op.o: lua_gem5Op.c
92 $(CC) $(CFLAGS) $(LUA_HEADER_INCLUDE) -o $@ -c $<
93
94gem5OpLua.so: $(LUA_OBJS)
95 $(CC) $(CFLAGS) $^ -o $@ -shared
96
87clean:
97clean:
88 rm -f *.o m5 libgemOpJni.so gem5OpJni.jar jni/*.class libm5.a
98 rm -f *.o m5 libgem5OpJni.so gem5OpJni.jar jni/*.class libm5.a gem5OpLua.so