2 $(error LIBNAME not defined
, fix your library Makefile
)
6 SWIG_C
=$(LIBNAME
)_wrap.c
7 SWIG_PY
=c_
$(LIBNAME
).py
8 SWIG_LIB
=_c_
$(LIBNAME
).so
12 INCLUDES
+=$(addprefix -I
$(TOPDIR
)/include/, $(INCLUDE
))
14 ALL
+=$(SWIG_LIB
) $(SWIG_PY
)
16 # Empty rule to satisfy SWIG_PY
20 $(SWIG_C
): $(SWIG_SRC
)
22 $(SWIG
) $(SWIGOPTS
) -python
$(INCLUDES
) $<
24 @echo
"SWIG $(LIBNAME)"
25 @
$(SWIG
) $(SWIGOPTS
) -python
$(INCLUDES
) $<
28 $(SWIG_LIB
): $(SWIG_C
)
30 $(CC
) $< $(CFLAGS
) -D_GNU_SOURCE
=1 $(LDFLAGS
) -I
$(PYTHON_INCLUDE
) --shared
-lGP
$(LDLIBS
) -L
$(TOPDIR
)/build
/ -o
$@
33 @
$(CC
) $< $(CFLAGS
) -D_GNU_SOURCE
=1 $(LDFLAGS
) -I
$(PYTHON_INCLUDE
) --shared
-lGP
$(LDLIBS
) -L
$(TOPDIR
)/build
/ -o
$@
36 endif # ifneq ($(SWIG),)
38 CLEAN
+=$(SWIG_C
) $(SWIG_PY
) $(SWIG_LIB
) *.pyc