Hi All,

    (This is my first post, please be gentle.)

    I've used Objective-C with the foundation before, however only on OS X
with Xcode. I am now trying to use GNUStep on Solaris in order to create
some programs for a university course (which must compile/run on Solaris to
submit).

    I have gone through the "FirstTool" tutorial on writing a makefile, and
it works fine in my Solaris account. Now I have my complete project on OS X
which I'd like to move to Solaris. It consists of about 45 source files, so
I would like to not have them in the same directory with the makefile as in
the FirstTool tutorial example.

    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

    Then I edited the GNUmakefile to make it look like this:

include $(GNUSTEP_MAKEFILES)/common.make
GNUSTEP_INSTALLATION_DIR = $(GNUSTEP_USER_ROOT)

SOURCE_DIR = source/

TOOL_NAME = LogTest
LogTest_OBJC_FILES = $(SOURCE_DIR)source.m

include $(GNUSTEP_MAKEFILES)/tool.make

    So essentially I'm just trying to tell it to append the source directory
to the front of each source file (in this case just one). However, when I
run the makefile I get the following:

Making all for tool LogTest...
 Compiling file source/source.m ...
source/source.m:1:2: warning: #import is obsolete, use an #ifndef wrapper in
the header file
shared_obj/source/source.d: No such file or directory
gmake[1]: *** [shared_obj/source/source.o] Error 1
gmake: *** [LogTest.all.tool.variables] Error 2

    So it seems that for some reason it is looking for a source directory
inside the shared_obj directory, which I don't understand. Can anyone please
suggest to me how I can modify the makefile to accomplish what I want? I
would appreciate it.

    Thanks!

-----
Stephen M. Sebeny
[EMAIL PROTECTED]




_______________________________________________
Discuss-gnustep mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/discuss-gnustep

Reply via email to