forked from ocaml/ocaml
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile.common
53 lines (48 loc) · 2.25 KB
/
Makefile.common
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
#**************************************************************************
#* *
#* OCaml *
#* *
#* Gabriel Scherer, projet Parsifal, INRIA Saclay *
#* *
#* Copyright 2018 Institut National de Recherche en Informatique et *
#* en Automatique. *
#* *
#* All rights reserved. This file is distributed under the terms of *
#* the GNU Lesser General Public License version 2.1, with the *
#* special exception on linking described in the file LICENSE. *
#* *
#**************************************************************************
# This makefile contains common definitions shared by other Makefiles
# We assume that Makefile.config has already been included
INSTALL ?= install
INSTALL_DATA ?= $(INSTALL) -m u=rw,g=rw,o=r
INSTALL_PROG ?= $(INSTALL) -m u=rwx,g=rwx,o=rx
# note: these are defined by lazy expansions
# as some parts of the makefiles change BINDIR, etc.
# and expect INSTALL_BINDIR, etc. to stay in synch
# (see `shellquote` in tools/Makefile)
INSTALL_BINDIR = $(DESTDIR)$(BINDIR)
INSTALL_LIBDIR = $(DESTDIR)$(LIBDIR)
INSTALL_STUBLIBDIR = $(DESTDIR)$(STUBLIBDIR)
INSTALL_MANDIR = $(DESTDIR)$(MANDIR)
ifeq "$(UNIX_OR_WIN32)" "win32"
FLEXDLL_SUBMODULE_PRESENT := $(wildcard $(ROOTDIR)/flexdll/Makefile)
else
FLEXDLL_SUBMODULE_PRESENT =
endif
ifeq "$(FLEXDLL_SUBMODULE_PRESENT)" ""
FLEXLINK_ENV =
CAMLOPT_CMD = $(CAMLOPT)
OCAMLOPT_CMD = $(OCAMLOPT)
MKLIB_CMD = $(MKLIB)
ocamlc_cmd = $(ocamlc)
ocamlopt_cmd = $(ocamlopt)
else
FLEXLINK_ENV = \
OCAML_FLEXLINK="$(ROOTDIR)/boot/ocamlrun $(ROOTDIR)/flexdll/flexlink.exe"
CAMLOPT_CMD = $(FLEXLINK_ENV) $(CAMLOPT)
OCAMLOPT_CMD = $(FLEXLINK_ENV) $(OCAMLOPT)
MKLIB_CMD = $(FLEXLINK_ENV) $(MKLIB)
ocamlc_cmd = $(FLEXLINK_ENV) $(ocamlc)
ocamlopt_cmd = $(FLEXLINK_ENV) $(ocamlopt)
endif