GAPPATH=../..
# makefile prototype for the EDIM package                         Frank Lbeck
# 27.1.2000 FL   made it much more portable by using `gac' for the compilation
#  $Id: Makefile.in,v 1.3 2002/02/05 22:23:41 chevie Exp $


GAPINCL=-I$(GAPPATH)/src -I$(GAPPATH)/bin/x86_64

.PHONY: bindir clean doc test

default: bindir bin/x86_64/ediv.so 

# this target creates a bin-directory
bindir:
	if test ! -d bin;  then mkdir bin;  fi
	if test ! -d bin/x86_64;  then mkdir bin/x86_64;  fi

bin/x86_64/ediv.so: src/ediv.c 
	$(GAPPATH)/bin/x86_64/gac -d -o bin/x86_64/ediv.so src/ediv.c

# make a statically linked GAP including the ediv module
static:
	(cd $(GAPPATH)/bin/x86_64; \
        ./gac -o gap-static -p "-DEDIVSTATIC" -P "-static" \
        ../../pkg/edim/src/ediv.c)

doc: xmldoc/manual.six

xmldoc/manual.six: xmldoc/main.xml xmldoc/edim.xml xmldoc/edim.bib 
	(gap4 makedoc.g)

clean: 
	rm -rf bin/x86_64 Makefile *~

test:
	(cd tst; gap4 -b -q -r <test.g)
