一个简单的Object-C类及其用make编译
tire.h
#import <Cocoa/Cocoa.h> @interface Tire : NSObject { float pressure; float treadDepth; } -(void) setPressure: (float) pressure; -(float) pressure; -(void) setTreadDepth: (float) treadDepth; -(float) treadDepth; @end //Tire
GNUmakefile
include $(GNUSTEP_MAKEFILES)/common.make TOOL_NAME = Main Main_OBJC_FILES = tire.m main.m include $(GNUSTEP_MAKEFILES)/tool.make
编译:
source /usr/share/GNUstep/Makefiles/GNUstep.sh
make
http://www.gnustep.org/resources/documentation/Developer/Base/ProgrammingManual/manual_1.html#GNUstep-Base-Library