Commit 2e40bee2 authored by Erwan Jahier's avatar Erwan Jahier
Browse files

More code regorganisation and Makefile cleanning.

parent 70a2023a
......@@ -4,8 +4,11 @@
#
# A modifier si ncessaire !!!
LURETTE_PATH = $(HOME)/lurette
# XXX HOSTTYPE doit etre defini !!
ifeq ($(HOST_TYPE),win32)
OCAML_LIB="c:\TEMP\ocaml\lib"
OCAMLOPT = /cygdrive/c/TEMP/ocaml/bin/ocamlopt
......
......@@ -4,8 +4,8 @@ VERSION:="1.50"
SHA:=`git log -1 --pretty=format:"%h"`
gen_version:
rm -f source/version.ml
echo "let str=\"$(VERSION)\"" > source/version.ml
echo "let sha=\"$(SHA)\"" >> source/version.ml
echo "let str=\"$(VERSION)\"" > source/common/version.ml
echo "let sha=\"$(SHA)\"" >> source/common/version.ml
rm -f version.tex
date +VERSION_DATE=%d-%m-%y > version.tex
echo "\\newcommand{\\version}{$(VERSION)}" > version.tex
......
......@@ -6,7 +6,7 @@ USE_CAMLP4 = yes
LIBS = str unix
SOURCES = ../genlex.ml gnuplot-rif.ml
SOURCES = ../common/genlex.ml gnuplot-rif.ml
RESULT = gnuplot-rif
......
......@@ -7,7 +7,7 @@ OCAMLNCFLAGS = -inline 10
ifndef OCAMLFLAGS
OCAMLFLAGS := -noassert -unsafe
endif
OCAMLFLAGS += -I $(OCAMLLIB) -I $(PREFIX)/$(HOSTTYPE)/lib
OCAMLFLAGS += -I ../common -I $(OCAMLLIB) -I $(PREFIX)/$(HOSTTYPE)/lib
IDLFLAGS=-nocpp
......@@ -36,7 +36,7 @@ USE_CAMLP4 = yes
HERE=$(LURETTE_PATH)/source/
HERE=.
THERE=..
THERE=../common
SOURCES_C = \
$(THERE)/liblutin_c.c \
......
......@@ -9,7 +9,7 @@ OCAMLNCFLAGS = -inline 10
ifndef OCAMLFLAGS
OCAMLFLAGS := -noassert -unsafe
endif
OCAMLFLAGS += -I $(OCAMLLIB) -I $(PREFIX)/$(HOSTTYPE)/lib
OCAMLFLAGS += -I ../common -I $(OCAMLLIB) -I $(PREFIX)/$(HOSTTYPE)/lib
IDLFLAGS=-nocpp
......@@ -36,7 +36,7 @@ CLIBS = camlidl $(CLIBS_WIN32) bdd_stubs
USE_CAMLP4 = yes
HERE=.
THERE=..
THERE=../common
......
......@@ -7,7 +7,7 @@ OCAMLNCFLAGS = -inline 10
ifndef OCAMLFLAGS
OCAMLFLAGS := -noassert -unsafe
endif
OCAMLFLAGS += -I $(OCAMLLIB) -I $(PREFIX)/$(HOSTTYPE)/lib
OCAMLFLAGS += -I ../common -I $(OCAMLLIB) -I $(PREFIX)/$(HOSTTYPE)/lib
IDLFLAGS=-nocpp
......@@ -35,7 +35,7 @@ USE_CAMLP4 = yes
HERE=$(LURETTE_PATH)/source/
HERE=.
THERE=..
THERE=../common
SOURCES_C = \
......
......@@ -44,7 +44,7 @@ USE_CAMLP4 = yes
HERE=$(LURETTE_PATH)/source/
HERE=.
THERE=..
THERE=../common
SOURCES_C = \
$(THERE)/Ezdl_c.c $(THERE)/liblutin_c.c $(THERE)/liblutin.idl \
......
......@@ -35,7 +35,7 @@ CLIBS = bdd_stubs bdd camlidl gmp stdc++ polkag_caml polkag
USE_CAMLP4 = yes
HERE=.
THERE=..
THERE=../common
SOURCES_OCAML = \
......
......@@ -13,7 +13,7 @@ OCAMLNCFLAGS = -inline 10
ifndef OCAMLFLAGS
OCAMLFLAGS := -noassert -unsafe
endif
OCAMLFLAGS += -I $(OCAMLLIB) -I $(PREFIX)/$(HOSTTYPE)/lib
OCAMLFLAGS += -I ../common -I $(OCAMLLIB) -I $(PREFIX)/$(HOSTTYPE)/lib
IDLFLAGS=-nocpp
......@@ -41,7 +41,7 @@ USE_CAMLP4 = yes
HERE=.
THERE=..
THERE=../common
SOURCES_C = \
......@@ -123,7 +123,7 @@ SOURCES_OCAML0:= \
$(THERE)/rif.mli \
$(THERE)/rif.ml \
$(HERE)/luc_exe.mli \
$(HERE)/luc_exe.ml \
$(HERE)/luc_exe.ml
ifdef MLONLY
......
......@@ -11,7 +11,7 @@ OCAMLNCFLAGS = -inline 10
ifndef OCAMLFLAGS
OCAMLFLAGS := -noassert -unsafe
endif
OCAMLFLAGS += -I $(OCAMLLIB) -I $(PREFIX)/$(HOSTTYPE)/lib
OCAMLFLAGS += -I ../common -I $(OCAMLLIB) -I $(PREFIX)/$(HOSTTYPE)/lib
IDLFLAGS=-nocpp
......@@ -37,9 +37,8 @@ CLIBS = camlidl $(CLIBS_WIN32) bdd_stubs
USE_CAMLP4 = yes
HERE=$(LURETTE_PATH)/source/
HERE=.
THERE=..
THERE=../common
SOURCES_C = \
$(THERE)/liblutin_c.c \
......
......@@ -19,7 +19,7 @@ endif
USE_CAMLP4 = yes
THERE=..
THERE=../common
HERE=.
......@@ -30,9 +30,6 @@ SOURCES = \
RESULT = ./lurettetop_exe
v:
ocamlc.opt -v
OCAMLMAKEFILE = ../../OcamlMakefile
-include $(OCAMLMAKEFILE)
......@@ -13,7 +13,7 @@ OCAMLNCFLAGS = -inline 10
ifndef OCAMLFLAGS
OCAMLFLAGS := -noassert -unsafe
endif
OCAMLFLAGS += -I $(OCAMLLIB) -I $(PREFIX)/$(HOSTTYPE)/lib
OCAMLFLAGS += -I ../common -I $(OCAMLLIB) -I $(PREFIX)/$(HOSTTYPE)/lib
IDLFLAGS=-nocpp
......@@ -38,7 +38,7 @@ CLIBS = camlidl $(CLIBS_WIN32) bdd_stubs
ZELANG=lut
LURETTEDIR=..
LURETTEDIR=../common
LUTDIR=.
RESULT=lutin
......
This diff is collapsed.
#include <stdio.h>
#include <math.h>
#include <assert.h>
#include "LibMathAdvanced.h"
/* Inverse hyperbolic cosine */
void AcoshR (real In, real * pOut)
{
*pOut = log( In +sqrt( ( In * In) - 1.0));
}
/* Inverse Cosine */
void AcosR (real In, real * pOut)
{
*pOut = acos(In);
}
/* Inverse hyperbolic sine */
/* The Result is slightly different from Simulink result
Difference is of kind E-13
(for big input (for example E4) diference is of kind E-8 ) */
void AsinhR (real In, real * pOut)
{
*pOut = log( In +sqrt( 1.0 + ( In * In)));
}
/* Inverse sine */
void AsinR (real In, real * pOut)
{
*pOut = asin(In);
}
/* Inverse hyperbolic tangent */
void AtanhR (real In, real * pOut)
{
*pOut = 0.5 * log( ( 1 + In) / ( 1 - In));
}
/* Inverse tangent */
void AtanR (real In, real * pOut)
{
*pOut = atan(In);
}
/* Four quadrant inverse tangent */
void Atan2R (real In1, real In2, real * pOut)
{
*pOut = atan2( In1, In2);
}
/* Hyperbolic cosine */
void CoshR (real In, real * pOut)
{
*pOut = cosh(In);
}
/* Cosine */
void CosR (real In, real * pOut)
{
*pOut = cos(In);
}
/* Exponential */
void ExpR(real In, real * pOut)
{
*pOut = exp( In );
}
/* Logarithm with base e */
void LnR(real In, real * pOut)
{
*pOut = log(In);
}
/* Logarithm with base 10 */
void LogR(real In, real * pOut)
{
*pOut = log10(In);
}
/* Power */
void PowR(real In, real Power, real * pOut)
{
assert(In>0 || (In=0 && Power>0));
*pOut = pow(In, Power);
}
/* Hyperbolic sine */
void SinhR (real In, real * pOut)
{
*pOut = sinh(In);
}
/* Sine */
void SinR (real In, real * pOut)
{
*pOut = sin(In);
}
/* Sqrt */
void SqrtR (real In, real * pOut)
{
*pOut = sqrt(In);
}
/* Tangent */
void TanR (real In, real * pOut)
{
*pOut = tan(In);
}
/* Hyperbolic tangent */
void TanhR (real In, real * pOut)
{
*pOut = tanh(In);
}
/* 10^x */
void TenPowR(real In, real * pOut)
{
*pOut = pow(10,In);
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment