starterkitversion

Virtual package for starting OCaml

Welcome to OCaml coding, here's an example _oasis file to get you started

OASISFormat: 0.4 OCamlVersion: >= 4.02.0 Name: opam_package_name Version: 0.1.0 Maintainers: New OCaml programmer Homepage: http://my_coolsite.com Synopsis: Some short description Authors: Cool@me.com License: BSD-3-clause Plugins: META (0.4), DevFiles (0.4) AlphaFeatures: ocamlbuild_more_args

Description: Some cool description

This is a comment and this below creates an binary program

Executable <some_program_name> Path: src BuildTools:ocamlbuild install: true MainIs: main.ml CompiledObject: native BuildDepends: package_one, package_two

Another comment, this builds a library called pg

Library pg Path: src

oasis will figure out the dependencies,

Just list the modules you want public,

Note that there's no .ml, just give the name

Modules: Pg CompiledObject: best BuildDepends: some_package, another_package

Here's one that uses C/C++ code, adapt as needed

Library lib_with_c Path: src BuildTools:ocamlbuild install: true CClib: -L/usr/local/lib -lfoo -lbar -lstdc++ CCOpt: -g -Wall -std=c++11 -x c++ -I/usr/local/include NativeOpt: -cc g++ ByteOpt: -cc g++ Modules: Some_lib CompiledObject: best CSources: some_lib_stubs.c BuildDepends: opam_lib1, opam_lib2

Auto generate everything with:

oasis setup -setup-update dynamic

then a simple

make builds your project.

AuthorEdgar Aroutiounian <edgar.factorial@gmail.com>
LicenseBSD-3-Clause
Published
Homepagehttps://github.com/fxfactorial/ocaml-starterkit
MaintainerEdgar Aroutiounian <edgar.factorial@gmail.com>
Dependencies
Edithttps://github.com/ocaml/opam-repository/tree/master/packages/starterkit/starterkit.1.0.0/opam
No package is dependent