To put GCC to build things on Mac OS X, simple prefix (or export) the PATH, CFLAGS, LDFLAGS and CPPFLAGS to any configure script or make execution like show bellow:
For configure script
PATH=${PATH}:/Developer/usr/bin CFLAGS=-I/Developer/SDKs/MacOSX10.6.sdk/usr/include/ LDFLAGS=-L/Developer/SDKs/MacOSX10.6.sdk/usr/lib CPPFLAGS=-I/Developer/SDKs/MacOSX10.6.sdk/usr/include/ ./configure
For make
PATH=${PATH}:/Developer/usr/bin CFLAGS=-I/Developer/SDKs/MacOSX10.6.sdk/usr/include/ LDFLAGS=-L/Developer/SDKs/MacOSX10.6.sdk/usr/lib CPPFLAGS=-I/Developer/SDKs/MacOSX10.6.sdk/usr/include/ ./configure
You can add more includes or libraries paths by adding :-I or :-L to CFLAGS, CPPFLAGS and LDFLAGS environment variables, like:
CFLAGS=-I/Developer/SDKs/MacOSX10.6.sdk/usr/include:-I/Developer/usr/include
CPPFLAGS=-I/Developer/SDKs/MacOSX10.6.sdk/usr/include:-I/Developer/usr/include
LDFLAGS=-L/Developer/SDKs/MacOSX10.6.sdk/usr/lib:-L/Developer/usr/lib
That's all! Happy hacking...
Nenhum comentário:
Postar um comentário