add run
This commit is contained in:
parent
547477df92
commit
56e94072ed
1 changed files with 12 additions and 6 deletions
18
ocaml.mk
18
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))
|
||||
|
|
Loading…
Reference in a new issue