blob: 3e2d19c4ecf0e29b46dab1aae02428aa176b106b (
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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
|
# Generic Makefile for dynamically linked extension modules.
#
# Jim Fulton, Digital Creations, jim@digicool.com
# Uncomment this line if you want to fix the location of the PYTHON
# installation. Otherwise, set the environment variable before using this
# Makefile.
# $(PYTHONHOME)= /usr/local/
# The following lines should be left as is:
pyinstalldir= $(PYTHONHOME)
installdir= $(PYTHONHOME)
exec_installdir=$(pyinstalldir)
INCLUDEPY= $(pyinstalldir)/include/Py
LIBP= $(exec_installdir)/lib/python
LIBPL= $(LIBP)/lib
PYMAKE= make -f $(LIBPL)/Makefile
# LIBSO is the location of platform-dependent dynamically linked
# extension libraries. This can be handy when you need to build
# shared libraries that are not extensions but want to store them
# with other extensions and need to know where they are.
# Leave this line as it is.
LIBSO= `$(PYMAKE) -s echodestshared`
# Put your module name here:
MODULE=your-module
# Put the object files for your module here:
OBS=$(MODULE).o
# Put extra linker options, such as libraries here:
EXTRA=
# If you have any Python modules, include them here, so that they
# can be installed.
PYMODULES=
build:
if [ "$(MODULE)" != your-module ]; then \
$(PYMAKE) INCLDIR=$(INCLUDEPY) CONFIGINCLDIR=$(LIBPL) \
ASHAREDMODULE=$(MODULE) \
'ASHAREDMODULESOBS=$(OBS)' \
'ASHAREDMODULESEXTRA=$(EXTRA)' \
asharedmodule; \
fi
install: installso installpy
installso: build
if [ "$(MODULE)" != your-module ]; then \
$(PYMAKE) exec_prefix=$(installdir) \
ASHAREDMODULE=$(MODULE) asharedinstall; \
fi
installpy:
for m in $(PYMODULES) the-end; do \
if [ "$$m" != the-end ]; then \
python -c "import $$m"; \
cp $$m.pyc $(installdir)/lib/python/; \
fi; \
done
clean::
-rm -f *.o *.so *~ *# so_locations
|