# note: the next revision of frobby should come from https://github.com/Macaulay2/frobby

LICENSEFILES = COPYING
# author: Bjarke Roune <bjarke@cs.au.dk>
#VERSION = 0.7.7-M2
#VERSION = mike3
VERSION = 0.9.0
PATCHFILE = @abs_srcdir@/patch-$(VERSION)

VPATH = @srcdir@
TARDIR = frobby_v$(VERSION)
TARFILE := frobby_v$(VERSION).tar.gz
# this site was unreliable:
# URL = http://www.broune.com/frobby
URL = http://macaulay2.com/Downloads/OtherSourceCode

BUILDTARGET = library
BUILDOPTIONS = GMP_INC_DIR=$(LIBRARIESDIR)/include	\
	CXXFLAGS="$(CXXFLAGS)"				\
	CXX="$(CXX)"					\
	LDFLAGS="$(LDFLAGS)"				\
	CPPFLAGS="$(CPPFLAGS)"				\
	RANLIB="@RANLIB@"
CHECKOPTIONS = $(BUILDOPTIONS)

# this ought to prevent trouble with carriage returns
PATCHOPTIONS = --ignore-whitespace

CONFIGURECMD = true
INSTALLCMD = \
	$(MKDIR_P) $(LIBRARIESDIR)/lib && \
	$(MKDIR_P) $(LIBRARIESDIR)/include && \
	cp bin/libfrobby.a $(LIBRARIESDIR)/lib/libfrobby.a && \
	cp src/frobby.h $(LIBRARIESDIR)/include/frobby.h && \
	cp src/stdinc.h $(LIBRARIESDIR)/include/stdinc.h
CHECKTARGET = test

# gcc 8.3 needs more memory
MLIMIT = 500000
VLIMIT = 500000

include ../Makefile.library

ifeq (@OS@-@ISSUE@,MicrosoftWindows-Cygwin)
LDFLAGS += -Wl,--enable-auto-import
endif
CFLAGS += -Wno-deprecated
# CFLAGS += -Wfatal-errors
Makefile: @srcdir@/Makefile.in ; cd ../.. && ./config.status libraries/frobby/Makefile
# Local Variables:
# compile-command: "make -C $M2BUILDDIR/libraries/frobby "
# End:
