discuss-gnustep
[Top][All Lists]
Advanced

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

Re: Creating shared library using GNUstep makefile, with files distribut


From: indieAN
Subject: Re: Creating shared library using GNUstep makefile, with files distributed in different folders
Date: Sat, 29 Jan 2011 00:31:32 +0530

On Fri, 2011-01-28 at 01:17 +0100, Nicola Pero wrote:
> > Hi Everybody,
> >   I am new to GNUstep makefile build system . I am creating a shared
> > library named libCoCostep.
> >         Folder cocostep contains majority of the files, however for
> > understandability some files are put in sub folder called Support.
> > Whenever building shared lib I want build all files with it. Currently I
> > am using two separate shared libs one for cocostep folder another for
> > Support folder (libCoCostepSupport). How can I avoid using separate libs
> > without restructuring files.
> 
> As other (in particular, David and Richard) already explained, if you are 
> using
> a version of gnustep-make < 2.4.0, you need to use "subprojects".
> 
> If your gnustep-make is >= 2.4.0, you can do without "subprojects" and simply
> specify the files with the subdirectory in the name, which would speed up
> parallel builds.  The version of gnustep-make is printed when you type 'make';
> if you want to distribute your project, I recommend using "subprojects" for 
> now
> even if you yourself have gnustep-make >= 2.4.0, so that people who download
> the source code can compile it with older versions of gnustep-make. ;-)
> 
> Check this link for an explanation of the two options, including examples --
> 
>   http://www.gnustep.it/nicola/Tutorials/ParallelBuildingMakefiles/node15.html
> 
> (this is from the tutorial on parallel building, which you may or may not
> be interested in.  But that section discusses exactly the subdirectory case
> that you are interested in, and the two options, so it should help). ;-)
> 
> Thanks


OK. I would prefer subproject approach. As make says "This is gnustep-make 
2.2.0.". Which is latest version on Ubuntu 10.04LTS.

BTW- I successfully tried using a workaround with static libs.   

I am writing it down, in case any body interested..  

...
SUBPROJECTS = Support
libCoCoStep_LIB_DIRS = -LSupport/obj
libCoCoStep_LIBRARIES_DEPEND_UPON = -lCoCoStepSupport
include $(GNUSTEP_MAKEFILES)/aggregate.make
include $(GNUSTEP_MAKEFILES)/library.make
....
#Support folder
shared=no
include $(GNUSTEP_MAKEFILES)/common.make
...
LIBRARY_NAME = libCoCoStepSupport
..
include $(GNUSTEP_MAKEFILES)/library.make



Thanks to all,
ANindie

https://github.com/ANindie/cocos2d-GNUstep





reply via email to

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