[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
how to change $(CC) for just some targets
From: |
Brian J. Murrell |
Subject: |
how to change $(CC) for just some targets |
Date: |
Thu, 03 Jun 2010 14:10:26 -0400 |
I have a Makefile.am with a number of targets in it. Some of those
targets need $(CC) and/or $(LD) to be reassigned to a particular value
while others are fine with the default (or could be explicitly assigned
gcc if need be).
I notice there is no CC/LD equivillent of the "prog_{C,F}LAGS" type
variables. i.e. ideally I would just do:
foo_CC = other_cc
foo_LD = other_ld
foo_CFLAGS = ...
bar_CC = other_cc
bar_LD = other_ld
bar_CFLAGS = ...
bat_CFLAGS = ...
boo_CFLAGS = ...
(because bat and boo should just use whatever CC was set to by the
"make" caller).
The two specific cases I have for this are for compiling MPI programs
and pthread programs in the same directory as regular .c sources.
I'm happy to take an example to look at and glean what I can from it if
somebody wants to simply point me somewhere.
Cheers and thanx!
b.
signature.asc
Description: This is a digitally signed message part
- how to change $(CC) for just some targets,
Brian J. Murrell <=