linux-acpi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: malattia@linux.it
To: Robert Moore <Robert.Moore@intel.com>
Cc: Len Brown <lenb@kernel.org>,
	linux-acpi@vger.kernel.org, Mattia Dongili <malattia@linux.it>
Subject: [patch 1/5] allow overriding only some of the CFLAGS
Date: Sun, 04 Jul 2010 13:43:33 +0900	[thread overview]
Message-ID: <20100704044450.507083526@linux.it> (raw)
In-Reply-To: 20100704044332.573836359@linux.it

[-- Attachment #1: overridable_cflags.patch --]
[-- Type: text/plain, Size: 3017 bytes --]

Signed-off-by: Mattia Dongili <malattia@linux.it>
---
 compiler/Makefile         |    6 +++++-
 tools/acpiexec/Makefile   |    6 +++++-
 tools/acpisrc/Makefile    |    5 ++++-
 tools/acpixtract/Makefile |    5 ++++-
 4 files changed, 18 insertions(+), 4 deletions(-)

Index: b/compiler/Makefile
===================================================================
--- a/compiler/Makefile	2010-07-02 21:42:26.849349488 +0900
+++ b/compiler/Makefile	2010-07-04 11:18:15.830519370 +0900
@@ -125,7 +125,8 @@
 	../osunixxf.c
 
 NOMAN=	YES
-CFLAGS+= -Wall -O2 -Wstrict-prototypes -D_LINUX -DACPI_ASL_COMPILER -I../include -I../compiler
+MK_CFLAGS = -DACPI_ASL_COMPILER -I../include -I../compiler
+CFLAGS= -Wall -Wstrict-prototypes -O2
 
 #YACC=	yacc
 YACC=	bison
@@ -141,6 +142,9 @@
 
 LDLIBS = -lpthread -lrt
 
+%.o: %.c
+	$(CC) $(MK_CFLAGS) $(CFLAGS) -c -o $@ $<
+
 aslmain : $(patsubst %.c,%.o, $(SRCS))
 	$(CC) $(LDFLAGS) $(patsubst %.c,%.o, $(SRCS)) \
 		$(LOADLIBES) $(LDLIBS) -o iasl
Index: b/tools/acpiexec/Makefile
===================================================================
--- a/tools/acpiexec/Makefile	2010-07-02 21:42:26.893349116 +0900
+++ b/tools/acpiexec/Makefile	2010-07-04 11:18:15.830519370 +0900
@@ -139,8 +139,12 @@
 	../../osunixxf.c
 
 
-CFLAGS+= -Wall -g -D_LINUX -DNDEBUG -D_CONSOLE -DACPI_EXEC_APP -D_MULTI_THREADED -Wstrict-prototypes -I../../include 
+MK_CFLAGS = -DNDEBUG -D_CONSOLE -DACPI_EXEC_APP -D_MULTI_THREADED \
+            -I../../include
+CFLAGS = -Wall -Wstrict-prototypes -O2 -g
 
+%.o: %.c
+	$(CC) $(MK_CFLAGS) $(CFLAGS) -c -o $@ $<
 
 acpiexec : $(patsubst %.c,%.o, $(SRCS))
 	$(CC) $(LDFLAGS) $(patsubst %.c,%.o, $(SRCS)) -lrt -lpthread -o $(PROG)
Index: b/tools/acpisrc/Makefile
===================================================================
--- a/tools/acpisrc/Makefile	2010-07-02 21:42:26.877349353 +0900
+++ b/tools/acpisrc/Makefile	2010-07-04 11:18:15.838518967 +0900
@@ -4,8 +4,11 @@
 SRCS=	ascase.c asconvrt.c asfile.c asmain.c asremove.c astable.c \
         asutils.c osunixdir.c ../../common/getopt.c
 
-CFLAGS+= -Wall -O2 -D_LINUX -DACPI_APPLICATION -Wstrict-prototypes -I../../include 
+MK_CFLAGS= -DACPI_APPLICATION -I../../include
+CFLAGS= -Wall -Wstrict-prototypes -O2
 
+%.o: %.c
+	$(CC) $(MK_CFLAGS) $(CFLAGS) -c -o $@ $<
 
 aslmain : $(patsubst %.c,%.o, $(SRCS))
 	$(CC) $(LDFLAGS) $(patsubst %.c,%.o, $(SRCS)) -o $(PROG)
Index: b/tools/acpixtract/Makefile
===================================================================
--- a/tools/acpixtract/Makefile	2010-07-02 21:42:26.861349031 +0900
+++ b/tools/acpixtract/Makefile	2010-07-04 11:18:15.838518967 +0900
@@ -3,8 +3,11 @@
 PROG=	acpixtract
 SRCS=	acpixtract.c
 
-CFLAGS+= -Wall -O2 -D_LINUX -DACPI_APPLICATION -Wstrict-prototypes -I../../include 
+MK_CFLAGS= -DACPI_APPLICATION -I../../include
+CFLAGS= -Wall -Wstrict-prototypes -O2
 
+%.o: %.c
+	$(CC) $(MK_CFLAGS) $(CFLAGS) -c -o $@ $<
 
 acpixtract : $(patsubst %.c,%.o, $(SRCS))
 	$(CC) $(LDFLAGS) $(patsubst %.c,%.o, $(SRCS)) -o $(PROG)


  reply	other threads:[~2010-07-04  4:56 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-07-04  4:43 [patch 0/5] iASL patches in Debian malattia
2010-07-04  4:43 ` malattia [this message]
2010-07-04  4:43 ` [patch 2/5] Small tweak to define uintptr_t and successfully build on debian/kfreebsd malattia
2010-07-04  4:43 ` [patch 3/5] Support compiling DSDT tables on big endian architectures malattia
2010-07-04  4:43 ` [patch 4/5] Add architectures that do not support unaligned access and fix aligment issues malattia
2010-07-04  4:43 ` [patch 5/5] Fix FTBFS on hurd-i386 malattia
2010-07-05  1:01 ` [patch 0/5] iASL patches in Debian Lin Ming
2010-07-05 11:49   ` malattia
2010-07-06 17:01 ` Moore, Robert
2010-07-07 19:27 ` Moore, Robert
2010-07-07 22:07   ` malattia
2010-07-07 23:41     ` Moore, Robert
2010-07-08 13:41       ` malattia
2010-07-08 22:14         ` Lin Ming
2010-07-08  0:49     ` Lin Ming
2010-07-08 13:49       ` malattia
2010-07-08 22:06         ` Lin Ming
2010-07-08 14:40           ` malattia
2010-07-14  1:42             ` Lin Ming
2010-07-15 21:29               ` malattia
2010-07-08 14:44           ` Moore, Robert

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20100704044450.507083526@linux.it \
    --to=malattia@linux.it \
    --cc=Robert.Moore@intel.com \
    --cc=lenb@kernel.org \
    --cc=linux-acpi@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).