aboutsummaryrefslogtreecommitdiff
path: root/pywrap
diff options
context:
space:
mode:
Diffstat (limited to 'pywrap')
-rw-r--r--pywrap/Makefile.in9
-rw-r--r--pywrap/build.py8
2 files changed, 10 insertions, 7 deletions
diff --git a/pywrap/Makefile.in b/pywrap/Makefile.in
index 7c37faab..36432cd9 100644
--- a/pywrap/Makefile.in
+++ b/pywrap/Makefile.in
@@ -1,9 +1,16 @@
# $Id$
+CFLAGS = @CFLAGS@
+LDFLAGS = @LDFLAGS@
+LIBS = @LIBS@ -lssl -lcrypto
+
all: pywrap
pywrap: pywrap.c
- python build.py
+ AC_CFLAGS='${CFLAGS}' AC_LDFLAGS='${LDFLAGS}' AC_LIBS='${LIBS}' @PYTHON@ build.py
clean:
rm -f *.o pywrap
+
+test:
+ @true
diff --git a/pywrap/build.py b/pywrap/build.py
index 23bd4cdf..286b034a 100644
--- a/pywrap/build.py
+++ b/pywrap/build.py
@@ -25,18 +25,14 @@ import os, subprocess, sys
from distutils.sysconfig import (get_config_var as getvar,
get_python_inc as getinc)
-openssl_dir = os.path.realpath(os.path.join(os.getcwd(), "../openssl/openssl"))
-
cmd = getvar("CC").split()
cmd.append("-o")
cmd.append("pywrap")
cmd.append("pywrap.c")
-cmd.append("-Wl,-rpath,%s" % openssl_dir)
-cmd.append("-L%s" % openssl_dir)
-cmd.append("-lcrypto")
-cmd.append("-lssl")
+for var in ("AC_CFLAGS", "AC_LDFLAGS", "AC_LIBS"):
+ cmd.extend(os.environ[var].split())
cmd.append("-I%s" % getinc(plat_specific = False))
cmd.append("-I%s" % getinc(plat_specific = True))