filters: Cleanup GP_FilterParams API a little.
[gfxprim.git] / pywrap.mk
blob0ec5602741c0f36b14248c6e50a693e29ff4a20d
1 ifndef LIBNAME
2 $(error LIBNAME not defined, fix your library Makefile)
3 endif
5 SWIG_SRC=$(LIBNAME).i
6 SWIG_PY=$(LIBNAME)_c.py
7 SWIG_C=$(LIBNAME)_wrap.c
8 SWIG_LIB=_$(LIBNAME)_c.so
10 ifneq ($(SWIG),)
12 INCLUDES+=$(addprefix -I$(TOPDIR)/include/, $(INCLUDE))
14 ALL+=$(SWIG_LIB) $(SWIG_PY)
16 $(SWIG_C) $(SWIG_PY): $(SWIG_SRC)
17 ifdef VERBOSE
18 $(SWIG) $(SWIGOPTS) -python $(INCLUDES) $<
19 else # VERBOSE
20 @echo "SWIG $(LIBNAME)"
21 @$(SWIG) $(SWIGOPTS) -python $(INCLUDES) $<
22 endif # VERBOSE
24 $(SWIG_LIB): $(SWIG_C)
25 ifdef VERBOSE
26 $(CC) $< $(CFLAGS) $(LDFLAGS) -I$(PYTHON_INCLUDE) --shared -lGP $(LDLIBS) -L$(TOPDIR)/build/ -o $@
27 else # VERBOSE
28 @echo "LD $@"
29 @$(CC) $< $(CFLAGS) $(LDFLAGS) -I$(PYTHON_INCLUDE) --shared -lGP $(LDLIBS) -L$(TOPDIR)/build/ -o $@
30 endif # VERBOSE
32 endif # ifneq ($(SWIG),)
34 CLEAN+=$(SWIG_C) $(SWIG_PY) $(SWIG_LIB) *.pyc