#############################################################################
##
##  Global Variables
##
CC=gcc

BINDIR = bin/armv6l-unknown-linux-gnueabihf-default32-kv3

CFLAGS = -O2 -g -Wall

#############################################################################
##
##  Targets
##
all: src/fplsa4.c
	mkdir -p $(BINDIR)
	$(CC) -o $(BINDIR)/fplsa4 $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) src/fplsa4.c

clean:
	rm -f $(BINDIR)/fplsa4

distclean: clean
	( cd doc; rm -f \
          manual.aux manual.bbl manual.blg manual.dvi manual.idl manual.idx \
          manual.ilg manual.ind manual.lab manual.log manual.pdf manual.six \
          manual.toc )


doc/manual.pdf htm/CHAP001.htm: doc/fplsa.tex doc/manual.tex
	cd doc && ./make_doc

doc: doc/manual.pdf htm/CHAP001.htm

Makefile: configure Makefile.in
	./configure "/build/gap/src/gap-4.10.2"

.PHONY: all clean doc
