discuss-gnustep
[Top][All Lists]
Advanced

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

Re: Makefile Question


From: Nicola Pero
Subject: Re: Makefile Question
Date: Mon, 21 Feb 2005 12:18:57 +0000 (GMT)

>     Rather, I would like to add a source directory to the project directory.
> So my directory structure would look something like this:
> 
> ~/project_dir
>    | - GNUmakefile
>    | - obj
>    | - shared_obj/
>         | - whatever the build script puts here...?
>    | - source/
>         | - 45 source files here...
> 
>     I tried to do this by modifying the FirstTool example makefile. First I
> edited the project directory to look like this.
> 
> ~/FirstTool
>    | - GNUmakefile
>    | - source/
>         | - source.m

The obvious solution is to have a GNUmakefile inside the source/ 
directory, which does the actual compilation, and have the top-level 
GNUmakefile call it as an aggregate project --

FirstTool/GNUmakefile:

include $(GNUSTEP_MAKEFILES)/common.make
SUBPROJECTS = source
include $(GNUSTEP_MAKEFILES)/aggregate.make


FirstTool/source/GNUmakefile:

include $(GNUSTEP_MAKEFILES)/common.make
TOOL_NAME = FirstTool
FirstTool_OBJC_FILES = source.m 
include $(GNUSTEP_MAKEFILES)/tool.make


That is how I would do it ;-)

The other option is that you create the shared_obj/source directory
manually ... in that case the right way of doing it is just adding the
following two lines at the very end of your original GNUmakefile:

before-all::
        $(MKDIRS) $(GNUSTEP_OBJ_DIR)/source






reply via email to

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