From b175dbee918577818ce84b26dd6bd6f9cdfdc3b7 Mon Sep 17 00:00:00 2001
From: Ludwig Ortmann <ludwig.ortmann@fu-berlin.de>
Date: Sat, 8 Feb 2014 19:42:54 +0100
Subject: [PATCH] update Makefiles to point to all-valgrind target

Header path knowledge is not necessary anymore
---
 examples/ccn-lite-client/HOWTO    |  2 +-
 examples/ccn-lite-client/Makefile | 10 +++-------
 examples/ccn-lite-relay/Makefile  | 10 +++-------
 examples/default/Makefile         | 10 +++-------
 examples/rpl_udp/Makefile         | 10 +++-------
 tests/test_irq/Makefile           |  7 -------
 6 files changed, 13 insertions(+), 36 deletions(-)

diff --git a/examples/ccn-lite-client/HOWTO b/examples/ccn-lite-client/HOWTO
index 5c8bd19f68..863187582e 100644
--- a/examples/ccn-lite-client/HOWTO
+++ b/examples/ccn-lite-client/HOWTO
@@ -2,7 +2,7 @@ simple appserver (all in one shell)
 ====================================================
 
 0. create tap devices: *./cpu/native/tapsetup.sh create 3*
-1. build ccn-lite-client: *CFLAGS="-DHAVE_VALGRIND_VALGRIND_H" make -B clean all*
+1. build ccn-lite-client: *make -B clean all-valgrind*
 2. start: *./bin/native/ccn-lite-client.elf tap0* (valgrind support included)
 3. start ccn thread: *ccn* [enter] (this starts the ccn relay network stack)
 4. start appserver thread: *appserver* [enter] (this starts the userland appserver, which registers for "/riot/appserver/"
diff --git a/examples/ccn-lite-client/Makefile b/examples/ccn-lite-client/Makefile
index d850dbd18b..28680a180d 100644
--- a/examples/ccn-lite-client/Makefile
+++ b/examples/ccn-lite-client/Makefile
@@ -15,13 +15,9 @@ export RIOTBASE ?= $(CURDIR)/../..
 # Uncomment this to enable scheduler statistics for ps:
 #CFLAGS += -DSCHEDSTATISTICS
 
-# If you want to use valgrind, you should recompile native with either
-# HAVE_VALGRIND_H or HAVE_VALGRIND_VALGRIND_H depending on the location
-# of the valgrind header (i.e. <valgrind.h> or <valgrind/valgrind.h>)
-# For more information about the valgrind support of RIOT read:
-# RIOT/cpu/native/README
-#CFLAGS += -DHAVE_VALGRIND_VALGRIND_H
-#CFLAGS += -DHAVE_VALGRIND_H
+# If you want to use native with valgrind, you should recompile native
+# with the target all-valgrind instead of all:
+# make -B clean all-valgrind
 
 # Uncomment this to enable code in RIOT that does safety checking
 # which is not needed in a production environment but helps in the
diff --git a/examples/ccn-lite-relay/Makefile b/examples/ccn-lite-relay/Makefile
index 230e536d0b..96cf6d919e 100644
--- a/examples/ccn-lite-relay/Makefile
+++ b/examples/ccn-lite-relay/Makefile
@@ -15,13 +15,9 @@ export RIOTBASE ?= $(CURDIR)/../..
 # Uncomment this to enable scheduler statistics for ps:
 #CFLAGS += -DSCHEDSTATISTICS
 
-# If you want to use valgrind, you should recompile native with either
-# HAVE_VALGRIND_H or HAVE_VALGRIND_VALGRIND_H depending on the location
-# of the valgrind header (i.e. <valgrind.h> or <valgrind/valgrind.h>)
-# For more information about the valgrind support of RIOT read:
-# RIOT/cpu/native/README
-#CFLAGS += -DHAVE_VALGRIND_VALGRIND_H
-#CFLAGS += -DHAVE_VALGRIND_H
+# If you want to use native with valgrind, you should recompile native
+# with the target all-valgrind instead of all:
+# make -B clean all-valgrind
 
 # Uncomment this to enable code in RIOT that does safety checking
 # which is not needed in a production environment but helps in the
diff --git a/examples/default/Makefile b/examples/default/Makefile
index f5d01c389d..1ac0c27c08 100644
--- a/examples/default/Makefile
+++ b/examples/default/Makefile
@@ -15,13 +15,9 @@ export RIOTBASE ?= $(CURDIR)/../..
 # Uncomment this to enable scheduler statistics for ps:
 #CFLAGS += -DSCHEDSTATISTICS
 
-# If you want to use valgrind, you should recompile native with either
-# HAVE_VALGRIND_H or HAVE_VALGRIND_VALGRIND_H depending on the location
-# of the valgrind header (i.e. <valgrind.h> or <valgrind/valgrind.h>)
-# For more information about the valgrind support of RIOT read:
-# RIOT/cpu/native/README
-#CFLAGS += -DHAVE_VALGRIND_VALGRIND_H
-#CFLAGS += -DHAVE_VALGRIND_H
+# If you want to use native with valgrind, you should recompile native
+# with the target all-valgrind instead of all:
+# make -B clean all-valgrind
 
 # Uncomment this to enable code in RIOT that does safety checking
 # which is not needed in a production environment but helps in the
diff --git a/examples/rpl_udp/Makefile b/examples/rpl_udp/Makefile
index 13048094da..88a3f477c4 100644
--- a/examples/rpl_udp/Makefile
+++ b/examples/rpl_udp/Makefile
@@ -15,13 +15,9 @@ export RIOTBASE ?= $(CURDIR)/../..
 # Uncomment this to enable scheduler statistics for ps:
 #CFLAGS += -DSCHEDSTATISTICS
 
-# If you want to use valgrind, you should recompile native with either
-# HAVE_VALGRIND_H or HAVE_VALGRIND_VALGRIND_H depending on the location
-# of the valgrind header (i.e. <valgrind.h> or <valgrind/valgrind.h>)
-# For more information about the valgrind support of RIOT read:
-# RIOT/cpu/native/README
-#CFLAGS += -DHAVE_VALGRIND_VALGRIND_H
-#CFLAGS += -DHAVE_VALGRIND_H
+# If you want to use native with valgrind, you should recompile native
+# with the target all-valgrind instead of all:
+# make -B clean all-valgrind
 
 # Uncomment this to enable code in RIOT that does safety checking
 # which is not needed in a production environment but helps in the
diff --git a/tests/test_irq/Makefile b/tests/test_irq/Makefile
index 4fc604b6ff..3a7ababb9b 100644
--- a/tests/test_irq/Makefile
+++ b/tests/test_irq/Makefile
@@ -1,6 +1,3 @@
-valgrind: CFLAGS += -g
-valgrind: CFLAGS += -DHAVE_VALGRIND_VALGRIND_H
-
 # name of your project
 export PROJECT = test_irq
 #
@@ -19,7 +16,3 @@ else
 USEMODULE += auto_init
 USEMODULE += hwtimer
 USEMODULE += posix
-
-include $(RIOTBASE)/Makefile.include
-valgrind: all
-endif
-- 
GitLab