[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [newbie] Recursive GNUmakefile
From: |
Andy Ruder |
Subject: |
Re: [newbie] Recursive GNUmakefile |
Date: |
Mon, 11 Nov 2002 14:40:44 -0600 |
User-agent: |
Mutt/1.4i |
On Mon, Nov 11, 2002 at 08:40:03PM +0100, Sébastien_Pierre wrote:
> Hi,
>
> I am trying to compile an application I wrote on OSX under GNUstep. I
> encounter problems with the makefile system as my sources are organised
> in subfolders, as following:
>
> - Sources/
> main.m
> Core/
> blah.m
> Utilities/
> foo.m
>
First of all, make a GNUmakefile.postamble with the following lines:
before-all::
$(MKDIRS) $(GNUSTEP_OBJ_DIR)/Core
$(MKDIRS) $(GNUSTEP_OBJ_DIR)/Utilities
Then, in your GNUmakefile:
include $(GNUSTEP_MAKEFILES)/common.make
APP_NAME = MyApp
MyApp_OBJC_FILES = main.m Core/blah.m Utilities/foo.m
include $(GNUSTEP_MAKEFILES)/application.make
-include GNUmakefile.postamble
Also, you may need to modify MyApp_INCLUDE_DIRS depending on how you
include files out of those directories. I usually do something like
MyApp_INCLUDE_DIRS = -I.
and then in my program:
#import "Utilities/foo.h"
Hope that helps.
- Andy Ruder