Imported Debian patch 0.13.1-3
[pkg-lisaac.git] / path.li
blobe0366a3ef529d4454d2ed317e506062ba3b8f585
1 ///////////////////////////////////////////////////////////////////////////////
2 //                            Lisaac Installer                               //
3 //                                                                           //
4 //                   LSIIT - ULP - CNRS - INRIA - FRANCE                     //
5 //                                                                           //
6 //   This program is free software: you can redistribute it and/or modify    //
7 //   it under the terms of the GNU General Public License as published by    //
8 //   the Free Software Foundation, either version 3 of the License, or       //
9 //   (at your option) any later version.                                     //
10 //                                                                           //
11 //   This program is distributed in the hope that it will be useful,         //
12 //   but WITHOUT ANY WARRANTY; without even the implied warranty of          //
13 //   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the           //
14 //   GNU General Public License for more details.                            //
15 //                                                                           //
16 //   You should have received a copy of the GNU General Public License       //
17 //   along with this program.  If not, see <http://www.gnu.org/licenses/>.   //
18 //                                                                           //
19 //                     http://isaacproject.u-strasbg.fr/                     //
20 ///////////////////////////////////////////////////////////////////////////////
22   // Lisaac Path Directory System (by Benoit Sonntag).
23   //
24   // Note:
25   // =====
26   //  This file is not a Lisaac prototype. 
27   //  It's define the profile path directory for to compile code, with a target.
28   //  `+' : append new string variable. 
29   //  `-' : append new directory. 
30   //  `*' : execute command after compilation. 
31   //
32   // Warning: 
33   // ========
34   //   - `lisaac' is environment variable value.
35   //   - `input_file' is input file name value.
36   //   - `output_file' is output file name value.
37   //   - `target' is a target value.
38   
39 Section DEFAULT  
41   + target := UNIX;
43 Section COMPILER, SHORTER
44   
45   + source  := lisaac + "src/";
46   
47   - source + "tools/";
48   - source + "type/";
49   - source + "item/";
50   - source + "constant/";
51   - source + "variable/";
52   - source + "external/";
53   - source + "external/logic/";
54   - source + "external/arithmetic/";
55   - source + "external/comparison/";
56   - source + "dispatcher/";
57   - source + "context/";
58   - source + "code_life/";
59   
60 Section COMPILER, SHORTER
61   
62   * "gcc " + input_file + " -o " + output_file;  
63   
64 Section COMPILER
65     
66   - source + "compiler_any/";
67   
68 Section SHORTER
70   - source + "shorter_any/";
71   
72   * "cp shorter ../bin/.";
73   * "cp shorter.c ../bin/.";
74   
75 Section Common
76   // Always valid path.
77   
78   + option_gcc := " ";
79   
80   + lib    := lisaac + "lib/";
81   + lib_os := lisaac + "lib_os/";
82   
83   + unix    := lib_os + "unix/";
84   + windows := lib_os + "windows/";
85   + dos     := lib_os + "dos/";
86     
87   // Standard library:
88   - lib + "base/";
89   - lib + "base/low_level/";
90   - lib + "collection/";
91   - lib + "collection/low_level/";
92   - lib + "file_system/";
93   - lib + "format/";
94   - lib + "format/ai/";
95   - lib + "format/bmp/";
96   - lib + "graphics/";
97   - lib + "graphics/low_level/";
98   - lib + "gui/";
99   - lib + "gui/clipping/";
100   - lib + "gui/event/";
101   - lib + "gui/input/";
102   - lib + "gui/low_level/";
103   - lib + "io/";  
104   - lib + "kernel/";
105   - lib + "memory/";
106   - lib + "number/";
107   - lib + "number/low_level/";
108   - lib + "string/";
109   - lib + "system/";
110   - lib + "time/";
111   
112 Section UNIX, DOS, COMPILER, SHORTER
114   - unix   + "system/";
115   - unix   + "file_system/";
116   
117 Section UNIX
118     
119   + path_lib_x11 := "/usr/lib";
120   
121   - unix   + "video/";
122   
123   * "gcc " + input_file + " -O3 -fomit-frame-pointer -lm -lX11 -o " + 
124     output_file + " -L" + path_lib_x11 + option_gcc;
126   //* "gcc -D_ISOC9X_SOURCE -O3 -mfpmath=sse -msse2 -march=pentium4 -ffast-math -funroll-loops -o " +
127   //output_file + " " + input_file + " -lm";
128   
129   //* "gcc -D_ISOC9X_SOURCE -O3 -mfpmath=sse -msse2 -march=pentium4 -ffast-math -funroll-loops -o " +
130   //"mandelbrot_c mandelbrot_c.c -lm";
131   
132 Section WINDOWS
133   
134   - unix   + "system/";
135   - windows + "file_system/";
136   - unix   + "file_system/";
137   - windows + "video/";
138   
139   * "gcc " + input_file + " -o " + output_file + ".exe -lgdi32 " + option_gcc;    
140   
141 Section DOS  
142   
143   - dos + "file_system/";
144   - dos + "video/";
145   
146   * "gcc " + input_file + " -o " + output_file + ".exe " + option_gcc; 
147   
148 // ********************************  
149 //            ISAAC  
150 // ********************************
151 Section X86, IPAQ, ST2XX, LINUX
152   //
153   // Standard.
154   //
155   
156   + isaac := "/home/sonntag/svn/isaac/trunk/isaacos/";  
157   + isaac_stdlib   := isaac + "stdlib/";
158   + isaac_software := isaac + "software/";
159   
160   //
161   // Standard Library.
162   //
163   
164   - isaac_stdlib + "driver/";
165   - isaac_stdlib + "driver/clock";
166   - isaac_stdlib + "driver/keyboard";
167   - isaac_stdlib + "driver/mouse";
168   - isaac_stdlib + "driver/video";
169   
170   - isaac_stdlib + "event/";
171   
172   - isaac_stdlib + "file_system/";
173   
174   - isaac_stdlib + "format/";
175   - isaac_stdlib + "format/freetype";
176   
177   - isaac_stdlib + "interface/";
178   - isaac_stdlib + "interface/clipping";
179   - isaac_stdlib + "interface/group";
180   - isaac_stdlib + "interface/item";
181   
182   - isaac_stdlib + "system/";
183   
184   //
185   // Software
186   //
187   
188   - isaac_software + "about/";
189   
190   - isaac_software + "console/";
191   
192   - isaac_software + "game/fouronline";
193   - isaac_software + "game/tetris";
194   
195   - isaac_software + "panel";
196   
197   - isaac_software + "viewer";
198   
199 Section X86  
200   
201   + machine := isaac + "x86/";
202   
203   // Specific directory
204   
205   - machine + "file_system/physical";
206   - machine + "file_system/partition";
207   
208   
209 //  * "gcc -specs=" + isaac + "tool/gcc/x86/specs " + input_file + " -c -fPIC";
210 //  * "cp -f startup.o ../loader/";
211     * "gcc -specs=" + isaac + "tool/gcc/x86/specs " + input_file + " -o " + output_file;
212     * isaac+"tool/elf2eof/elf2eof -v -p 2048 "+output_file+" -prepend "+isaac+"x86/bootloader/startup.com";
213     * "rm startup.sys";
214     * "mv startup.eof startup.sys";
215     * "./dosemu c startup.sys .";
216     * "./dosemu e";
218   
219 //  * "mount /floppy";
220 //  * "cp -f startup.eof /mnt/floppy/startup.sys";
221 //  * "umount /floppy";
222   
223 Section IPAQ  
224   
225   + machine := isaac + "ipaq/";
226   
227   * "arm-linux-gcc -specs="+isaac+"tool/gcc/ipaq/specs -nostdlib " + input_file + " -O3 -o " + output_file;
228   * isaac+"tool/elf2eof/elf2eof -f " + output_file + " -append "+isaac+"image/isaac.ai "+isaac+"image/newton.bmp";
229   
230 Section ST2XX  
231   
232   + machine := isaac + "st2xx/";
233   
234 //  * "/home/sonntagb/lxbe/le/bin/gcc entry_isaac.s -c";
235   * "/home/sonntagb/lxbe/le/bin/gcc " + input_file + " -c";
236   * "/home/sonntagb/lxbe/le/bin/ld -EL "+output_file+".o -o "+output_file+" -T../tool/gcc/st2xx/isaac.x";
238 Section LINUX  
239   
240   - unix   + "system/";
241   - unix   + "file_system/";
242   + machine := isaac + "linux/";
243   
244   // Specific directory
245   
246   * "gcc -L/usr/X11R6/lib -lX11 -lXext " + input_file + " -o " + output_file;
247   
248 Section IPAQ, X86, ST2XX, LINUX
249     
250   //
251   // Specific machine.
252   //
254   - machine + "driver/";
255   - machine + "driver/clock";
256   - machine + "driver/keyboard";
257   - machine + "driver/mouse";
258   - machine + "driver/video";
259   
260   - machine + "file_system/";
261   
262   - machine + "system/";