Skip to contentSkip to conversation

Patch for lm_sensors-2.6.3 Makefile to support user specified CFLAGS and CPPFLAGS

DISCUSSION Kevin P. Fleming 1 participant 2 messages May 19, 2005

lore
Share & tools
lore
#0 lore raw

The attached patch allows the user to add CFLAGS and CPPFLAGS entries (via
the environment or the make command line) and have them actually get used
compiling the lm_sensors objects... I used this because I wanted to try
other optimization settings without massaging the Makefile every time.
Enjoy!
-------------- next part --------------
A non-text attachment was scrubbed...
Name: lm_sensors-Makefile.patch
Type: application/octet-stream
Size: 3781 bytes
Desc: not available
Url : http://lists.lm-sensors.org/pipermail/lm-sensors/attachments/20020426/43924d2e/lm_sensors-Makefile.obj

#1 lore raw

Nope, CPPFLAGS is for the c preprocessor (all your -D defines, -I directories, etc.). CFLAGS is for the actual C compiler. Granted, most of the time both of those steps are done in one pass, but this change makes it so someone can override CPPFLAGS, say, to just add another -D define without messing with the CFLAGS for optimization settings or anything.

I almost went through the same steps for LDFLAGS (for the linker), but most people don't mess with those much. In my case, I was just be anal and compiling everything in sight with -O3 -mcpu=athlon =march=athlon to see what broke :-) (so far, nothing has, it all works, even GCC 3.0.4 itself, amazing :-)

----- Original Message -----
From: "Mark D. Studebaker" <[email protected]>
To: "Kevin P. Fleming" <[email protected]>
Cc: <[email protected]>
Sent: Saturday, April 27, 2002 9:32 PM
Subject: Re: Patch for lm_sensors-2.6.3 Makefile to support user specified CFLAGS and CPPFLAGS

Quoted 6 lines

good idea - but isn't CPPFLAGS for c++?
Why do we need both CFLAGS and CPPFLAGS?

Quoted 2 lines · Kevin P. Fleming

The attached patch allows the user to add CFLAGS and CPPFLAGS entries

(via

Quoted 1 line
Quoted 1 line

the environment or the make command line) and have them actually get

used

Quoted 7 lines
Quoted 7 lines

compiling the lm_sensors objects... I used this because I wanted to try other optimization settings without massaging the Makefile every time. Enjoy!

Name: lm_sensors-Makefile.patch
lm_sensors-Makefile.patch Type: unspecified type

(application/octet-stream)

Quoted 3 lines
Quoted 1 line

Encoding: quoted-printable