Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ standard.ml
*.cmo
*.cmx
*.cmxa
*.cmxs
*.o
.chamo.sourceview.buffers
ocamlinit.png
14 changes: 10 additions & 4 deletions src/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ byte: r.cmi r.cmo r.cma oCamlR.cmo
make -C r-graphics byte
make -C r-grDevices byte

native: r.cmi r.cmx r.cmxa oCamlR.cmx
native: r.cmi r.cmx r.cmxa r.cmxs oCamlR.cmx
make -C math native
make -C r-base native
make -C r-stats native
Expand All @@ -47,7 +47,7 @@ native: r.cmi r.cmx r.cmxa oCamlR.cmx
make -C r-grDevices native

clean:
rm -f standard.ml *.o *.a *.so *.cmi *.cmo *.cmx *.cma *.cmxa
rm -f standard.ml *.o *.a *.so *.cmi *.cmo *.cmx *.cma *.cmxa *.cmxs
make -C math clean
make -C r-base clean
make -C r-stats clean
Expand All @@ -73,6 +73,9 @@ r.cma: dllr_stubs.so r.cmo
r.cmxa: dllr_stubs.so r.cmx
ocamlfind ocamlopt -verbose -a -ccopt -L$(RLIBDIR) -cclib -lr_stubs -cclib -lR -o r.cmxa r.cmx

r.cmxs: dllr_stubs.so r.cmx r_stubs.o
ocamlfind ocamlopt -verbose -shared r_stubs.o -cclib -lR -o r.cmxs r.cmx

libr_stubs.a: r_stubs.o
ar rcs libr_stubs.a r_stubs.o

Expand Down Expand Up @@ -102,6 +105,9 @@ rmath.cma: dllrmath_stubs.so math/rmath.cmo
rmath.cmxa: dllrmath_stubs.so math/rmath.cmx
$(OCAMLOPT) -verbose -a -cclib -lrmath_stubs -cclib -lRmath -o rmath.cmxa math/rmath.cmx

rmath.cmxs: dllrmath_stubs.so math/rmath.cmx rmath_stubs.o
$(OCAMLOPT) -verbose -shared rmath_stubs.o -cclib -lRmath -o rmath.cmxs math/rmath.cmx

math/rmath_stubs.o: math/rmath_stubs.c

RBASE_ML_SOURCES= \
Expand Down Expand Up @@ -143,8 +149,8 @@ doc: r.mli rbase.mli rstats.mli math/rmath.mli
-html -d ocamldoc $^

install: all remove
ocamlfind install -destdir /usr/lib/ocaml R META *.[oa] *.so *.cm[axi] *.cmxa oCamlR.cmo \
math/*.[oa] math/*.so math/*.cm[axi] math/*.cmxa \
ocamlfind install R META *.[oa] *.so *.cm[axi] *.cmxa *.cmxs oCamlR.cmo \
math/*.[oa] math/*.so math/*.cm[axi] math/*.cmxa math/*.cmxs \
r-base/_build/*.[oa] r-base/_build/*.cm[axi] r-base/_build/*.cmxa \
r-stats/_build/*.[oa] r-stats/_build/*.cm[axi] r-stats/_build/*.cmxa \
r-graphics/_build/*.[oa] r-graphics/_build/*.cm[axi] r-graphics/_build/*.cmxa \
Expand Down
5 changes: 4 additions & 1 deletion src/math/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,17 @@ LINKFLAGS_BYTE=$(INCLUDES) -cclib -lRmath
all: byte native

byte: rmath.cma
native: rmath.cmxa
native: rmath.cmxa rmath.cmxs

rmath.cma: dllrmath_stubs.so rmath.cmo
ocamlc -verbose -a -dllib dllrmath_stubs.so -dllib libRmath.so -o rmath.cma rmath.cmo

rmath.cmxa: dllrmath_stubs.so rmath.cmx
ocamlopt -verbose -a -cclib -lrmath_stubs -cclib -lRmath -o rmath.cmxa rmath.cmx

rmath.cmxs: dllrmath_stubs.so rmath.cmx rmath_stubs.o
ocamlopt -verbose -shared rmath_stubs.o -o rmath.cmxs rmath.cmx

rmath.cmi: rmath.mli
ocamlfind ocamlc -verbose -c rmath.mli

Expand Down