# makefile prototype for the EDIM package (assuming GAP >= 4.9) Frank Lübeck

GAPPATH=/build/gap/src/gap-4.10.1

GAPINCL=-I$(GAPPATH)/src -I$(GAPPATH)/bin/armv7l-unknown-linux-gnueabihf-default32-kv3/src

PKGROOT=$(shell pwd)

GAP=$(GAPPATH)/bin/gap.sh

GAC=$(GAPPATH)/gac

.PHONY: clean doc test

default: bin/armv7l-unknown-linux-gnueabihf-default32-kv3/ediv.so 

# this target creates a bin-directory
bin/armv7l-unknown-linux-gnueabihf-default32-kv3:
	mkdir -p bin/armv7l-unknown-linux-gnueabihf-default32-kv3

bin/armv7l-unknown-linux-gnueabihf-default32-kv3/ediv.so: src/ediv.c bin/armv7l-unknown-linux-gnueabihf-default32-kv3
	$(GAC) -d -o bin/armv7l-unknown-linux-gnueabihf-default32-kv3/ediv.so src/ediv.c

doc:
	$(GAP)  makedocrel.g

clean: 
	rm -rf bin/armv7l-unknown-linux-gnueabihf-default32-kv3 Makefile *~

distclean:
	rm -rf bin Makefile Makefile-*

docclean:
	(cd  doc; ./clean)

test:
	$(GAP) -b -q -r < tst/test.g
