aboutsummaryrefslogtreecommitdiffstats
path: root/wrappers/boost-python/Makefile
diff options
context:
space:
mode:
authorlloyd <[email protected]>2008-09-29 20:17:08 +0000
committerlloyd <[email protected]>2008-09-29 20:17:08 +0000
commit7c0319368d1948d54db514e5f72c589a397e2909 (patch)
tree2d52b6dd8715a6ea0fc21b3a66673fb38a8d4ebb /wrappers/boost-python/Makefile
parent0f2dfff90fe3882a85308d66a05803178a452023 (diff)
Remove the misc dir:
Moved XS, Boost Python, and SWIG wrappers to new toplevel directory 'wrappers' Moved NIST X.509 test suite into checks directory Move the build information used by configure.pl to src/build-data Move scripts directory to doc (for lack of a better spot)
Diffstat (limited to 'wrappers/boost-python/Makefile')
-rw-r--r--wrappers/boost-python/Makefile26
1 files changed, 26 insertions, 0 deletions
diff --git a/wrappers/boost-python/Makefile b/wrappers/boost-python/Makefile
new file mode 100644
index 000000000..0f5ca68d2
--- /dev/null
+++ b/wrappers/boost-python/Makefile
@@ -0,0 +1,26 @@
+CXX = g++
+LANG_FLAGS = -fPIC -Wall -Wno-unused -ftemplate-depth-255
+OPT_FLAGS = -g -Os
+
+PYTHON_ROOT = /usr/lib/python2.4/config
+PYTHON_INC = -I/usr/include/python2.4
+PYTHON_DEF = -DBOOST_PYTHON_DYNAMIC_LIB -DBOOST_PYTHON_SOURCE
+
+WRAPPER_CFLAGS = $(shell botan-config --cflags)
+SHARED_CFLAGS = $(LANG_FLAGS) $(OPT_FLAGS) $(PYTHON_INC)
+
+BOOST_CFLAGS = $(PYTHON_DEF) $(SHARED_CFLAGS)
+
+WRAP_SRC = $(wildcard src/*.cpp)
+WRAP_OBJS = $(patsubst src/%.cpp,%.o,$(WRAP_SRC))
+
+all: botan/_botan.so
+
+%.o: src/%.cpp
+ $(CXX) -Isrc/ $(SHARED_CFLAGS) $(WRAPPER_CFLAGS) -c $< -o $@
+
+botan/_botan.so: $(WRAP_OBJS)
+ $(CXX) -shared -o $@ $(shell botan-config --libs) -L$(PYTHON_ROOT) $(WRAP_OBJS) -lboost_python -Wl,-rpath-link,. -Wl,-soname,$@
+
+clean:
+ rm -f $(WRAP_OBJS) botan/_botan.so botan/*.pyc