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
|
CC = ocamlopt
|
||||||
RM = rm -rf
|
RM = rm -rf
|
||||||
|
|
||||||
OUTPUT = exe.byte
|
|
||||||
NAME = main
|
NAME = main
|
||||||
|
EXE = a.out
|
||||||
LIB = unix.cmxa -I +unix
|
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
|
EXTS = cmi cmx o
|
||||||
clean:
|
clean:
|
||||||
$(RM) $(OUTPUT) $(foreach ext,$(EXTS),$(NAME).$(ext))
|
$(RM) $(EXE) $(foreach ext,$(EXTS),$(NAME).$(ext))
|
||||||
|
|
Loading…
Reference in a new issue