[C++-sig] CMake and getting starting with boost.python
Braddock Gaskill
braddock at braddock.com
Fri Jun 29 12:13:58 CEST 2007
For those who prefer Makefiles, I found the following Makefile also worked
to build the greet example. It is based on some Makefiles posted to this
list. I don't know how robust it is. Worked under Linux Ubuntu 6.10.
CC = g++
CFLAGS = -Wall -W -fPIC -I/usr/include/boost \
-I/usr/include/python2.5 -DBOOST_PYTHON_DYNAMIC_LIB \
-O2
LDFLAGS = -L/usr/local/lib -lboost_python -L/usr/lib/python2.5 \
-Wl,-rpath-link,. -fPIC
CXXFLAGS = $(CFLAGS)
SLIB = hello.so
all: $(SLIB)
%.so : %.o
/usr/bin/objcopy --set-section-flags .debug_str=contents,debug $^
$(CC) $(LDFLAGS) $^ -shared -o $@
clean :
rm -f $(WORLD) $(OBJS)
More information about the Cplusplus-sig
mailing list