topsrc = @top_srcdir@

CC = @CC@
INSTALL_DATA = cp -fp

prefix = @prefix@
gretldir = $(prefix)/share/gretl
VPATH = $(topsrc)/share/bcih

fedstl.bin: mkbin fedstl.dat
	./mkbin $(topsrc)/share/bcih 

mkbin: mkbin.c
	$(CC) -o $@ $<

install: fedstl.bin
	$(INSTALL_DATA) fedstl.bin $(gretldir)/db/fedstl.bin
	$(INSTALL_DATA) $(topsrc)/share/bcih/fedstl.idx $(gretldir)/db/fedstl.idx

clean:
	rm -f mkbin fedstl.bin

distclean: clean
	rm -f Makefile