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))