[PATCH -perfbook 1/6] CodeSamples: Put $(GCC_ARGS) in cc argument list

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



There are a couple of Makefiles who don't have $(GCC_ARGS) in cc command
lines.  If you say:  

    make GCC_ARGS="-g -Wall -O0"

, the arguments are simply ignored by them.

Fill it in for ease of experiments/testing of compiler flags.

Signed-off-by: Akira Yokosawa <akiyks@xxxxxxxxx>
---
 CodeSamples/intro/Makefile   | 12 ++++++------
 CodeSamples/locking/Makefile |  6 +++---
 2 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/CodeSamples/intro/Makefile b/CodeSamples/intro/Makefile
index c7be0cb3..a6ca32d8 100644
--- a/CodeSamples/intro/Makefile
+++ b/CodeSamples/intro/Makefile
@@ -15,22 +15,22 @@ endif
 include $(top)/recipes.mk
 
 initrace: initrace.c ../api.h
-	cc -g -Wall -o initrace initrace.c -lpthread
+	cc -g -Wall $(GCC_ARGS) -o initrace initrace.c -lpthread
 
 initraceperf: initraceperf.c ../api.h
-	cc -g -Wall -o initraceperf initraceperf.c -lpthread
+	cc -g -Wall $(GCC_ARGS) -o initraceperf initraceperf.c -lpthread
 
 lockinc: lockinc.c ../api.h
-	cc -g -Wall -o lockinc lockinc.c -lpthread
+	cc -g -Wall $(GCC_ARGS) -o lockinc lockinc.c -lpthread
 
 nakedinc: nakedinc.c ../api.h
-	cc -g -Wall -o nakedinc nakedinc.c -lpthread
+	cc -g -Wall $(GCC_ARGS) -o nakedinc nakedinc.c -lpthread
 
 perthreadinc: perthreadinc.c ../api.h
-	cc -g -Wall -o perthreadinc perthreadinc.c -lpthread
+	cc -g -Wall $(GCC_ARGS) -o perthreadinc perthreadinc.c -lpthread
 
 threadcreate: threadcreate.c ../api.h
-	cc -g -Wall -o threadcreate threadcreate.c -lpthread
+	cc -g -Wall $(GCC_ARGS) -o threadcreate threadcreate.c -lpthread
 
 clean:
 	rm -f $(PROGS)
diff --git a/CodeSamples/locking/Makefile b/CodeSamples/locking/Makefile
index cf600636..8f6a382a 100644
--- a/CodeSamples/locking/Makefile
+++ b/CodeSamples/locking/Makefile
@@ -15,13 +15,13 @@ endif
 include $(top)/recipes.mk
 
 locked_list: locked_list.c ../api.h
-	cc -g -Wall -o locked_list locked_list.c
+	cc -g -Wall $(GCC_ARGS) -o locked_list locked_list.c
 
 xchglock: xchglock.c ../api.h
-	cc -g -Wall -o xchglock xchglock.c -lpthread
+	cc -g -Wall $(GCC_ARGS) -o xchglock xchglock.c -lpthread
 
 rec_tree_itr: rec_tree_itr.c ../api.h
-	cc -g -Wall -o rec_tree_itr rec_tree_itr.c -lpthread
+	cc -g -Wall $(GCC_ARGS) -o rec_tree_itr rec_tree_itr.c -lpthread
 
 clean:
 	rm -f $(PROGS)
-- 
2.34.1






[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux