Re: make on MacOSX

PJ Nefkens <[email protected]>
Newsgroups gmane.comp.mobile.kannel.devel
Message-ID <B91189B1.EE60%[email protected]>
Andreas,

on 22-05-2002 13:01, [email protected] at
[email protected] wrote:

> 
> Message: 8
> Date: Wed, 22 May 2002 11:07:10 +0200
> To: [email protected]
> From: Andreas Fink <[email protected]>
> Subject: make question (MacOS X)
> 
> Here's a question for the make gurus among us.
> 
> I want to have Kannel compile by default on MacOS X. The needed
> changes are minimal but on the other hand a bit tricky to automate.
> 
> Here's what I do:
> 
> 1st:
> 
> replace
> ar rc  $libname  $files
> with
> libtool -static -o $libname $files
> 
> 
> The more trickier thing are the following lines:
> 
> wmlscriptsrcs = $(wildcard wmlscript/*.[cy])
> wmlscriptobjs = $(wmlscriptsrcs:.c=.o) $(wmlscriptsrcs:.y=.o)
> 
> The problem here is that libtool then tries to add non existing files
> or files with no binary content to the library and fails. As we dont
> need those files in the archive I've tried to use:
> 
> wmlscriptsrcs = $(wildcard wmlscript/*.[cy])
> wmlscriptobjs = $(wildcard wmlscript/*.o)
> 
> instead. This fails with
> 
> libtool: file: wmlscript/wmlsc.o defines symbol: _main
> libtool: file: wmlscript/wmlsdasm.o defines symbol: _main
> 
> this also occurs with libgw.a because main is defined twice (once in
> bearerbox and one in smsbox). Basically we should not include the *.o
> files which contain the main routines into the libgw.a (by the way,
> do we need libgw.a at all?).
> 
> The workaround is to do wmlscriptobjs = all the .o files. Does anyone
> have a nicer macro to do this?
What I did, what seems to work, is the following:

wmlscriptobjs = $(wmlscriptsrcs:.c=.o) $(wmlscriptsrcs:.y=.y)
This way, the grammar files are not being "compiled" into .o files, but they
are linked in the lib.
It seems that it works. However, haven't tested the WAP gateway yet...

Regards,

PJ Nefkens
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.