brltty/brltty-5.6-ocaml-add-flags.patch
2018-12-05 21:51:13 +01:00

38 lines
1.5 KiB
Diff

diff --git a/Bindings/OCaml/Makefile.in b/Bindings/OCaml/Makefile.in
index 47f7201..a97f55c 100644
--- a/Bindings/OCaml/Makefile.in
+++ b/Bindings/OCaml/Makefile.in
@@ -55,25 +55,25 @@ OCAML_FILES = $(OCAML_MISC) $(OCAML_CLIBS) $(OCAML_BCLIB) $(OCAML_NCLIB)
all : $(OCAML_FILES)
$(OCAML_CLIBS) : brlapi_stubs.$O brlapi
- $(OCAMLMKLIB) $(API_LDFLAGS) -oc $(OCAML_LIB)_stubs brlapi_stubs.$O
+ $(OCAMLMKLIB) -ldopt "$(LDFLAGS)" $(API_LDFLAGS) -oc $(OCAML_LIB)_stubs brlapi_stubs.$O
$(OCAML_BCLIB) : $(OCAML_CLIBS) brlapi.cmo
- $(OCAMLC) -a $(OCAMLMKLIB_FLAGS) -o $(OCAML_LIB).cma brlapi.cmo
+ $(OCAMLC) -ccopt "$(CFLAGS)" -a $(OCAMLMKLIB_FLAGS) -o $(OCAML_LIB).cma brlapi.cmo
$(OCAML_NCLIB) : $(OCAML_CLIBS) brlapi.cmx
- $(OCAMLMKLIB) $(OCAMLMKLIBOPT_FLAGS) -o $(OCAML_LIB) brlapi.cmx
+ $(OCAMLMKLIB) -ldopt "$(LDFLAGS)" $(OCAMLMKLIBOPT_FLAGS) -o $(OCAML_LIB) brlapi.cmx
brlapi.cmi: brlapi.mli
- $(OCAMLC) -o $@ -c brlapi.mli
+ $(OCAMLC) -ccopt "$(CFLAGS)" -o $@ -c brlapi.mli
brlapi.cmo: brlapi.ml brlapi.cmi
- $(OCAMLC) -o $@ -c brlapi.ml
+ $(OCAMLC) -ccopt "$(CFLAGS)" -o $@ -c brlapi.ml
brlapi.cmx: brlapi.ml brlapi.cmi
- $(OCAMLOPT) -o $@ -c brlapi.cmx brlapi.ml
+ $(OCAMLOPT) -ccopt "$(CFLAGS)" -o $@ -c brlapi.cmx brlapi.ml
brlapi_stubs.$O: $(SRC_DIR)/brlapi_stubs.c
- $(OCAMLC) -I $(BLD_TOP)$(PGM_DIR) -I $(SRC_TOP)$(PGM_DIR) -c $(SRC_DIR)/brlapi_stubs.c
+ $(OCAMLC) -ccopt "$(CFLAGS)" -I $(BLD_TOP)$(PGM_DIR) -I $(SRC_TOP)$(PGM_DIR) -c $(SRC_DIR)/brlapi_stubs.c
brlapi.mli : $(SRC_DIR)/main.mli constants.mli
cat $(SRC_DIR)/main.mli constants.mli > $@