## -*- makefile -*- ifneq (,) This makefile requires GNU Make. endif VPATH := @srcdir@ PACKAGE := @PACKAGE@ VERSION := @VERSION@ STATIC_EXAMPLES := pyhello.py testtk.py EXAMPLES := $(addprefix docs/examples/, env.sh) DOCS := $(addprefix docs/html/, index.html ivycpy_wrap.html) DEBIANSTUFF := debian/copyright DEFINES := @DEFINES@ INCLUDES := @INCLUDES@ LIBRARIES := @LIBRARIES@ prefix := @prefix@ exec_prefix := @exec_prefix@ datadir := @datadir@ includedir := @includedir@ libdir := @libdir@ bindir := @bindir@ mandir := @mandir@ infodir := @infodir@ pyexecdir := @pyexecdir@ pythondir := @pythondir@ pmode := @pmode@ # package mode debian or default # PKGEXAMPLESDIR := $(datadir)/$(PACKAGE)-$(VERSION)/examples ifeq "$(pmode)" "debian" PKGDOCDIR := $(datadir)/doc/$(PACKAGE)-$(VERSION) else PKGDOCDIR := $(datadir)/$(PACKAGE)-$(VERSION)/docs endif MKDIR := mkdir -p RMDIR := rmdir -p LN_S := @LN_S@ -f ARFLAGS := r RANLIB := @RANLIB@ INSTALL := @INSTALL@ INSTALL_PROGRAM := @INSTALL_PROGRAM@ INSTALL_SCRIPT := @INSTALL_SCRIPT@ INSTALL_DATA := @INSTALL_DATA@ UMASK ?= 022 INSTALL_DIR := $(SHELL) $(top_srcdir)/mkinstalldirs INSTALL_DIR := $(INSTALL) -d INSTALL_DIR := umask $(UMASK) && mkdirhier INSTALL_DIR := umask $(UMASK) && $(MKDIR) SWIG := @SWIG@ CC := gcc CC_WARNING_OPTIONS := -Wall CC_PIC_OPTIONS := -fPIC CC_SHARED_OPTIONS := -shared CC_OPTIONS := $(CC_WARNING_OPTIONS) ifdef DEBUG CC_OPTIONS += -g DEFINES += -D__DEBUG__ else DEFINES += -DNDEBUG endif CPPFLAGS = $(DEFINES) $(INCLUDES) @DEFS@ @CPPFLAGS@ CFLAGS = @CFLAGS@ $(CC_OPTIONS) LDFLAGS = @LDFLAGS@ $(LD_OPTIONS) LDLIBS = $(LIBRARIES) @LIBS@ default: ivycpy.so $(DOCS) $(EXAMPLES) $(DEBIANSTUFF) ivycpy.so: ivycpy_wrap_neat.o @PYTHON_LIBDIR@/python@PYTHON_VERSION@/lib-dynload/_tkinter.so $(LINK.o) $(CC_SHARED_OPTIONS) $^ -o $@ -livy $(LDLIBS) -lc ivycpy_wrap_neat.o: CFLAGS += $(CC_PIC_OPTIONS) ivycpy_wrap_neat.o: ivycpy_wrap_neat.c # true or neat wrapper with proper name for function ivycpy_wrap_neat.c: ivycpy_wrap.c >$@ sed -f ivycpy_namer.sed $< # wrapper code generated by swig ivycpy_wrap.c: ivycpy.i $(SWIG) -python -dhtml $< # testing include and defines ivycpy_test.e: ivycpy_test.c >|$@ $(CC) -E $(CPPFLAGS) $< # documentation docs/html/ivycpy_wrap.html: ivycpy_wrap.html >|$@ sed -e "s/pyIvy/Ivy/g" $< docs/html/index.html: docs/html/index_tpl.html >|$@ sed -e "s/_VERSION_/$(VERSION)/g" $< VERSION: printf '# generated dynamically do not edit; change VERSION in configure.in instead\n' >|$@ printf '#Version: %s \n' $(VERSION) >|$@ # misc docs/examples/env.sh: env_tpl.sh >|$@ sed -e "s|_IVYCPYPATH_|$(pythondir)|g" $< # debian debian/copyright: docs/copyright $(INSTALL_DATA) $< debian install:: ivycpy.so $(INSTALL_DIR) $(pythondir) $(INSTALL_DATA) $< $(pythondir) # install of docs requires o exclude service file : CVS, .cvsignore install:: $(DOCS) $(EXAMPLES) $(INSTALL_DIR) $(PKGDOCDIR) # cp -rp docs/* $(PKGDOCDIR) cd docs && \ find . -type d ! \( -path '*CVS*' -o -path '.' \) -exec install -d $(PKGDOCDIR)/{} ";" && \ find . -type f ! \( -path '*.cvsignore' -o -path '*CVS*' \) -exec cp -p {} $(PKGDOCDIR)/{} ";" .PHONY: default install VERSION clean: $(RM) core a.out *.o $(RM) ivycpy.so realclean: clean $(RM) ivycpy_wrap*.c $(RM) $(EXAMPLES) distclean: realclean $(RM) ivycpy_wrap*.* $(RM) GNUmakefile config.log config.status config.cache .PHONY: clean realclean distclean GNUmakefile:: GNUmakefile.in CONFIG_FILES=GNUmakefile ./config.status GNUmakefile:: ./config.status ./config.status config.status: @top_srcdir@/configure ./config.status --recheck @top_srcdir@/configure: @top_srcdir@/configure.in cd @top_srcdir@ && autoconf recheck: ./config.status --recheck && ./config.status .PHONY: recheck ## [END OF FILE]