### Makefile to install the brld orca module
### Author: Marco Skambraks <marco@skammel.de>
include ../make.config

PYVER=$(shell python --version 2>&1|cut -c 8-|cut -c 1-3)
ORCA_DIR=$(DESTDIR)$(LIBDIR)/python$(PYVER)/site-packages/orca

all: brlapi.py
	@echo -n Generating byte code... 
	@python -c 'import brlapi' && echo ok || @echo failed

clean:
	rm -f *~ xyz jj.jj *.pyc

install: all
	@if [ -d $(ORCA_DIR) ] || [ ! -z "$(DESTDIR)" ]; then \
	     install --directory $(ORCA_DIR) ; \
	     install -m 644 brlapi.py brlapi.pyc $(ORCA_DIR) ; \
	else \
	     echo please make sure that orca is installed in: ; \
	     echo $(ORCA_DIR) ; \
	fi

uninstall:
	rm -f $(ORCA_DIR)/brlapi.py*

