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.