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 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136
|
## These are not exported by automake < 1.10.
abs_srcdir = @abs_srcdir@
builddir = @builddir@
SUBDIRS = \
graph \
timing \
utils \
widgets
pgmdir = $(pythondir)/pgm
pgm_PYTHON = \
__init__.py \
keysyms.py
INCLUDES = $(PYTHON_INCLUDES) -I$(top_srcdir)/ -I$(top_builddir)/pgm
## We need to symlink all .py files from the source directory to the build
## directory so that make check works.
COPY_TO_BUILD = `find $(abs_srcdir) -name '*.py'`
all-local:
@echo making symlinks for $(COPY_TO_BUILD)
@for srcfile in $(COPY_TO_BUILD); do \
dstfile=$(builddir)$${srcfile#$(abs_srcdir)} ;\
if [ ! -e $${dstfile} ]; then \
file_dir=`dirname $${dstfile}` ;\
mkdir -p $${file_dir} ;\
$(LN_S) $${srcfile} $${file_dir} 2> /dev/null ;\
fi ;\
done
# Pigment module
overrides = \
pgm.override \
pgmcanvas.override \
pgmdrawable.override \
pgmimage.override \
pgmtext.override \
pgmviewport.override \
pgmviewportfactory.override \
pgmevent.override \
pgmlinearalgebra.override
EXTRA_DIST = \
pgm.defs \
$(overrides)
pyexec_LTLIBRARIES = _pgmmodule.la
pgm.c: pgm.defs $(overrides)
_pgmmodule_la_LDFLAGS = \
@PYPGM_LDFLAGS@ \
@PIGMENT_LIBS@ \
-module -avoid-version \
-export-symbols-regex "^(init_pgm|_PyGObject_API).*"
_pgmmodule_la_CFLAGS = @PYPGM_CFLAGS@
_pgmmodule_la_LIBADD = @PYPGM_LIBS@
_pgmmodule_la_SOURCES = pgmmodule.c
nodist__pgmmodule_la_SOURCES = pgm.c
CLEANFILES = pgm.c $(pgm_PYTHON:%.py=%.pyc)
# Pigment imaging module
if USE_IMAGING_MODULE
pyexec_LTLIBRARIES += _pgmimagingmodule.la
pgmimaging.c: pgmimaging.defs pgmimaging.override
_pgmimagingmodule_la_LDFLAGS = \
@PYPGM_IMAGING_LDFLAGS@ \
@PIGMENT_IMAGING_LIBS@ \
-module -avoid-version \
-export-symbols-regex "^(init_pgmimaging|_PyGObject_API).*"
_pgmimagingmodule_la_CFLAGS = @PYPGM_IMAGING_CFLAGS@
_pgmimagingmodule_la_LIBADD = @PYPGM_IMAGING_LIBS@
_pgmimagingmodule_la_SOURCES = pgmimagingmodule.c
nodist__pgmimagingmodule_la_SOURCES = pgmimaging.c
EXTRA_DIST += pgmimaging.defs pgmimaging.override
CLEANFILES += pgmimaging.c
endif
# Pigment GTK module
if USE_GTK_MODULE
pyexec_LTLIBRARIES += _pgmgtkmodule.la
pgmgtk.c: pgmgtk.defs pgmgtk.override
_pgmgtkmodule_la_LDFLAGS = \
@PYPGM_GTK_LDFLAGS@ \
@PIGMENT_GTK_LIBS@ \
-module -avoid-version \
-export-symbols-regex "^(init_pgmgtk|_PyGObject_API).*"
_pgmgtkmodule_la_CFLAGS = @PYPGM_GTK_CFLAGS@
_pgmgtkmodule_la_LIBADD = @PYPGM_GTK_LIBS@
_pgmgtkmodule_la_SOURCES = pgmgtkmodule.c
nodist__pgmgtkmodule_la_SOURCES = pgmgtk.c
EXTRA_DIST += pgmgtk.defs pgmgtk.override
CLEANFILES += pgmgtk.c
endif
# Common
LIBTOOL=$(top_builddir)/libtool
if INCLUDE_DOCSTRINGS
CODEGEN_OPTIONS = --xml-doc docstrings.xml
endif
.defs.c:
($(PYTHON) $(top_srcdir)/codegen/codegen.py \
--py_ssize_t-clean \
--register $(srcdir)/pgm.defs \
--override $(srcdir)/$*.override \
$(CODEGEN_OPTIONS) \
--prefix py$* $(srcdir)/$*.defs) > gen-$*.c \
&& cp gen-$*.c $*.c \
&& rm -f gen-$*.c
|