| 1 |
####################################################################### |
| 2 |
# # |
| 3 |
# MLTk, Tcl/Tk interface of OCaml # |
| 4 |
# # |
| 5 |
# Francois Rouaix, Francois Pessaux, Jun Furuse and Pierre Weis # |
| 6 |
# projet Cristal, INRIA Rocquencourt # |
| 7 |
# Jacques Garrigue, Kyoto University RIMS # |
| 8 |
# # |
| 9 |
# Copyright 2002 Institut National de Recherche en Informatique et # |
| 10 |
# en Automatique and Kyoto University. All rights reserved. # |
| 11 |
# This file is distributed under the terms of the GNU Library # |
| 12 |
# General Public License, with the special exception on linking # |
| 13 |
# described in file LICENSE found in the OCaml source tree. # |
| 14 |
# # |
| 15 |
####################################################################### |
| 16 |
|
| 17 |
include ../support/Makefile.common |
| 18 |
|
| 19 |
# We are using the non-installed library ! |
| 20 |
BYT_COMPFLAGS=-I ../lib -I ../camltk -I ../support -w s -dllpath ../support \ |
| 21 |
-I +unix |
| 22 |
BIN_COMPFLAGS=-I ../lib -I ../camltk -I ../support -w s -I +unix |
| 23 |
|
| 24 |
WITH_BYT_CAMLTK=labltk.cma camltk.cmo |
| 25 |
WITH_BIN_CAMLTK=labltk.cmxa camltk.cmx |
| 26 |
|
| 27 |
BYT_EXECS =\ |
| 28 |
addition.byt helloworld.byt winskel.byt fileinput.byt\ |
| 29 |
eyes.byt taquin.byt tetris.byt mytext.byt fileopen.byt\ |
| 30 |
|
| 31 |
BIN_EXECS=$(BYT_EXECS:.byt=.bin) |
| 32 |
|
| 33 |
EXECS=$(BYT_EXECS:.byt=$(EXE)) |
| 34 |
|
| 35 |
all: byt bin |
| 36 |
|
| 37 |
byt: $(BYT_EXECS) |
| 38 |
|
| 39 |
#opt: hello.opt demo.opt calc.opt clock.opt tetris.opt |
| 40 |
|
| 41 |
bin: opt |
| 42 |
|
| 43 |
opt: $(BIN_EXECS) |
| 44 |
|
| 45 |
addition.bin: addition.cmx |
| 46 |
$(CAMLOPT) $(BIN_COMPFLAGS) -o $@ $(WITH_BIN_CAMLTK) addition.cmx |
| 47 |
|
| 48 |
helloworld.bin: helloworld.cmx |
| 49 |
$(CAMLOPT) $(BIN_COMPFLAGS) -o $@ $(WITH_BIN_CAMLTK) helloworld.cmx |
| 50 |
|
| 51 |
winskel.bin: winskel.cmx |
| 52 |
$(CAMLOPT) $(BIN_COMPFLAGS) -o $@ $(WITH_BIN_CAMLTK) winskel.cmx |
| 53 |
|
| 54 |
fileinput.bin: fileinput.cmx |
| 55 |
$(CAMLOPT) $(BIN_COMPFLAGS) -o $@ $(WITH_BIN_CAMLTK) unix.cmxa fileinput.cmx |
| 56 |
|
| 57 |
socketinput.bin: socketinput.cmx |
| 58 |
$(CAMLOPT) $(BIN_COMPFLAGS) -o $@ unix.cmxa $(WITH_BIN_CAMLTK) socketinput.cmx |
| 59 |
|
| 60 |
eyes.bin: eyes.cmx |
| 61 |
$(CAMLOPT) $(BIN_COMPFLAGS) -o $@ unix.cmxa $(WITH_BIN_CAMLTK) eyes.cmx |
| 62 |
|
| 63 |
taquin.bin: taquin.cmx |
| 64 |
$(CAMLOPT) $(BIN_COMPFLAGS) -o $@ unix.cmxa $(WITH_BIN_CAMLTK) taquin.cmx |
| 65 |
|
| 66 |
tetris.bin: tetris.cmx |
| 67 |
$(CAMLOPT) $(BIN_COMPFLAGS) -o $@ unix.cmxa $(WITH_BIN_CAMLTK) tetris.cmx |
| 68 |
|
| 69 |
mytext.bin: mytext.cmx |
| 70 |
$(CAMLOPT) $(BIN_COMPFLAGS) -o $@ unix.cmxa $(WITH_BIN_CAMLTK) mytext.cmx |
| 71 |
|
| 72 |
fileopen.bin: fileopen.cmx |
| 73 |
$(CAMLOPT) $(BIN_COMPFLAGS) -o $@ unix.cmxa $(WITH_BIN_CAMLTK) fileopen.cmx |
| 74 |
|
| 75 |
|
| 76 |
addition.byt: addition.cmo |
| 77 |
$(CAMLC) $(BYT_COMPFLAGS) -o $@ $(LIBNAME).cma addition.cmo |
| 78 |
|
| 79 |
helloworld.byt: helloworld.cmo |
| 80 |
$(CAMLC) $(BYT_COMPFLAGS) -o $@ $(LIBNAME).cma helloworld.cmo |
| 81 |
|
| 82 |
winskel.byt: winskel.cmo |
| 83 |
$(CAMLC) $(BYT_COMPFLAGS) -o $@ $(LIBNAME).cma winskel.cmo |
| 84 |
|
| 85 |
fileinput.byt: fileinput.cmo |
| 86 |
$(CAMLC) $(BYT_COMPFLAGS) -o $@ unix.cma $(LIBNAME).cma fileinput.cmo |
| 87 |
|
| 88 |
socketinput.byt: socketinput.cmo |
| 89 |
$(CAMLC) $(BYT_COMPFLAGS) -o $@ unix.cma $(LIBNAME).cma socketinput.cmo |
| 90 |
|
| 91 |
eyes.byt: eyes.cmo |
| 92 |
$(CAMLC) $(BYT_COMPFLAGS) -o $@ unix.cma $(LIBNAME).cma eyes.cmo |
| 93 |
|
| 94 |
taquin.byt: taquin.cmo |
| 95 |
$(CAMLC) $(BYT_COMPFLAGS) -o $@ unix.cma $(LIBNAME).cma taquin.cmo |
| 96 |
|
| 97 |
tetris.byt: tetris.cmo |
| 98 |
$(CAMLC) $(BYT_COMPFLAGS) -o $@ unix.cma $(LIBNAME).cma tetris.cmo |
| 99 |
|
| 100 |
mytext.byt: mytext.cmo |
| 101 |
$(CAMLC) $(BYT_COMPFLAGS) -o $@ unix.cma $(LIBNAME).cma mytext.cmo |
| 102 |
|
| 103 |
fileopen.byt: fileopen.cmo |
| 104 |
$(CAMLC) $(BYT_COMPFLAGS) -o $@ $(LIBNAME).cma fileopen.cmo |
| 105 |
|
| 106 |
clean : |
| 107 |
rm -f *.cm? *.o a.out $(EXECS) $(BYT_EXECS) $(BIN_EXECS) |
| 108 |
|
| 109 |
.SUFFIXES : |
| 110 |
.SUFFIXES : .mli .ml .cmi .cmo .cmx .cma .cmxa |
| 111 |
|
| 112 |
.mli.cmi: |
| 113 |
$(CAMLCOMP) $(BYT_COMPFLAGS) -c $< |
| 114 |
|
| 115 |
.ml.cmo: |
| 116 |
$(CAMLCOMP) $(BYT_COMPFLAGS) -c $< |
| 117 |
|
| 118 |
.ml.cmx: |
| 119 |
$(CAMLOPT) $(BIN_COMPFLAGS) -c $< |