gnustep-dev
[Top][All Lists]
Advanced

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

Re: Framework support in makefiles


From: Nicola Pero
Subject: Re: Framework support in makefiles
Date: Thu, 3 Jul 2003 13:09:35 +0100 (BST)

> Hi,
> 
> How can I cleanly link to a framework with gnustep-make? Currently I am using
> ADDITIONAL_*_LIBS = -lSomething. Why I am linking to a 'library' if I 
> want to link to a 'framework'? (Yes, I know that a framework is in fact 
> a library and there is a link to that library from Libraries directory).

Ok.  I see your point.  Maybe we could add support for a syntactic sugar
expression "-framework XXX"  which would simply automatically be rewritten
as "-lXXX" by which_lib if not running on Apple.


> Another question is, how can i link to a framework, that is not already 
> installed?
> I have a more complex project (suite) with several frameworks, 
> applications and tools. I would like to make users (and me) build it 
> with single make command in the source root directory. For example in 
> StepTalk tools I use:
> 
> ADDITIONAL_TOOL_LIBS += -lStepTalk
> ADDITIONAL_LIB_DIRS += -L../Source/$(GNUSTEP_OBJ_DIR)

[Yes - of course I imagine you also add something like
ADDITIONAL_INCLUDE_DIRS += -I../Source/]

> 
> Now, say I have a source directory structure like this:
> /Frameworks
>     /FirstFramework
>         *.[hm]
>         GNUMakefile
>     /SecondFramework
>         *.[hm]
>         GNUMakefile
> /Applications
>     /MyApp
>         *.[hm]
>         GNUMakefile
> 
> And I want MyApp to be linked with FirstFramework.
> Is there a similar way how can i link to just built frameworks?

I suppose something like 

ADDITIONAL_TOOL_LIBS += -lFirstFramework

ADDITIONAL_INCLUDE_DIRS += -I../Frameworks/FirstFramework/derived_src

ADDITIONAL_LIB_DIRS += 
-L../Frameworks/FirstFramework/FirstFramework.framework/Versions/Current/$(GNUSTEP_TARGET_LDIR)

should make it.

It could be made easier I suppose.





reply via email to

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