]> rtime.felk.cvut.cz Git - l4.git/blob - l4/pkg/ocaml/contrib/otherlibs/dynlink/Makefile
update
[l4.git] / l4 / pkg / ocaml / contrib / otherlibs / dynlink / Makefile
1 #########################################################################
2 #                                                                       #
3 #                            Objective Caml                             #
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, with     #
10 #   the special exception on linking described in file ../../LICENSE.   #
11 #                                                                       #
12 #########################################################################
13
14 # $Id: Makefile 8868 2008-04-16 06:50:31Z frisch $
15
16 # Makefile for the dynamic link library
17
18 include ../../config/Makefile
19
20 CAMLC=../../boot/ocamlrun ../../ocamlc
21 CAMLOPT=../../ocamlcompopt.sh
22 INCLUDES=-I ../../utils -I ../../typing -I ../../bytecomp
23 COMPFLAGS=-warn-error A -I ../../stdlib $(INCLUDES)
24
25 OBJS=dynlinkaux.cmo dynlink.cmo
26
27 COMPILEROBJS=\
28   ../../utils/misc.cmo ../../utils/config.cmo ../../utils/clflags.cmo \
29   ../../utils/tbl.cmo ../../utils/consistbl.cmo \
30   ../../utils/terminfo.cmo ../../utils/warnings.cmo \
31   ../../parsing/asttypes.cmi ../../parsing/linenum.cmo \
32   ../../parsing/location.cmo ../../parsing/longident.cmo \
33   ../../typing/ident.cmo ../../typing/path.cmo \
34   ../../typing/primitive.cmo ../../typing/types.cmo \
35   ../../typing/btype.cmo ../../typing/subst.cmo ../../typing/predef.cmo \
36   ../../typing/datarepr.cmo ../../typing/env.cmo \
37   ../../bytecomp/lambda.cmo ../../bytecomp/instruct.cmo \
38   ../../bytecomp/cmo_format.cmi ../../bytecomp/opcodes.cmo \
39   ../../bytecomp/runtimedef.cmo ../../bytecomp/bytesections.cmo \
40   ../../bytecomp/dll.cmo ../../bytecomp/meta.cmo \
41   ../../bytecomp/symtable.cmo
42
43 NATOBJS=dynlink.cmx
44
45 all: dynlink.cma extract_crc
46
47 allopt: dynlink.cmxa
48
49 dynlink.cma: $(OBJS)
50         $(CAMLC) $(COMPFLAGS) -ccopt "$(NATDYNLINKOPTS)" -a -o dynlink.cma $(OBJS)
51
52 dynlink.cmxa: $(NATOBJS)
53         $(CAMLOPT) $(COMPFLAGS) -ccopt "$(NATDYNLINKOPTS)" -a -o dynlink.cmxa $(NATOBJS)
54
55 dynlinkaux.cmo: $(COMPILEROBJS)
56         $(CAMLC) $(COMPFLAGS) -pack -o dynlinkaux.cmo $(COMPILEROBJS)
57
58 dynlinkaux.cmi: dynlinkaux.cmo
59
60 dynlink.cmx: dynlink.cmi natdynlink.ml
61         cp natdynlink.ml dynlink.mlopt
62         $(CAMLOPT) -c $(COMPFLAGS) -impl dynlink.mlopt
63         rm -f dynlink.mlopt
64
65 extract_crc: dynlink.cma extract_crc.cmo
66         $(CAMLC) $(COMPFLAGS) -o extract_crc dynlink.cma extract_crc.cmo
67
68 install:
69         cp dynlink.cmi dynlink.cma dynlink.mli $(LIBDIR)
70         cp extract_crc $(LIBDIR)/extract_crc$(EXE)
71
72 installopt:
73         cp $(NATOBJS) dynlink.cmxa dynlink.$(A) $(LIBDIR)
74         cd $(LIBDIR); $(RANLIB) dynlink.$(A)
75
76 partialclean:
77         rm -f extract_crc *.cm[ioax] *.cmxa
78
79 clean: partialclean
80         rm -f *.$(A) *.$(O) *.so *.dll dynlink.mlopt
81
82 .SUFFIXES: .ml .mli .cmo .cmi .cmx
83
84 .mli.cmi:
85         $(CAMLC) -c $(COMPFLAGS) $<
86
87 .ml.cmo:
88         $(CAMLC) -c $(COMPFLAGS) $<
89
90 .ml.cmx:
91         $(CAMLOPT) -c $(COMPFLAGS) $<
92
93 depend:
94
95 dynlink.cmo: dynlinkaux.cmi dynlink.cmi
96 extract_crc.cmo: dynlink.cmi