File: Makefile

package info (click to toggle)
camlidl 1.05-13
  • links: PTS, VCS
  • area: main
  • in suites: squeeze
  • size: 964 kB
  • ctags: 1,174
  • sloc: ml: 4,894; ansic: 941; cpp: 897; makefile: 319; xml: 213; sh: 75
file content (61 lines) | stat: -rw-r--r-- 1,688 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
#***********************************************************************
#*                                                                     *
#*                              CamlIDL                                *
#*                                                                     *
#*            Xavier Leroy, projet Cristal, INRIA Rocquencourt         *
#*                                                                     *
#*  Copyright 1999 Institut National de Recherche en Informatique et   *
#*  en Automatique.  All rights reserved.  This file is distributed    *
#*  under the terms of the GNU Library General Public License.         *
#*                                                                     *
#***********************************************************************

#* $Id: Makefile,v 1.4 2002/04/22 11:50:47 xleroy Exp $

include ../config/Makefile

BYTEOBJS=com.cmo
BYTELIB=com.cma
NATIVEOBJS=$(BYTEOBJS:.cmo=.cmx)
NATIVELIB=$(BYTELIB:.cma=.cmxa)
INTERFACES=$(BYTEOBJS:.cmo=.cmi)
LIBEXT=a

all: $(BYTELIB)

opt: $(NATIVELIB)

$(BYTELIB): $(BYTEOBJS)
	$(OCAMLC) -a -o $(BYTELIB) $(BYTEOBJS)

$(NATIVELIB): $(NATIVEOBJS)
	$(OCAMLOPT) -a -o $(NATIVELIB) $(NATIVEOBJS)

install:
	cp $(INTERFACES) $(BYTELIB) $(OCAMLLIB)
	if [ -x /usr/bin/ocamlopt ]; then	\
		cp $(NATIVELIB) $(NATIVELIB:.cmxa=$(LIB)) $(OCAMLLIB);	\
		cd $(OCAMLLIB);	\
		$(RANLIB) $(NATIVELIB:.cmxa=$(LIB));	\
	else	\
		true;	\
	fi

.SUFFIXES: .mli .ml .cmi .cmo .cmx

.mli.cmi:
	$(OCAMLC) -c $<
.ml.cmo:
	$(OCAMLC) -c $<
.ml.cmx:
	$(OCAMLOPT) -c $<

# Clean up
clean::
	-$(RM) -f *.cm[ioax] *.cmxa *.a *.o *~

# Dependencies
depend:
	$(OCAMLDEP) *.mli *.ml > .depend

include .depend