On 22 Jul 2008, at 10:30, Jaroslav Joska wrote:

First of all, you can compile the C file using gnustep-make. Use the following
GNUmakefile:
include $(GNUSTEP_MAKEFILES)/common.make
CTOOL_NAME = test
test_C_FILES = test.c
ADDITIONAL_CFLAGS += $(shell mysql_config --cflags)
ADDITIONAL_TOOL_LIBS += $(shell mysql_config --libs)
include $(GNUSTEP_MAKEFILES)/ctool.make

!!!!!!!! IT WORK'S" !!!!!!!!

If you want to migrate it to Objective-C, then rename your test.c file to
test.m, and slightly modify your GNUmakefile:
include $(GNUSTEP_MAKEFILES)/common.make
TOOL_NAME = test
test_OBJC_FILES = test.m
ADDITIONAL_OBJCFLAGS += $(shell mysql_config --cflags)
ADDITIONAL_TOOL_LIBS += $(shell mysql_config --libs)
include $(GNUSTEP_MAKEFILES)/tool.make

It doesn't work, because  compiler doesn't know variables
ADDITIONAL_OBJCFLAGS += $(shell mysql_config --cflags)
Here is output of command 'gmake massages=yes'. I'm using
gmake (version 3.81), that's native in FreeBSD.

If you are specifying include paths and macro definitions (which is what pkg-config does) then you should be using CPPFLAGS, not CFLAGS or OBJCFLAGS, since you are passing arguments to the preprocessor, not the compiler. It should then work for C, C++, Objective-C, and preprocessed assembly files.

David


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

Reply via email to