util: Do not use $(PWD) in Makefiles
authorKevin Brodsky <kevin.brodsky@arm.com>
Tue, 18 Sep 2018 14:20:04 +0000 (15:20 +0100)
committerCiro Santilli <ciro.santilli@arm.com>
Wed, 26 Sep 2018 13:12:12 +0000 (13:12 +0000)
644e8cdf5ee7 ("util: Move the m5ops.h file to a shared directory")
added include/ to the include path for m5 Makefiles, based on
$(PWD): $(PWD)/../../include.

Unfortunately, this breaks when using `make -C <path>`, as -C does
not move PWD accordingly. The fix is simply to remove $(PWD), as a
relative path is just fine here.

Change-Id: Ia046c29761363b6670e52c52a604c7e70a6a305a
Signed-off-by: Kevin Brodsky <kevin.brodsky@arm.com>
Signed-off-by: Ciro Santilli <ciro.santilli@arm.com>
Reviewed-by: Ciro Santilli <ciro.santilli@arm.com>
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/12844
Reviewed-by: Jason Lowe-Power <jason@lowepower.com>
Maintainer: Jason Lowe-Power <jason@lowepower.com>

util/m5/Makefile.aarch64
util/m5/Makefile.alpha
util/m5/Makefile.arm
util/m5/Makefile.sparc
util/m5/Makefile.thumb
util/m5/Makefile.x86

index 08180665aa9a104916be5313f086978c2827e59d..2e05ac7c63209cc72e79587e7287911691001962 100644 (file)
@@ -55,7 +55,7 @@ JR=jar
 #JDK_PATH=/path/to/jdk/version_number
 
 CFLAGS=-O2 -I $(JDK_PATH)/include/ -I $(JDK_PATH)/include/linux \
-       -I$(PWD)/../../include -march=armv8-a
+       -I../../include -march=armv8-a
 LDFLAGS=-static -L. -lm5
 
 LIB_OBJS=m5op_arm_A64.o m5_mmap.o
index c21f67cf14ee805487789ab68196863fa18b01fd..cb476eae043914af2e047f90bfd6c32c7fb5f0e2 100644 (file)
@@ -35,7 +35,7 @@ CC=$(CROSS_COMPILE)gcc
 AS=$(CROSS_COMPILE)as
 LD=$(CROSS_COMPILE)ld
 
-CFLAGS=-O2 -I$(PWD)/../../include
+CFLAGS=-O2 -I../../include
 OBJS=m5.o m5op_alpha.o m5_mmap.o
 
 all: m5
index 14d73538bb7b59e73c22d63e88e087c3a927383d..e7a26ce9bc67c840836579c8896e5e9462011da8 100644 (file)
@@ -55,7 +55,7 @@ JR=jar
 #JDK_PATH=/path/to/jdk/version_number
 
 CFLAGS=-O2 -I $(JDK_PATH)/include/ -I $(JDK_PATH)/include/linux \
-       -I$(PWD)/../../include -march=armv7-a
+       -I../../include -march=armv7-a
 LDFLAGS=-L. -lm5 -static
 
 LIB_OBJS=m5op_arm.o m5_mmap.o
index e1b17ea2cfaffc12eb4cd35e12e6cd84313e650c..87c3d153236c61ef3a77284f46a12da4ee2712df 100644 (file)
@@ -35,7 +35,7 @@ CC=$(CROSS_COMPILE)gcc
 AS=$(CROSS_COMPILE)as
 LD=$(CROSS_COMPILE)ld
 
-CFLAGS=-O2 -m64 -I$(PWD)/../../include
+CFLAGS=-O2 -m64 -I../../include
 OBJS=m5.o m5op_sparc.o m5_mmap.o
 
 all: m5
index 60b6803b208676e819cce90db4f1208a96aab60a..d117bf0d0cfe1eb7c37bb18c5d9bd675630d4940 100644 (file)
@@ -49,8 +49,8 @@ AS=$(CROSS_COMPILE)as
 LD=$(CROSS_COMPILE)ld
 AR=$(CROSS_COMPILE)ar
 
-#CFLAGS=-O2 -march=armv7 -mthumb -I$(PWD)/../../include
-CFLAGS=-O2 -mthumb -I$(PWD)/../../include
+#CFLAGS=-O2 -march=armv7 -mthumb -I../../include
+CFLAGS=-O2 -mthumb -I../../include
 LDFLAGS=-L. -lm5
 
 OBJS=m5.o
index f56b37c8b2377158430b0e67a5cc379e70b70d56..89f8f923145e43660c30b14ae2cf3ca4aff22e07 100644 (file)
@@ -31,7 +31,7 @@ CC=gcc
 AS=as
 LD=ld
 
-CFLAGS?=-O2 -DM5OP_ADDR=0xFFFF0000 -I$(PWD)/../../include
+CFLAGS?=-O2 -DM5OP_ADDR=0xFFFF0000 -I../../include
 OBJS=m5.o m5op_x86.o m5_mmap.o
 LUA_HEADER_INCLUDE=$(shell pkg-config --cflags-only-I lua51)
 LUA_OBJS=lua_gem5Op.opic m5op_x86.opic m5_mmap.opic