Created
January 30, 2023 19:39
-
-
Save apsheronets/050d6a1fd7893c9b641b47a8382adc62 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
PACKAGES = lwt | |
FILES = one.ml two.ml | |
CAMLC = ocamlfind ocamlc -thread $(LIB) | |
CAMLOPT = ocamlfind ocamlopt -thread $(LIB) | |
CAMLDEP = ocamlfind ocamldep $(LIB) | |
LIB = -package $(PACKAGES) | |
all: executable.opt executable.byte | |
executable.opt: $(FILES:.ml=.cmx) | |
$(CAMLOPT) -linkpkg -o $@ $^ | |
executable.byte: $(FILES:.ml=.cmo) | |
$(CAMLC) -linkpkg -o $@ $^ | |
.SUFFIXES: | |
.SUFFIXES: .ml .mli .cmo .cmi .cmx | |
.ml.cmo: | |
$(CAMLC) -c $< | |
.mli.cmi: | |
$(CAMLC) -c $< | |
.ml.cmx: | |
$(CAMLOPT) -c $< | |
clean: | |
-rm -f *.cm[ioxa] *.cmx[as] *.o *.a *~ | |
-rm -f .depend | |
-rm -f executable.opt executable.byte | |
depend: .depend | |
.depend: $(FILES) | |
$(CAMLDEP) $(FILES:.ml=.mli) $(FILES) > .depend | |
FORCE: | |
-include .depend |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment