X-Git-Url: http://git.onelab.eu/?p=util-vserver.git;a=blobdiff_plain;f=python%2FMakefile;h=36c441181501aa0152236cab59b8fd11f26dc2ca;hp=dc4d59374e980b24821b79896862d22a173cde47;hb=ec4370f7ebd7fb0ce7f002f5bf2c74f03acd3ec1;hpb=c24dd57aa9dba282b9f4517f5a2967fc345c1ece diff --git a/python/Makefile b/python/Makefile index dc4d593..36c4411 100644 --- a/python/Makefile +++ b/python/Makefile @@ -1,46 +1,36 @@ # # GNUMakefile for util-vserver Python bindings # -# It's too hard to integrate distutils into the autoconf/libtool -# framework, so run this Makefile separately from and after the normal -# util-vserver build. -# # Steve Muir # Mark Huang # Copyright (C) 2005 The Trustees of Princeton University # -# $Id$ +# $Id: Makefile,v 1.13 2007/06/29 19:02:15 dhozac Exp $ # -ALL := vserverimpl.so vduimpl.so util_vserver_vars.py +INCLUDES := -I.. -I../lib +LIBS = -L../lib -lvserver + +PY_MODS := vserver.py cpulimit.py bwlimit.py +PY_EXT_MODS := vserverimpl.so + +LT_LINK = ../libtool --tag=CC --mode=link + + + +all: py-build -pythonlibdir := @libdir@/python@PYTHON_VERSION@/site-packages +# XXX - compatibility with util-vserver specfile +INSTALL_ROOT ?= $(DESTDIR) -all: $(ALL) +install: py-install -%.o: %.c - # builds object and incompletely linked library - python setup.py build_ext - # copy to current directory - cp -a build/temp.*/*.o . +clean: py-clean -vserverimpl.so vduimpl.so: %.so: %.o - # relink the object against libvserver with libtool - ../libtool --tag=CC --mode=link $(CC) -shared -o $@ $< ../lib/libvserver.la -util_vserver_vars.py: ../scripts/util-vserver-vars - install -m 644 $< $@ -install: $(ALL) - # install relinked libraries and byte-compiled scripts - python setup.py install --root="$(DESTDIR)" - # reinstall libraries with libtool so that the final path - # to libvserver is resolved - for so in $(filter %.so, $(ALL)) ; do \ - ../libtool --tag=CC --mode=install install "$$so" `find "$(DESTDIR)" -name "$$so"` ; \ - done +UTIL_PYTHON ?= $(wildcard ../../util-python*) -clean: - rm -rf $(ALL) *.o build +include $(UTIL_PYTHON)/pybuild.mk .PHONY: all install clean