This is the mail archive of the
automake@gnu.org
mailing list for the automake project.
Re: how to compile same source multiple times?
- From: "Sandip Bhattacharya" <sandip at mindsw dot com>
- To: <David dot Mosberger at acm dot org>
- Cc: <automake at gnu dot org>
- Date: Mon, 25 Feb 2002 13:58:01 +0530 (IST)
- Subject: Re: how to compile same source multiple times?
- References: <200202231904.g1NJ4Rh08672@panda.mostang.com>
I have had the same problem. I had a file that needed to be compiled in
both userspace and kernelspace. The code was the same but used kernel
equivalent functions.I used a ugly solution which many wont approve, I am sure. I merely used
symlinks. Now this had the advantage that when you actually did 'make
dist' the symlinks were converted into actual copies by gtar.
Hope this helps.
- Sandip
> Perhaps this is a FAQ, but I can't seem to find the answer anywhere:
> What's the proper way of telling automake that the same source file
> needs to be compiled multiple times with different options.
>
> For example, I have a file called foo.c and I'd like to compile it once
> with the normal options and once with -DBAR defined. The
> resulting two objects would have to go into the same library (foo.c
> will define different global symbols depending on whether or not BAR is
> defined).
--
Sandip Bhattacharya
Mindframe Software
Work: sandip @ mindsw.com, http://www.mindsw.com
Play: sandipb @ bigfoot.com, http://www.sandipb.net
-----------------------------------------------