Files
paparazzi/sw/Makefile.ocaml
T
Gautier Hattenberger 4d920c118c [ocaml] fix and update for latest ocaml
fix usage of Bytes and String
drop support of ocaml < 4.02
we keep Compat for functions that need ocaml 4.03 until end of life of
Ubuntu Xenial 16.04, drop support of previous releases
enforce type safe_string option to prevent future errors
replace Pervasives by Stdlib (depreciated in latest ocaml vesions)
only use ocamlnet >= 4.0.4
2020-03-30 23:47:59 +02:00

53 lines
1.8 KiB
Makefile

# Hey Emacs, this is a -*- makefile -*-
#
# Copyright (C) 2013 Gautier Hattenberger
#
# This file is part of paparazzi.
#
# paparazzi is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
#
# paparazzi is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with paparazzi; see the file COPYING. If not, write to
# the Free Software Foundation, 59 Temple Place - Suite 330,
# Boston, MA 02111-1307, USA.
#
# General ocaml compiling tools and pprz lib
# error if PAPARAZZI_SRC is not set and trying to compile
ifneq ($(MAKECMDGOALS),clean)
ifeq ($(PAPARAZZI_SRC),)
$(error PAPARAZZI_SRC not set, please set it manually or invoke make from the toplevel paparazzi dir)
endif
endif
OCAML = ocaml
OCAMLC = ocamlfind ocamlc -safe-string
OCAMLOPT = ocamlfind ocamlopt -safe-string
OCAMLDEP = ocamlfind ocamldep
OCAMLMKLIB = ocamlmklib
OCAMLLEX=ocamllex
OCAMLYACC=ocamlyacc
OCAMLLIBDIR=$(shell $(OCAMLC) -where)
LIBPPRZLINKDIR = $(PAPARAZZI_HOME)/var/lib/ocaml
LIBPPRZDIR = $(PAPARAZZI_SRC)/sw/lib/ocaml
LIBPPRZCMA = $(LIBPPRZDIR)/lib-pprz.cma
LIBPPRZCMXA = $(LIBPPRZCMA:.cma=.cmxa)
XLIBPPRZCMA = $(LIBPPRZDIR)/xlib-pprz.cma
XLIBPPRZCMXA = $(XLIBPPRZCMA:.cma=.cmxa)
LIBPPRZLINKCMA = $(LIBPPRZLINKDIR)/pprzlink/lib-pprzlink.cma
LIBPPRZLINKCMXA = $(LIBPPRZLINKCMA:.cma=.cmxa)
OCAMLDLL = -dllpath $(LIBPPRZDIR),$(LIBPPRZLINKDIR)
OCAMLXDLL = -dllpath $(LIBPPRZDIR),$(LIBPPRZLINKDIR)
OCAMLPATH:=$(shell echo $(LIBPPRZLINKDIR):$(LIBPPRZDIR):$(OCAMLPATH))
export OCAMLPATH