[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: how to change $(CC) for just some targets

From: Brian J. Murrell
Subject: Re: how to change $(CC) for just some targets
Date: Thu, 03 Jun 2010 14:50:15 -0400

On Thu, 2010-06-03 at 11:42 -0700, Christian Rössel wrote: 
> Hi Brian,

Hey Christian,

Thanx for taking the time.

> I use a separate Makefile for MPI targets.

This is what I did last time around.  In fact I created a "mpi" subdir
for my MPI sources.  I'm looking to avoid doing that again for this
particular use case.

> The starts with
> CC   = $(MPICC)
> CXX  = $(MPICXX)
> F77  = $(MPIF77)
> FC   = $(MPIFC)
> where the MPI* variables are set by calls to AX_MPI

AX_MPI.  Nice.  I will have to look into that one.

> For me, this approach works just fine. However, you need to put the MPI
> into a separate directory as, afaik, there can be only one
> per directory.

Indeed, this is my understanding also.

> But you need not to move your sources, though.

Hrm.  Interesting.  We did move the MPI sources into the separate subdir
with the new Makefile.  How did you avoid moving the sources too?  Did
you just prefix all of the filenames, etc. in your subdir/
with "../"?  i.e.

foo_SOURCES = ../parser.c ../cfg.c ../foo.c ../parser.h ../platform.h
foo_DEPENDENCIES := libbar.a


Attachment: signature.asc
Description: This is a digitally signed message part

reply via email to

[Prev in Thread] Current Thread [Next in Thread]