| 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 |
COMPFLAGS= -I ../support -no-alias-deps -I +unix |
| 20 |
|
| 21 |
all: camltkobjs |
| 22 |
|
| 23 |
opt: camltkobjsx |
| 24 |
|
| 25 |
include ./modules |
| 26 |
|
| 27 |
CAMLTKOBJS = $(CWIDGETOBJS) cTk.cmo camltk.cmo |
| 28 |
CAMLTKOBJSX = $(CAMLTKOBJS:.cmo=.cmx) |
| 29 |
|
| 30 |
camltkobjs: $(CAMLTKOBJS) |
| 31 |
|
| 32 |
camltkobjsx: $(CAMLTKOBJSX) |
| 33 |
|
| 34 |
ifeq ($(USE_FINDLIB),yes) |
| 35 |
install: |
| 36 |
ocamlfind install labltk -add \ |
| 37 |
$(CAMLTKOBJS:.cmo=.cmi) $(CWIDGETOBJS:.cmo=.mli) |
| 38 |
installopt: |
| 39 |
ocamlfind install labltk -add $(CAMLTKOBJSX) |
| 40 |
else |
| 41 |
install: |
| 42 |
if test -d $(INSTALLDIR); then : ; else mkdir $(INSTALLDIR); fi |
| 43 |
cp $(CAMLTKOBJS:.cmo=.cmi) $(INSTALLDIR) |
| 44 |
cp $(CWIDGETOBJS:.cmo=.mli) $(INSTALLDIR) |
| 45 |
chmod 644 $(INSTALLDIR)/*.cmi |
| 46 |
|
| 47 |
installopt: |
| 48 |
@if test -d $(INSTALLDIR); then : ; else mkdir $(INSTALLDIR); fi |
| 49 |
cp $(CAMLTKOBJSX) $(INSTALLDIR) |
| 50 |
chmod 644 $(INSTALLDIR)/*.cmx |
| 51 |
endif |
| 52 |
|
| 53 |
clean: |
| 54 |
$(MAKE) -f Makefile.gen clean |
| 55 |
|
| 56 |
.SUFFIXES : |
| 57 |
.SUFFIXES : .mli .ml .cmi .cmx .cmo .mlp |
| 58 |
|
| 59 |
.mli.cmi: |
| 60 |
$(CAMLCOMP) $(COMPFLAGS) $< |
| 61 |
|
| 62 |
.ml.cmo: |
| 63 |
$(CAMLCOMP) $(COMPFLAGS) $< |
| 64 |
|
| 65 |
.ml.cmx: |
| 66 |
$(CAMLOPT) -c $(COMPFLAGS) $< |
| 67 |
|
| 68 |
include .depend |