Skip to content

cleanup Makefiles for ocaml use newer findlib features #274

Closed
flixr opened this Issue Sep 10, 2012 · 1 comment

1 participant

@flixr
Paparazzi Autopilot Team member
flixr commented Sep 10, 2012

When trying to add netclient I was annoyed by the all the config needed to link the ocaml code and found this:
http://stuff.mit.edu/afs/sipb/project/ocaml/src/other/netclient-0.3/README

IF YOU HAVE FINDLIB-0.2 OR NEWER:

This version of "findlib" is much more convenient. It comes with a new
frontend for "ocamlc" that is intelligent enought to find out most of
the compiler/linker options itself.
Link with
ocamlfind ocamlc -custom -o output -package netclient -linkpkg

Also the includes, libs, etc.. needed for ocaml are repeated in a lot of makefiles. Should be cleaned up to use one common makefile for this and using new findlib would probably also help a lot.

It might make even sense to switch to CMake to find all the dependencies... but that is another issue for later...

@flixr
Paparazzi Autopilot Team member
flixr commented Jan 16, 2013

sw/tools/Makefile already uses ocamfind with the package option to find/include the libs. Not sure if that can be use for ocamlmklib as well...

@flixr flixr added a commit that referenced this issue Mar 29, 2013
@flixr flixr Merge branch 'ocamlfind_no_custom'
- Use findlib (ocamlfind) for ocaml packages.
- Create META file for pprz ocaml lib.
- Link dynamically instead of statically (no -custom), which also results in faster build times.
- Use mktemp to properly create temporary files.
- More makefile cleanup...

closes #274
de13525
@flixr flixr closed this Mar 29, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.