diff options
author | Uwe Kleine-König <u.kleine-koenig@pengutronix.de> | 2012-10-16 00:26:44 +0200 |
---|---|---|
committer | John Kacur <jkacur@redhat.com> | 2012-10-17 00:22:11 +0200 |
commit | dfcef6e557b7980a33aa30b45bde196ed1780eb1 (patch) | |
tree | 51b9ad8e9e8993c6cffd843e244b714e817e2766 | |
parent | 954e01fe14374466964bed63769cfcf6a98f2aa1 (diff) | |
download | rt-tests-dfcef6e557b7980a33aa30b45bde196ed1780eb1.tar.gz |
rt-tests Makefile: separate CFLAGS and CPPFLAGS
For compilation to work
-D_GNU_SOURCE -Isrc/include
is needed to be passed to the compiler. For Debian packaging several
things are added but not these two from above. So be a bit more friendly
and add them unconditionally. There is no harm if they are included in
the user supplied CFLAGS and so passed twice.
Moreover be a bit more correct about CFLAGS/CPPFLAGS. Both should be
passed to the compiler with CFLAGS taking options for the compiler and
CPPFLAGS taking options for the preprocessor. This is also needed for
Debian packaging where the helper scripts set CPPFLAGS.
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: John Kacur <jkacur@redhat.com>
-rw-r--r-- | Makefile | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -20,7 +20,8 @@ ifneq ($(filter x86_64 i386 ia64 mips powerpc,$(machinetype)),) NUMA := 1 endif -CFLAGS ?= -D_GNU_SOURCE -Wall -Wno-nonnull -Isrc/include +CFLAGS ?= -Wall -Wno-nonnull +CPPFLAGS += -D_GNU_SOURCE -Isrc/include LDFLAGS ?= PYLIB := $(shell python -c 'import distutils.sysconfig; print distutils.sysconfig.get_python_lib()') @@ -49,7 +50,7 @@ VPATH += src/lib VPATH += src/hackbench %.o: %.c - $(CC) -D VERSION_STRING=$(VERSION_STRING) -c $< $(CFLAGS) + $(CC) -D VERSION_STRING=$(VERSION_STRING) -c $< $(CFLAGS) $(CPPFLAGS) # Pattern rule to generate dependency files from .c files %.d: %.c |