summaryrefslogtreecommitdiff
path: root/otherlibs/Makefile
diff options
context:
space:
mode:
authorSébastien Hinderer <Sebastien.Hinderer@inria.fr>2018-06-20 13:39:09 +0200
committerSébastien Hinderer <Sebastien.Hinderer@inria.fr>2018-06-20 14:01:42 +0200
commit85fa27f7e97351afe62555793a3824a21b0cc601 (patch)
tree1a54d23b179b6e1598bf116e409fa31106eeef4f /otherlibs/Makefile
parenta10a3f58064cf25ef9b16fc9203b3bd242d8bba1 (diff)
downloadocaml-85fa27f7e97351afe62555793a3824a21b0cc601.tar.gz
Rename C compiler related build variables
This commit renames a few C compiler related build variables so that they are reserved for the build system. They will then be re-introduced, but this time as user varialbes whose value can be freely customized when compiling the package, without risking to conflict with those command-line flags that are required by the build system itself. Here are the variables this commit renames: - CFLAGS -> OC_CFLAGS - CPPFLAGS -> OC_CPPFLAGS - LDFLAGS -> OC_LDFLAGS Note: before this commit the compilation of scheduler.c in otherlibs/threads was relying on make's implicit rule to compile C files. Since this commit stops using the standard variables for flags, it is necessary to introduce an explicit rule to compile C files and that makes use of the newly introduced variables.
Diffstat (limited to 'otherlibs/Makefile')
-rw-r--r--otherlibs/Makefile6
1 files changed, 3 insertions, 3 deletions
diff --git a/otherlibs/Makefile b/otherlibs/Makefile
index b2034f5421..20fddc3ae2 100644
--- a/otherlibs/Makefile
+++ b/otherlibs/Makefile
@@ -31,8 +31,8 @@ endif
CAMLC=$(CAMLRUN) $(ROOTDIR)/ocamlc -nostdlib -I $(ROOTDIR)/stdlib
CAMLOPT=$(CAMLRUN) $(ROOTDIR)/ocamlopt -nostdlib \
-I $(ROOTDIR)/stdlib
-CFLAGS += $(SHAREDLIB_CFLAGS) $(EXTRACFLAGS)
-CPPFLAGS += -I$(ROOTDIR)/byterun
+OC_CFLAGS += $(SHAREDLIB_CFLAGS) $(EXTRACFLAGS)
+OC_CPPFLAGS += -I$(ROOTDIR)/byterun
# Compilation options
COMPFLAGS=-absname -w +a-4-9-41-42-44-45-48 -warn-error A -bin-annot -g \
@@ -127,4 +127,4 @@ clean:: partialclean
$(CAMLOPT) -c $(COMPFLAGS) $(OPTCOMPFLAGS) $<
.c.$(O):
- $(CC) -c $(CFLAGS) $(CPPFLAGS) $(OUTPUTOBJ)$@ $<
+ $(CC) -c $(OC_CFLAGS) $(OC_CPPFLAGS) $(OUTPUTOBJ)$@ $<