blob: 4d09ad9ac73db50a144453ad9f7be211eccefc25 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
|
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/*)
WRAP_OBJS = $(patsubst src/%.cpp,%.o,$(WRAP_SRC))
all: botan/_botan.so
%.o: src/%.cpp
$(CXX) $(SHARED_CFLAGS) $(WRAPPER_CFLAGS) -c $< -o $@
botan/_botan.so: $(WRAP_OBJS) build/libboost_python.so
$(CXX) -shared -o $@ $(shell botan-config --libs) -L$(PYTHON_ROOT) $(WRAP_OBJS) -Lbuild/ -lboost_python -Wl,-rpath-link,. -Wl,-soname,$@
dirs:
mkdir -p build build/boost build/botan botan
clean:
rm -rf build/
rm -f botan/*.so botan/*.pyc
|