From 56e94072ed4386aacd201843839a9e7df1a91784 Mon Sep 17 00:00:00 2001 From: Mylloon Date: Tue, 3 Dec 2024 21:23:33 +0100 Subject: [PATCH] add run --- ocaml.mk | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/ocaml.mk b/ocaml.mk index f4f295f..246c487 100644 --- a/ocaml.mk +++ b/ocaml.mk @@ -1,13 +1,19 @@ CC = ocamlopt RM = rm -rf -OUTPUT = exe.byte -NAME = main -LIB = unix.cmxa -I +unix +NAME = main +EXE = a.out +LIB = unix.cmxa -I +unix -main: - $(CC) -o $(OUTPUT) $(LIB) $(NAME).ml + +all: run + +compilation: + $(CC) -o $(EXE) $(LIB) $(NAME).ml + +run: compilation + ./$(EXE) EXTS = cmi cmx o clean: - $(RM) $(OUTPUT) $(foreach ext,$(EXTS),$(NAME).$(ext)) + $(RM) $(EXE) $(foreach ext,$(EXTS),$(NAME).$(ext))