aboutsummaryrefslogtreecommitdiffstats
path: root/src/build-data
diff options
context:
space:
mode:
Diffstat (limited to 'src/build-data')
-rw-r--r--src/build-data/makefile/python.in18
-rw-r--r--src/build-data/makefile/unix.in4
-rw-r--r--src/build-data/makefile/unix_shr.in13
3 files changed, 15 insertions, 20 deletions
diff --git a/src/build-data/makefile/python.in b/src/build-data/makefile/python.in
index 17d1015d2..5b1d2379d 100644
--- a/src/build-data/makefile/python.in
+++ b/src/build-data/makefile/python.in
@@ -1,9 +1,3 @@
-CXX = %{cc}
-CFLAGS = -Os %{lang_flags}
-LDFLAGS =
-WARN_FLAGS = -Wall -Wextra
-
-SERIES = %{version_major}.%{version_minor}
PYTHON_ROOT = /usr/lib/python%{python_version}/config
PYTHON_INC = -I/usr/include/python%{python_version}
@@ -15,19 +9,17 @@ BOTAN_PYTHON_MODDIR = %{python_obj_dir}
PYTHON_OBJS = %{python_objs}
-all: $(BOTAN_PYTHON_MODDIR)/_botan.so
+python: $(BOTAN_PYTHON_MODDIR)/_botan.so
+
+PYTHON_FLAGS = $(LANG_FLAGS) $(WARN_FLAGS) $(SO_OBJ_FLAGS) -Os -ftemplate-depth=255 $(PYTHON_INC) -Wno-error
%{python_build_cmds}
$(BOTAN_PYTHON_MODDIR)/_botan.so: $(PYTHON_OBJS)
cp %{python_dir}/*.py $(BOTAN_PYTHON_MODDIR)
- $(CXX) -shared -Wl,-soname,$@ $(PYTHON_OBJS) -L. -L$(PYTHON_ROOT) $(LDFLAGS) -lbotan-$(SERIES) -lboost_python -o $@
-
-clean:
- rm -rf $(BOTAN_PYTHON_MODDIR)/*
- rm -f $(PYTHON_OBJS)
+ $(CXX) -shared -Wl,-soname,$@ $(PYTHON_OBJS) -L. -L$(PYTHON_ROOT) $(LDFLAGS) -lbotan-$(SERIES) -lboost_python-%{python_version} -o $@
-install:
+install_python:
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
diff --git a/src/build-data/makefile/unix.in b/src/build-data/makefile/unix.in
index bdf8a98bf..a32cd30b3 100644
--- a/src/build-data/makefile/unix.in
+++ b/src/build-data/makefile/unix.in
@@ -1,7 +1,7 @@
# Compiler Options
CXX = %{cc}
LIB_OPT = %{lib_opt}
-APP_OPT = %{app_opt}
+APP_OPT = %{app_opt}
LANG_FLAGS = %{lang_flags}
WARN_FLAGS = %{warn_flags}
LINK_TO = %{link_to}
@@ -71,6 +71,8 @@ $(STATIC_LIB): $(LIBOBJS)
$(AR) $(STATIC_LIB) $(LIBOBJS)
$(RANLIB) $(STATIC_LIB)
+%{python_makefile}
+
# Fake Targets
.PHONY = docs clean distclean install static
diff --git a/src/build-data/makefile/unix_shr.in b/src/build-data/makefile/unix_shr.in
index ccbbd6706..cf4fd7fec 100644
--- a/src/build-data/makefile/unix_shr.in
+++ b/src/build-data/makefile/unix_shr.in
@@ -1,7 +1,7 @@
# Compiler Options
CXX = %{cc}
LIB_OPT = %{lib_opt}
-APP_OPT = %{app_opt}
+APP_OPT = %{app_opt}
LANG_FLAGS = %{lang_flags}
WARN_FLAGS = %{warn_flags}
SO_OBJ_FLAGS = %{shared_flags}
@@ -49,11 +49,6 @@ LIBRARIES = $(STATIC_LIB) $(SHARED_LIB)
LIBNAME = %{lib_prefix}libbotan
STATIC_LIB = $(LIBNAME)-$(SERIES).a
-SONAME = $(LIBNAME)-$(SERIES).%{so_suffix}.%{so_abi_rev}
-SHARED_LIB = $(SONAME).%{version_patch}
-
-SYMLINK = $(LIBNAME)-$(SERIES).%{so_suffix}
-
all: $(APP)
# File Lists
@@ -77,11 +72,17 @@ $(STATIC_LIB): $(LIBOBJS)
$(AR) $(STATIC_LIB) $(LIBOBJS)
$(RANLIB) $(STATIC_LIB)
+SONAME = $(LIBNAME)-$(SERIES).%{so_suffix}.%{so_abi_rev}
+SHARED_LIB = $(SONAME).%{version_patch}
+SYMLINK = $(LIBNAME)-$(SERIES).%{so_suffix}
+
$(SHARED_LIB): $(LIBOBJS)
$(SO_LINK_CMD) $(LDFLAGS) $(LIBOBJS) -o $(SHARED_LIB) $(LINK_TO)
$(LN) $(SHARED_LIB) $(SONAME)
$(LN) $(SHARED_LIB) $(SYMLINK)
+%{python_makefile}
+
# Fake Targets
.PHONY = docs clean distclean install static shared