[Top][All Lists]

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

Re: simple make file

From: Richard Frith-Macdonald
Subject: Re: simple make file
Date: Tue, 14 Sep 2010 13:05:47 +0100

On 14 Sep 2010, at 12:32, stolennomenclature wrote:

> I have the following simple makefile, copied from the GNUstep "manual.pdf",
> for the simple example program, as follows:
> include $(GNUSTEP_MAKEFILES)/common.make
> TOOL_NAME = source.m
> rabbitMP_OBJC_FILES = source.m
> include $(GNUSTEP_MAKEFILES)/tool.make

That's not what's in the manual.

The example in the manual contains comments to explain things, but stripped of 
the comments would look more like this:

include $(GNUSTEP_MAKEFILES)/common.make
TOOL_NAME = rabbit
rabbit_OBJC_FILES = source.m
include $(GNUSTEP_MAKEFILES)/tool.make

> Now I want to expand it to incorporate the sqlite3 database, which is in the
> form of a single source file called "sqlite3.c" and its accompanying header
> file "sqlite3.h". Somehow the sqlite3 c file needs to be compiled to a
> linkable static object file and then linked in with the "source.m" file,
> which I will modify to include all my new code.

For simple database access I'd recommend using the SQLClient package (of course 
I would since I wrote it) for ease of integration with ObjC ... but using 
sqlite directly is also quite easy.
Since any C source code is also ObjC source code (as C is a subset of ObjC) , 
you can simply add C files to the list of OBJC source code command ...

include $(GNUSTEP_MAKEFILES)/common.make
TOOL_NAME = rabbit
rabbit_OBJC_FILES = source.m sqlite3.c
include $(GNUSTEP_MAKEFILES)/tool.make

> I have looked at the documentation for make in the "manual.pdf" file that
> comes with Gnustep, but I find it rather incomplete and somewhat
> incomprehensible.

That's the objective-C and base library programming manual ... so it's only 
giving you minimal coverage of the use of makefiles.
You could try reading the gnustep-make documentation (and perhaps the gnu make 
documentation) ... but generally the simple examples and tutorials readily 
available are likely to cover what you need without needing to get into more 
detailed (and obscure) documentation.

reply via email to

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