From patchwork Sun Jul 4 04:43:33 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mattia Dongili X-Patchwork-Id: 110089 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.4/8.14.3) with ESMTP id o644u4M8023762 for ; Sun, 4 Jul 2010 04:56:04 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752710Ab0GDE4D (ORCPT ); Sun, 4 Jul 2010 00:56:03 -0400 Received: from static-220-247-10-204.b-man.svips.gol.ne.jp ([220.247.10.204]:45891 "EHLO smtp.kamineko.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752607Ab0GDE4B (ORCPT ); Sun, 4 Jul 2010 00:56:01 -0400 Received: from caligola.kamineko.org (caligola.kamineko.org [192.168.1.36]) by smtp.kamineko.org (Postfix) with ESMTPSA id CC5E46B75E; Sun, 4 Jul 2010 13:44:50 +0900 (JST) Received: by caligola.kamineko.org (Postfix, from userid 1000) id B49B215E8F; Sun, 4 Jul 2010 13:44:50 +0900 (JST) Message-Id: <20100704044450.507083526@linux.it> User-Agent: quilt/0.48-1 Date: Sun, 04 Jul 2010 13:43:33 +0900 From: malattia@linux.it To: Robert Moore Cc: Len Brown , linux-acpi@vger.kernel.org, Mattia Dongili Subject: [patch 1/5] allow overriding only some of the CFLAGS References: <20100704044332.573836359@linux.it> Content-Disposition: inline; filename=overridable_cflags.patch Sender: linux-acpi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-acpi@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter.kernel.org [140.211.167.41]); Sun, 04 Jul 2010 04:56:04 +0000 (UTC) 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)