blob: 6f54cd6a44e6355825b3c141a8c1560bd6cf3e17 (
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
31
32
33
34
35
36
37
|
pythonbuilddir = $(builddir)/bin/python
# Install Python
# Arguments: Module path, source location
define python_module_template
$$(pythonbuilddir)/$(1): $(2) ;
mkdir -p $$(@D)
cp $$< $$@
installpython:: $$(pythonbuilddir)/$(1) ;
cp $$< $$(DESTDIR)$$(PYTHONDIR)/$(1)
uninstallpython::
rm -f $$(DESTDIR)$$(PYTHONDIR)/$(1) ;
pythonmods:: $$(pythonbuilddir)/$(1) ;
endef
# Swig extensions
swig:: pythonmods
.SUFFIXES: _wrap.c .i
.i_wrap.c:
[ "$(SWIG)" == "no" ] || $(SWIG) -O -Wall -I$(srcdir)/scripting/swig -python -keyword $<
realdistclean::
@echo "Removing SWIG output files"
# FIXME: Remove _wrap.c files
pythonmods::
clean::
@echo "Removing python modules"
@rm -rf $(pythonbuilddir)
|