[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: Christian Rössel
Subject: Re: how to change $(CC) for just some targets
Date: Thu, 03 Jun 2010 12:12:22 -0700
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; de; rv: Gecko/20100317 Lightning/1.0b1 Thunderbird/3.0.4

Hi Brian,

Am 6/3/2010 11:50 AM, schrieb Brian J. Murrell:
> 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_LDADD := $(LIBREADLINE) libbar.a $(PTHREAD_LIBS)
> foo_DEPENDENCIES := libbar.a

yes. As we use non-recursive make (besides the MPI subdir) and have
several source directories we need to prefix all files anyway.


reply via email to

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