Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add OCAMLOPT_SHARED for genenrating .cmxs files #69

Merged
merged 1 commit into from Mar 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/bytes/Makefile
Expand Up @@ -16,7 +16,7 @@ all:
opt:
$(OCAMLOPT) -a -o bytes.cmxa bytes.ml
if [ $(HAVE_NATDYNLINK) -gt 0 ]; then \
$(OCAMLOPT) -shared -o bytes.cmxs bytes.cmxa; \
$(OCAMLOPT_SHARED) -shared -o bytes.cmxs bytes.cmxa; \
fi

install: all
Expand Down
7 changes: 4 additions & 3 deletions src/findlib/Makefile
Expand Up @@ -15,6 +15,7 @@ NAME = findlib
# Need compiler-libs since ocaml-4.00
OCAMLC = ocamlc -I +compiler-libs
OCAMLOPT = ocamlopt -I +compiler-libs $(OCAMLOPT_G)
OCAMLOPT_SHARED = $(OCAMLOPT)
OCAMLDEP = ocamldep
OCAMLLEX = ocamllex
#CAMLP4O = camlp4 pa_o.cmo pa_op.cmo pr_o.cmo --
Expand Down Expand Up @@ -69,13 +70,13 @@ findlib_top.cma: $(TOBJECTS)
findlib.cmxa: $(XOBJECTS)
$(OCAMLOPT) -a -o findlib.cmxa $(XOBJECTS)
if [ $(HAVE_NATDYNLINK) -gt 0 ]; then \
$(OCAMLOPT) -shared -o findlib.cmxs $(XOBJECTS); \
$(OCAMLOPT_SHARED) -shared -o findlib.cmxs $(XOBJECTS); \
fi

findlib_top.cmxa: $(TXOBJECTS)
$(OCAMLOPT) -a -o findlib_top.cmxa $(TXOBJECTS)
if [ $(HAVE_NATDYNLINK) -gt 0 ]; then \
$(OCAMLOPT) -shared -o findlib_top.cmxs $(TXOBJECTS); \
$(OCAMLOPT_SHARED) -shared -o findlib_top.cmxs $(TXOBJECTS); \
fi

findlib_dynload.cma: $(DYNLOAD_OBJECTS)
Expand All @@ -84,7 +85,7 @@ findlib_dynload.cma: $(DYNLOAD_OBJECTS)
findlib_dynload.cmxa: $(DYNLOAD_XOBJECTS)
$(OCAMLOPT) -a -o findlib_dynload.cmxa $(DYNLOAD_XOBJECTS)
if [ $(HAVE_NATDYNLINK) -gt 0 ]; then \
$(OCAMLOPT) -shared -o findlib_dynload.cmxs $(DYNLOAD_XOBJECTS); \
$(OCAMLOPT_SHARED) -shared -o findlib_dynload.cmxs $(DYNLOAD_XOBJECTS); \
fi

findlib_config.ml: findlib_config.mlp $(TOP)/Makefile.config
Expand Down