Mercurial > mxe-octave
changeset 1926:c57294700cfd
add test program to package gsl
author | Tony Theodore <tonyt@logyst.com> |
---|---|
date | Sun, 10 Jul 2011 14:19:01 +1000 |
parents | 2f582acd8c5a |
children | d0e321f47add |
files | src/gsl-test.c src/gsl.mk |
diffstat | 2 files changed, 23 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/gsl-test.c Sun Jul 10 14:19:01 2011 +1000 @@ -0,0 +1,18 @@ +/* This file is part of mingw-cross-env. */ +/* See doc/index.html for further information. */ + +#include <stdio.h> +#include <gsl/gsl_sf_bessel.h> + +int main(int argc, char *argv[]) +{ + double x, y; + + (void)argc; + (void)argv; + + x = 5.0; + y = gsl_sf_bessel_J0 (x); + printf ("J0(%g) = %.18e\n", x, y); + return 0; +}
--- a/src/gsl.mk Fri Jul 08 11:01:33 2011 +0200 +++ b/src/gsl.mk Sun Jul 10 14:19:01 2011 +1000 @@ -27,4 +27,9 @@ --enable-static $(MAKE) -C '$(1)' -j '$(JOBS)' $(MAKE) -C '$(1)' -j 1 install + + '$(TARGET)-gcc' \ + -W -Wall -Werror -ansi -pedantic \ + '$(2).c' -o '$(PREFIX)/$(TARGET)/bin/test-gsl.exe' \ + -lgsl endef