#import <Foundation/Foundation.h> int main (void) { NSLog (@"Executing"); return 0; }The function NSLog simply outputs the string to stderr, flushing the output before continuing. To compile this little program as a command line tool called LogTest, add in the same directory a file called GNUmakefile, with the following contents:
include $(GNUSTEP_MAKEFILES)/common.make TOOL_NAME = LogTest LogTest_OBJC_FILES = source.m include $(GNUSTEP_MAKEFILES)/tool.makeAnd that's it. At this point, you have all the usual standard GNU make options: typically make, make clean, make install, make distclean. For example, typing make in the project directory should compile our little tool. It should create a single executable LogTest, and put it in the subdirectory ``obj'' of your current directory, that is, in
./objYou can try the tool out by typing
./obj/LogTest
When you type make, the system will check if any changes were made to the source code since the last time you compiled, and if so, it will rebuild your software.
If you want to remove the results of a previous compilation (for example, to later force a recompilation with different options) you can use the command
make clean