blob: d0e33f6e3f4b8e28a2eca12eeb79dcfa69a67532 (
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
|
CXX = %{cc}
WARN_FLAGS = %{warn_flags}
PYTHON_ROOT = /usr/lib/python%{python_version}/config
PYTHON_INC = -I/usr/include/python%{python_version}
PYTHON_SITE_PACKAGE_DIR = /usr/lib/python%{python_version}/site-packages/
PYTHON_FLAGS = -Isrc/wrap/python -Os -fPIC -ftemplate-depth-255 $(WARN_FLAGS) $(PYTHON_INC)
BOTAN_PYTHON_MODDIR = %{python_obj_dir}
PYTHON_OBJS = %{python_objs}
all: $(BOTAN_PYTHON_MODDIR)/_botan.so
%{python_build_cmds}
$(BOTAN_PYTHON_MODDIR)/_botan.so: $(PYTHON_OBJS)
cp src/wrap/python/*.py $(BOTAN_PYTHON_MODDIR)
$(CXX) -shared -o $@ $(PYTHON_OBJS) -L. -L$(PYTHON_ROOT) -lbotan -lboost_python -Wl,-rpath-link,. -Wl,-soname,$@
clean:
rm -f $(PYTHON_OBJS) $(BOTAN_PYTHON_MODDIR)
install:
mkdir -p $(PYTHON_SITE_PACKAGE_DIR)/botan
cp $(BOTAN_PYTHON_MODDIR)/_botan.so $(BOTAN_PYTHON_MODDIR)/*.py $(PYTHON_SITE_PACKAGE_DIR)/botan
chmod -R u=rwX,go=rX $(PYTHON_SITE_PACKAGE_DIR)/botan
|