# Makefile for PDFlib VERSION = @VERSION@ SHELL = @SHELL@ INSTALL = @INSTALL@ srcdir = @srcdir@ VPATH = @srcdir@ EXE = @EXE@ OBJ = @OBJ@ AR = @AR@ CC = @CC@ RM = @RM@ SO = @SO@ RANLIB = @RANLIB@ # installation directories prefix = @prefix@ exec_prefix = @exec_prefix@ # position independent code for shared libraries LDSHARED = @LDSHARED@ PDFLIB = @PDFLIB@ PDFLIBLINK = -L../../pdflib @PDFLIBLINK@ CFLAGS = -c @DEFS@ @DEFINES@ @CCSHARED@ -I../../pdflib .SUFFIXES: .c .c.o: $(CC) $(CFLAGS) $(DEFINES) $< # Language-dependent definitions LANG_INCDIR = @PYINCLUDE@ LANG_LIBDIR = @libdir@/python SWIG = swig1.2 SWIG_LIB = pdflib$(SO) SWIG_OBJ = pdflib_py.$(OBJ) SWIG_SRC = pdflib_py.c SWIG_EXTRA = SWIG_DOC = pdflib_py.doc SWIGFLAGS = -I../../pdflib -python -d pdflib_py -stat all: $(SWIG_LIB) PDFLIB_I = ../../pdflib/pdflib.i # The swig-generated wrapper file $(SWIG_SRC): $(PDFLIB_I) ../../pdflib/pdflib.h $(SWIG) $(SWIGFLAGS) -o $@ $(PDFLIB_I) $(SWIG_OBJ): $(SWIG_SRC) $(CC) $(CFLAGS) $(SWIG_SRC) $(LANG_INCDIR) $(DEFINES) $< # The actual shared library for the language support $(SWIG_LIB): ../../pdflib/$(PDFLIB) $(SWIG_OBJ) $(RM) $(SWIG_LIB) $(LDSHARED) $(SWIG_OBJ) -o $(SWIG_LIB) $(PDFLIBLINK) test: all -LD_LIBRARY_PATH=../../pdflib python hello.py -LD_LIBRARY_PATH=../../pdflib python pdfclock.py install: $(SWIG_LIB) -$(INSTALL) $(SWIG_LIB) $(LANG_LIBDIR) uninstall: -$(RM) $(LANG_LIBDIR)/$(SWIG_LIB) clean: -$(RM) $(SWIG_LIB) $(SWIG_OBJ) hello_py.pdf pdfclock_py.pdf maintainer-clean: clean -$(RM) $(SWIG_SRC) $(SWIG_DOC)