Debian Codegraph @

compiler/Makefile

raw
1 #***********************************************************************
2 #* *
3 #* CamlIDL *
4 #* *
5 #* Xavier Leroy, projet Cristal, INRIA Rocquencourt *
6 #* *
7 #* Copyright 1999 Institut National de Recherche en Informatique et *
8 #* en Automatique. All rights reserved. This file is distributed *
9 #* under the terms of the GNU Library General Public License. *
10 #* *
11 #***********************************************************************
12
13 #* $Id: Makefile,v 1.6 2002-01-16 09:42:00 xleroy Exp $
14
15 include ../config/Makefile
16
17 OBJS=config.cmo utils.cmo clflags.cmo \
18 prefix.cmo lexpr.cmo cvttyp.cmo variables.cmo \
19 idlarray.cmo struct.cmo enum.cmo union.cmo cvtval.cmo \
20 structdecl.cmo enumdecl.cmo uniondecl.cmo \
21 typedef.cmo funct.cmo constdecl.cmo intf.cmo \
22 file.cmo predef.cmo \
23 linenum.cmo parse_aux.cmo parser_midl.cmo lexer_midl.cmo parse.cmo \
24 fixlabels.cmo normalize.cmo \
25 main.cmo
26
27 PROG=camlidl$(EXE)
28
29 all: $(PROG)
30
31 $(PROG): $(OBJS)
32 $(OCAMLC) -o $(PROG) $(OBJS)
33
34 clean::
35 rm -f $(PROG)
36
37 parser_midl.ml parser_midl.mli: parser_midl.mly
38 $(OCAMLYACC) parser_midl.mly
39
40 clean::
41 rm -f parser_midl.ml parser_midl.mli parser_midl.output
42
43 beforedepend:: parser_midl.ml parser_midl.mli
44
45 lexer_midl.ml: lexer_midl.mll
46 $(OCAMLLEX) lexer_midl.mll
47
48 clean::
49 rm -f lexer_midl.ml
50
51 beforedepend:: lexer_midl.ml
52
53 config.ml: config.mlp ../config/Makefile
54 -rm -f config.ml
55 sed -e 's|%%CPP%%|$(CPP)|' \
56 config.mlp > config.ml
57 -chmod -w config.ml
58
59 clean::
60 rm -f config.ml
61
62 beforedepend:: config.ml
63
64 linenum.ml: linenum.mll
65 $(OCAMLLEX) linenum.mll
66
67 clean::
68 rm -f linenum.ml
69
70 beforedepend:: linenum.ml
71
72 .SUFFIXES: .ml .mli .cmo .cmi .cmx
73
74 .ml.cmo:
75 $(OCAMLC) -c $<
76
77 .mli.cmi:
78 $(OCAMLC) -c $<
79
80 .ml.cmx:
81 $(OCAMLOPT) -c $<
82
83 # Install
84 install:
85 cp $(PROG) $(BINDIR)
86
87 # Clean up
88 clean::
89 rm -f *.cm[iox] *~
90
91 # Dependencies
92 depend: beforedepend
93 $(OCAMLDEP) *.mli *.ml > .depend
94
95 include .depend