summaryrefslogtreecommitdiff
path: root/maccaml/Makefile.Mac
blob: c9b0f0e9a4deabb1f3447b078160ae0f51bcb767 (plain)
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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
#########################################################################
#                                                                       #
#                            Objective Caml                             #
#                                                                       #
#            Damien Doligez, projet Para, 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 Q Public License version 1.0.                #
#                                                                       #
#########################################################################

# $Id$

VERSIONSTR = ¶
  "¶"{OCAMLMAJOR}.{OCAMLMINOR}/Mac{MAJOR}.{MINOR}.{BUGFIX}{STAGE}{REV}¶""

COPYRIGHTSTR = "¶"Copyright 1991-2001 INRIA¶""

XIncludes = -i ::byterun:,::config: ¶
            -i ":WASTE:WASTE 1.3 Distribution:WASTE C/C++ Headers:"

PPCC = mrc -proto strict -w 6,35
PPCCplus = mrcpp
PPCCOptions = {XIncludes} {cdbgflag}
PPCLinkOptions = -d {ldbgflag}
PPCCamlrunLibs = ::otherlibs:num:libnums.x ¶
                 ::otherlibs:bigarray:libbigarray.x ¶
                 ::byterun:libcamlrun-gui.x ¶
                 ::otherlibs:str:libstr.x
PPCWELibs = ":WASTE:WASTE 1.3 Distribution:WASTELib.x"
PPCSysLibs = "{PPCLibraries}MrCPlusLib.o" ¶
             "{PPCLibraries}PPCStdCLib.o" ¶
             "{PPCLibraries}StdCRuntime.o" ¶
             "{PPCLibraries}PPCCRuntime.o" ¶
             "{PPCLibraries}PPCToolLibs.o" ¶
             "{SharedLibraries}InterfaceLib" ¶
             "{SharedLibraries}StdCLib" ¶
             "{sharedlibraries}MathLib" ¶
             "{sharedlibraries}DragLib"
PPCLibs = {ppccamlrunlibs} {ppcwelibs} {ppcsyslibs}
 
camllibs = ::otherlibs:graph:graphics.cma ¶
           ::otherlibs:num:nums.cma ¶
           ::otherlibs:bigarray:bigarray.cma ¶

primfiles = ::byterun:primitives prim_bigarray prim_graph prim_num prim_str

RezDefs = -d MAJORVNUM={MAJOR} -d MINORVNUM=0x{MINOR}{BUGFIX} ¶
          -d STAGE={STAGE} -d DEVVNUM={REV} ¶
          -d VERSIONSTR={VERSIONSTR} -d COPYRIGHTSTR={COPYRIGHTSTR}

PPCOBJS = aboutbox.c.x appleevents.c.x clipboard.c.x ¶
          drag.c.x errors.c.x ¶
          events.c.x files.c.x glue.c.x ¶
          graph.c.x lcontrols.c.x lib.c.x main.c.x mcmemory.c.x ¶
          menus.c.x mcmisc.c.x modalfilter.c.x prefs.c.x prims.c.x ¶
          print.c.x scroll.c.x windows.c.x

all Ä appli appliprims ocamlconstants.h appli.r "Objective Caml"
    set status 0

appliprims Ä {primfiles}
    catenate {primfiles} > appliprims

prims.c Ä appliprims
    begin
      echo '#include "mlvalues.h"'
      echo '#include "prims.h"'
      streamedit -e '1,$ change "extern value " . "();"' appliprims
      echo 'c_primitive builtin_cprim [] = {'
      streamedit -e '1,$ change "  " . ","' appliprims
      echo '0 };'
      echo 'char * names_of_builtin_cprim [] = {'
      streamedit -e '1,$ change "  ¶"" . "¶","' appliprims
      echo '0 };'
    end > prims.c

OCaml.PPC Ä {PPCOBJS} {ppccamlrunlibs}
    ppclink -o OCaml.PPC {ppclinkoptions} {PPCOBJS} {ppclibs}
    rename -y OCaml.PPC.xcoff "Objective Caml.xcoff" || set status 0

dummy_fragment Ä dummy_fragment.c.x
    ppclink -xm l -o dummy_fragment {ppclinkoptions} dummy_fragment.c.x

appli ÄÄ OCaml.PPC dummy_fragment
    delete -i appli
    mergefragment -a OCaml.PPC appli
    mergefragment dummy_fragment appli

"Objective Caml" Ä appliprims appli.r ocamlconstants.h appli ¶
                   ::toplevellib.cma {camllibs} ::toplevel:topmain.cmo
    :ocamlmkappli ¶
       -ocamlc "::boot:ocamlrun ::boot:ocamlc -I ::stdlib: -linkall" ¶
       {rezdefs} -lib : -name "Objective Caml" -r ocaml.r ¶
       -creator Caml -prefsize 5000 -minsize 3000 ¶
       ::toplevellib.cma {camllibs} ::toplevel:topmain.cmo

install Ä appli appli.r appliprims ocamlconstants.h ocamlmkappli ¶
          "Objective Caml"
    duplicate -y "Objective Caml" ¶
                 `exists "objective caml.xcoff" ¶
                         "::test:Moretest:graph_example.ml" ¶
                         ` ¶
              "{APPLIDIR}"
    duplicate -y appli appli.r appliprims ocamlconstants.h "{LIBDIR}"
    duplicate -y ocamlmkappli "{BINDIR}"

partialclean Ä
    delete -i "Objective Caml"

clean Ä
    delete -i -y {OBJS} {PPCOBJS} OCaml.68k OCaml.PPC ¶
                 "Objective Caml" appliprims prims.c null :config ¶
                 dummy_fragment dummy_fragment.c.x dummy_fragment.xcoff ¶
                 "Objective Caml.xcoff" "Objective Caml.dbg"

depend Ä prims.c
    begin
      makedepend -w -objext .x Å.c
    end | streamedit -e "/¶t/ replace // ' ' -c °" > Makefile.Mac.depend