add run
This commit is contained in:
parent
547477df92
commit
56e94072ed
1 changed files with 12 additions and 6 deletions
14
ocaml.mk
14
ocaml.mk
|
@ -1,13 +1,19 @@
|
|||
CC = ocamlopt
|
||||
RM = rm -rf
|
||||
|
||||
OUTPUT = exe.byte
|
||||
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))
|
||||
|
|
Loading…
Reference in a new issue