SRCDIR = ../src
AUTOGEN_SOURCES = gslsf-module.c gslconst-module.c gslcdf-module.c
AUTOGEN_DOCS = gslsf-module.tm gslconst-module.tm gslcdf-module.tm
DOCDIR = ../doc/tm/rtl/
#PREFIX = $(HOME)/sys/i686/test
PREFIX = /usr

all: $(AUTOGEN_SOURCES)

gslsf-module.c: template.c codegen
	./codegen gslsf $(PREFIX)/include/gsl/gsl_sf*.h

gslconst-module.c: template.c codegen
	./codegen gslconst $(PREFIX)/include/gsl/gsl_const*.h

gslcdf-module.c: template.c codegen
	./codegen gslcdf $(PREFIX)/include/gsl/gsl_cdf*.h # $(PREFIX)/include/gsl/gsl_randist.h

install: $(AUTOGEN_SOURCES)
	mv $(AUTOGEN_SOURCES) $(SRCDIR)
	mv $(AUTOGEN_DOCS) $(DOCDIR)

clean:
	/bin/rm -f *~ \#* $(AUTOGEN_SOURCES)

