Commit c333bcaf authored by Erwan Jahier's avatar Erwan Jahier

Clean-up the main Makefile + add a rule to build dllcamlidl.so

also, rename call-via-socket.ml inti call_via_socket.ml to avoid ocaml warning.
parent 26f85117
......@@ -7,27 +7,33 @@ all:build
include ./Makefile.version
-include mymakefile
slink:
rm -f bin lib include
ln -s $(HOSTTYPE)/bin
ln -s $(HOSTTYPE)/lib
ln -s $(HOSTTYPE)/include
###################################################
# camlidl clutches...
# to run after a 'git clone', or a change in the ocaml version, or to compile on another arch
# "opam install camlidl" does not generate (nor install) dllcamlidl.so
CAMLIDL=$(shell ocamlfind query camlidl)
build: setup.data
ocaml setup.ml -build
setup.ml:_oasis lutin/src/version.ml polka/vector.ml lutin-utils/src/lutinutils.ml
oasis setup
dllcamlidl.so:$(CAMLIDL)/dllcamlidl.so
$(CAMLIDL)/dllcamlidl.so: $(CAMLIDL)/libcamlidl.a
ocamlmklib -o camlidl $<
cp dllcamlidl.so $@
rm dllcamlidl.so libcamlidl.a
# a clutch because oasis does not support camlidl
# Some more clutches because oasis does not support camlidl
polka/vector.ml: polka/vector.idl
cd polka; make idl
lutin-utils/src/lutinutils.ml: lutin-utils/src/lutinUtils.idl
cd lutin-utils/src/; make
###################################################
build: setup.data $(CAMLIDL)/dllcamlidl.so
ocaml setup.ml -build
setup.ml:_oasis lutin/src/version.ml polka/vector.ml lutin-utils/src/lutinutils.ml
oasis setup
setup.data:configure
configure: setup.ml
ocaml setup.ml -configure \
......@@ -35,11 +41,6 @@ configure: setup.ml
--exec-prefix $(LURETTE_PATH)/$(HOSTTYPE) \
--enable-tests
utest: build
./ounitTestRun.native -output-html-dir test/html -output-junit-file test/result-junit.xml
.PHONY:doc
doc:
ocaml setup.ml -doc
......@@ -55,48 +56,16 @@ reinstall:
ocaml setup.ml -reinstall
cp lutin/src/lut4c_stubs.h $(shell ocamlc -where)/../lutin/
AR=ar
XXX= -I +ezdl -cclib -lezdl ezdl.cmxa
# essayons a la main
xxx:
cd _build/lutin/src; \
ocamlopt -output-obj \
-I +rdbg-plugin \
str.cmxa unix.cmxa nums.cmxa rdbg-plugin.cmxa \
../../polka/polka.cmxa ../../gbddml/gbddml.cmxa \
$(XXX) \
-o lut4c_lib.o \
version.cmx lutVersion.cmx lexeme.cmx utils.cmx util.cmx sol_nb.cmx type.cmx prevar.cmx value.cmx var.cmx exp.cmx ne.cmx constraint.cmx gne.cmx thickness.cmx poly_draw.cmx polyhedron.cmx formula_to_bdd.cmx store.cmx draw.cmx bddd.cmx fair_bddd.cmx solver.cmx prog.cmx fGen.cmx lucFGen.cmx lucky.cmx rif.cmx reactive.cmx exprUtil.cmx expEval.cmx verbose.cmx lutErrors.cmx lutParser.cmx lutLexer.cmx syntaxe.cmx parsers.cmx syntaxeDump.cmx ckTypeEff.cmx ckIdentInfo.cmx checkEnv.cmx lutPredef.cmx checkType.cmx coIdent.cmx coAlgExp.cmx coTraceExp.cmx glue.cmx guard.cmx expand.cmx loopWeights.cmx autoGen.cmx auto2Lucky.cmx lutProg.cmx luc2alice.cmx luc2c.cmx mainArg.cmx lutExe.cmx lut4c.cmx ;
[ -d tmp_dir ] || mkdir tmp_dir && \
cd tmp_dir && rm -f * && \
$(AR) rcs liblut4c.a ../lut4c_lib.o ../lut4c_stubs.o && \
$(AR) x $(shell ocamlc -where)/libasmrun.a &&\
$(AR) q liblut4c.a *.o && rm *.o &&\
cp liblut4c.a ..
distclean:
ocaml setup.ml -distclean
rm -rf _build/src
BIN_INSTALL_DIR=$(HOSTTYPE)/bin
cpcomp:
cp `which lus2lic$(EXE)` $(BIN_INSTALL_DIR) || true
cp `which lus2ec` $(BIN_INSTALL_DIR) || true
cp `which ecexe$(EXE)` $(BIN_INSTALL_DIR) || true
cp `which ec2c$(EXE)` $(BIN_INSTALL_DIR) || true
cp `which simec$(EXE)` $(BIN_INSTALL_DIR) || true
.PHONY: test slink
test: slink cpcomp
cd examples && make test
###############################
###################################################
# for developpers
include ./Makefile.dev
......@@ -119,7 +119,7 @@ Executable "check-rif"
Executable "call-via-socket"
Path: ltop/src
MainIs: call-via-socket.ml
MainIs: call_via_socket.ml
BuildDepends: str,unix
Build: true
Install:true
......
# OASIS_START
# DO NOT EDIT (digest: 5817daa05ad12eced985832be3cd3479)
# DO NOT EDIT (digest: 8f15becd0ae55cf03260d080626a66b2)
# Ignore VCS directories, you can use the same kind of rule outside
# OASIS_START/STOP if you want to exclude directories that contains
# useless stuff for the build process
......@@ -137,8 +137,8 @@ true: annot, bin_annot
<ltop/src/*.ml{,i,y}>: package(num)
<ltop/src/*.ml{,i,y}>: use_ezdl
# Executable call-via-socket
"ltop/src/call-via-socket.native": package(str)
"ltop/src/call-via-socket.native": package(unix)
"ltop/src/call_via_socket.native": package(str)
"ltop/src/call_via_socket.native": package(unix)
<ltop/src/*.ml{,i,y}>: package(str)
<ltop/src/*.ml{,i,y}>: package(unix)
# OASIS_STOP
......
export OCAMLOPT=ocamlopt
LTOP=../../../bin/lurettetop$(EXE)
LIB=../../../lib -I +rdbg-plugin `ocamlfind query lutils -i-format`
LIB= `ocamlfind query -r rdbg-plugin -i-format` \
`ocamlfind query -r lutin -i-format`
MAIN=rabbit
......@@ -17,7 +18,7 @@ $(EXPDIR):
CMXA=$(shell ocamlfind query lutin -a-format -r -predicates native)
%.cmxs: %.ml
ocamlfind ocamlopt -shared -o $*.cmxs -I $(LIB) $(CMXA) graphics.cmxa $*.ml
ocamlfind ocamlopt -shared -o $*.cmxs $(LIB) $(CMXA) graphics.cmxa $*.ml
clean:
......
......@@ -17,9 +17,8 @@ CMXA_LIB = unix.cmxa nums.cmxa str.cmxa \
ezdl.cmxa gbddml.cmxa polka.cmxa \
rdbg-plugin.cmxa lutils.cmxa lutin-utils.cmxa lutin.cmxa
CLIB= `ocamlfind query camlidl -l-format` \
`ocamlfind query lutin-utils -i-format` \
`ocamlfind query lutils -i-format` \
CLIB= `ocamlfind query -r rdbg-plugin -i-format` \
`ocamlfind query -r lutin -i-format` \
-cclib -lcamlidl -cclib -lgmp
INCLUDE_DIR = -I +gmp -I +camlidl -I +polka -I +gbddml \
-I +rdbg-plugin -I +lutin \
......
let str="2.5"
let sha="7df2c3b"
let sha="26f8511"
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