-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathinit.cl
60 lines (47 loc) · 2.22 KB
/
init.cl
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
// +----------------------------------------------------------------------+
// | init.cl
// +----------------------------------------------------------------------+
// note the environment must be set-up through the -env declaration
// this file works for most UNIX and NT setups, you may need to edit it
// though
(printf("this is a init file for cclaire for OS: ~A -------------------\n", compiler.env))
// this init file is needed to generate a claire.exe from the local sclaire.exe
ROOT:string :: getenv("CLAIRE3_HOME")
(compiler.inline? := true, // do not change
OPT.Optimize/recompute := false,
compiler.naming := 1,
if (compiler.env = "unix")
(*fs* := "/",
PRODUCER.Generate/extension := ".cc",
// compiler options: optimized, debug, default
compiler.options := list("-c -fwritable-strings -O2",
"-c -fwritable-strings",
"-c -fwritable-strings"))
else if (compiler.env = "ntv")
(*fs* := "\\",
// compiler options: optimized, debug, default
compiler.options := list("-c /O2",
"-c /Zi",
"-c")),
compiler.libraries_dir := list(ROOT / "bin" / "public" / compiler.env,
ROOT / "bin" / "debug" / compiler.env,
ROOT / "bin" / "public" / compiler.env),
verbose() := 2, // not significant
compiler.safety := 5, // do not change
compiler.headers_dir := ROOT / "include",
compiler.source := ROOT / "csrc")
// ---------------------------------------------------------------
// when changing to a platform that requires a new makefile generator,
// one cannot use the existing old file to compile the new one. The following
// method may be used to cross-compile the new (revised) file once it is
// loaded
// THIS METHOD IS RESERVED FOR EXPERT USE ...
[ccmain() : void
-> compiler.active? := true,
begin(claire),
Generate/*cf* := "ccmain",
compiler.headers_dir := home() / "include",
claire_lib := home() / "bin" / "debug" / compiler.env,
compile("ccmain"),
cmakefile("ccmain","cclaire") ]
(printf("init.cl is ok -------------------------------------------------\n"))