# install pyne here...
export PREFIX = @prefix@
PYTHON = @PYTHON@
VERSION = @VERSION@
default: pyne
clean:
-rm yencdec
find . -name '*.pyc' -exec rm {} \;
find . -name '*.pyo' -exec rm {} \;
$(MAKE) -C src/po clean
distclean:
$(MAKE) clean
-rm -f config.*
-rm Makefile
dist:
$(MAKE) distclean
mkdir "pyne-$(VERSION)"
cp -r ChangeLog configure.in configure COPYING INSTALL Makefile.in README TODO yencdec.c src/ "pyne-$(VERSION)"
tar cvzf "pyne-$(VERSION).tar.gz" "pyne-$(VERSION)"
rm -rf "pyne-$(VERSION)"
install:
-cp -fv yencdec $(PREFIX)/bin/yencdec
echo "#!/bin/sh" > $(PREFIX)/bin/pyne
echo "exec $(PYTHON) -O $(PREFIX)/lib/pyne/pyne.py \$$*" >> $(PREFIX)/bin/pyne
mkdir -p $(PREFIX)/lib/pyne
cp -rfv src/* $(PREFIX)/lib/pyne
chmod +x $(PREFIX)/lib/pyne/pyne.py
chmod +x $(PREFIX)/bin/pyne
@echo "Compiling modules to bytecode..."
$(PYTHON) -O -c "import compileall ; compileall.compile_dir(\"$(PREFIX)/lib/pyne\")"
@## Doesn't seem to work yet
$(MAKE) -C src/po mo install
appdir:
# Make an AppDir for use with Rox. See rox.sf.net. it rules.
mkdir Pyne
cp src/AppRun Pyne/AppRun
chmod +x Pyne/AppRun
cp -rfv src/* Pyne
@echo "Compiling modules to bytecode..."
$(PYTHON) -O -c "import compileall ; compileall.compile_dir(\"Pyne/\")"
cp src/icons/pyne.xpm Pyne/.DirIcon
uninstall:
-rm -fv $(PREFIX)/bin/yencdec
rm -fv $(PREFIX)/bin/pyne
rm -rfv $(PREFIX)/lib/pyne
pyne:
-gcc -Wall -O2 yencdec.c -o yencdec
@echo
@echo "Pyne will install to $(PREFIX). Pass --prefix option to ./configure to change this"
@echo "Type 'make install' when ready."
syntax highlighted by Code2HTML, v. 0.9.1