File:  [CENS] / python / pyGiNaC / python1.5 / Makefile
Revision 1.1: download - view: text, annotated - select for diffs - revision graph
Fri Apr 27 11:36:59 2001 UTC (16 years, 7 months ago) by pearu
Branches: MAIN
CVS tags: HEAD
Fixed mul bug for Python<2.1

# Makefile for building _ginac for Python 1.5
# Use GNU make for making.
# $Revision: 1.1 $
# $Date: 2001-04-27 11:36:59 $
# Pearu Peterson <pearu@ioc.ee>

PYTHON = python

#PREFIX=`python -c "import sys;print sys.prefix"`
#VERSION=`python -c "import sys;print sys.version[:3]"`
PREFIX=$(shell $(PYTHON) -c "import sys;print sys.prefix")
VERSION=$(shell $(PYTHON) -c "import sys;print sys.version[:3]")


INSTALLDIRECTORY = $(PREFIX)/lib/python$(VERSION)/site-packages/ginac
BINDIR=$(PREFIX)/bin
PYINC=$(PREFIX)/include/python$(VERSION)

BOOST_DIR=../boost
WRAPPER_DIR=../wrappers3
LIB_DIR=../lib3

INCLUDES = -I$(PYINC) -I$(WRAPPER_DIR) -I$(BOOST_DIR)
CPPFLAGS = -g
SO = .so
LD = g++
LDFLAGS = -shared

INSTALLDIR = install -d
INSTALLEXEC = install -m 755
INSTALLDATA = install -m 644

BOOSTOBJS = classes.o conversions.o extension_class.o functions.o module_builder.o objects.o types.o init_function.o
OBJS=ginac_enhancements.o ex_py.o python_repr.o python_str.o pyfunc.o slice.o $(BOOSTOBJS)
LIBS = -lginac -lcln

.PHONY: all
all: _ginac

_ginac: _ginacmodule$(SO)
_ginacmodule$(SO): $(OBJS)
	$(LD) $(LDFLAGS) -o $@ $(OBJS) $(LIBS)

%.o : $(WRAPPER_DIR)/%.cpp ; $(CXX) -c $(CPPFLAGS) $(INCLUDES) $<
%.o : $(WRAPPER_DIR)/%.c ; $(CXX) -c $(CPPFLAGS) $(INCLUDES) $<
%.o : $(BOOST_DIR)/libs/python/src/%.cpp ; $(CXX) -c $(CPPFLAGS) $(INCLUDES) $<

install:
	$(INSTALLDIR) $(INSTALLDIRECTORY)
	$(INSTALLDIR) $(INSTALLDIRECTORY)/doc
	$(INSTALLDATA) ginac.py $(INSTALLDIRECTORY)/__init__.py
	$(INSTALLEXEC) _ginacmodule$(SO) $(INSTALLDIRECTORY)
	cd $(INSTALLDIRECTORY) && echo "ginac" > ../ginac.pth
clean:
	rm -f *.o *.a *.so *.pyc
distclean: clean
	rm -f *~

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>