2 $(error LIBNAME not defined
, fix your library Makefile
)
8 INCLUDES
+=$(addprefix -I
$(TOPDIR
)/include/, $(INCLUDE
))
9 #PY_SUFFIX=$(shell $(PYTHON_CONFIG) --extension-suffix)
13 SWIG_C
=$(LIBNAME
)_wrap.c
14 SWIG_PY
=c_
$(LIBNAME
).py
15 SWIG_LIB
=_c_
$(LIBNAME
)$(PY_SUFFIX
)
17 ALL
+=$(SWIG_LIB
) $(SWIG_PY
)
19 # Empty rule to satisfy SWIG_PY
23 $(SWIG_LIB
): $(TOPDIR
)/config.gen.mk
25 $(SWIG_C
): $(SWIG_SRC
)
27 $(SWIG
) $(SWIGOPTS
) -python
$(INCLUDES
) $<
29 @echo
"SWIG $(LIBNAME)"
30 @
$(SWIG
) $(SWIGOPTS
) -python
$(INCLUDES
) $<
33 $(SWIG_LIB
): $(SWIG_C
)
35 $(CC
) $< $(CFLAGS
) -D_GNU_SOURCE
=1 $(LDFLAGS
) $(PYTHON_INCLUDE
) --shared
$(LDLIBS
) $(LDLIBS_GP
) -L
$(TOPDIR
)/build
/ -o
$@
38 @
$(CC
) $< $(CFLAGS
) -D_GNU_SOURCE
=1 $(LDFLAGS
) $(PYTHON_INCLUDE
) --shared
$(LDLIBS
) $(LDLIBS_GP
) -L
$(TOPDIR
)/build
/ -o
$@
41 # Install python libraries into right places
42 INSTALL_FILES
+=__init__.py
$(SWIG_PY
) $(SWIG_LIB
)
44 include $(TOPDIR
)/pyinst.mk
46 CLEAN
+=$(SWIG_C
) $(SWIG_PY
) $(SWIG_LIB
) *.pyc