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 # All swig sources depend on common.i
34 $(SWIG_C
): ..
/common.i
36 $(SWIG_LIB
): $(SWIG_C
)
38 $(CC
) $< $(CFLAGS
) -D_GNU_SOURCE
=1 $(LDFLAGS
) $(PYTHON_INCLUDE
) --shared
$(LDLIBS
) $(LDLIBS_GP
) -L
$(TOPDIR
)/build
/ -o
$@
41 @
$(CC
) $< $(CFLAGS
) -D_GNU_SOURCE
=1 $(LDFLAGS
) $(PYTHON_INCLUDE
) --shared
$(LDLIBS
) $(LDLIBS_GP
) -L
$(TOPDIR
)/build
/ -o
$@
44 # Install python libraries into right places
45 INSTALL_FILES
+=__init__.py
$(SWIG_PY
) $(SWIG_LIB
)
47 include $(TOPDIR
)/pyinst.mk
49 CLEAN
+=$(SWIG_C
) $(SWIG_PY
) $(SWIG_LIB
) *.pyc