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
INCLUDE=$(PREFIX)/include/gsl

usage:
	@echo Usage: make PREFIX=/path/to/gsl/prefix all
all: $(AUTOGEN_SOURCES)

gslsf-module.c: template.c codegen
	./codegen gslsf $(INCLUDE)/gsl_sf*.h

gslconst-module.c: template.c codegen
	./codegen gslconst $(INCLUDE)/gsl_const*.h

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

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

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

