]> git.karo-electronics.de Git - karo-tx-redboot.git/blob - packages/services/gfx/mw/v2_0/cdl/microwindows.cdl
11c1a0854e0bca662245b1b78235f089582387f8
[karo-tx-redboot.git] / packages / services / gfx / mw / v2_0 / cdl / microwindows.cdl
1 # ====================================================================
2 #
3 #      microwindows.cdl
4 #
5 #      MicroWindows configuration data
6 #
7 # ====================================================================
8 #####ECOSGPLCOPYRIGHTBEGIN####
9 ## -------------------------------------------
10 ## This file is part of eCos, the Embedded Configurable Operating System.
11 ## Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
12 ##
13 ## eCos is free software; you can redistribute it and/or modify it under
14 ## the terms of the GNU General Public License as published by the Free
15 ## Software Foundation; either version 2 or (at your option) any later version.
16 ##
17 ## eCos is distributed in the hope that it will be useful, but WITHOUT ANY
18 ## WARRANTY; without even the implied warranty of MERCHANTABILITY or
19 ## FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
20 ## for more details.
21 ##
22 ## You should have received a copy of the GNU General Public License along
23 ## with eCos; if not, write to the Free Software Foundation, Inc.,
24 ## 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
25 ##
26 ## As a special exception, if other files instantiate templates or use macros
27 ## or inline functions from this file, or you compile this file and link it
28 ## with other works to produce a work based on this file, this file does not
29 ## by itself cause the resulting work to be covered by the GNU General Public
30 ## License. However the source code for this file must still be made available
31 ## in accordance with section (3) of the GNU General Public License.
32 ##
33 ## This exception does not invalidate any other reasons why a work based on
34 ## this file might be covered by the GNU General Public License.
35 ##
36 ## Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
37 ## at http://sources.redhat.com/ecos/ecos-license/
38 ## -------------------------------------------
39 #####ECOSGPLCOPYRIGHTEND####
40 # ====================================================================
41 ######DESCRIPTIONBEGIN####
42 #
43 # Author(s):      jskov
44 # Original data:  jskov
45 # Contributors:
46 # Date:           2002-03-25
47 #
48 #####DESCRIPTIONEND####
49 #
50 # ====================================================================
51
52 cdl_package CYGPKG_MICROWINDOWS {
53     display       "MicroWindows"
54     requires      CYGPKG_POSIX
55     requires      CYGPKG_ISOINFRA
56     requires      CYGINT_ISO_C_TIME_TYPES
57     requires      CYGINT_ISO_STRERROR
58     requires      CYGINT_ISO_ERRNO
59     requires      CYGINT_ISO_ERRNO_CODES
60     requires      CYGINT_ISO_MALLOC
61     requires      CYGINT_ISO_STRING_BSD_FUNCS
62     requires      CYGPKG_IO_FILEIO
63     requires      CYGPKG_NET_STACK_INET
64     description   "Microwindows."
65
66     # Note: separating the stack implementation from the common support leads
67     # to some rather incestious config file relationships.
68     define_proc {
69     }
70
71     # FB drivers
72     compile                                             \
73         drivers/fblin16.c                               \
74         drivers/fblin1.c                                \
75         drivers/fblin24.c                               \
76         drivers/fblin2.c                                \
77         drivers/fblin32.c                               \
78         drivers/fblin4.c                                \
79         drivers/fblin8.c                                \
80         drivers/fb.c                                    \
81         drivers/fbportrait_down.c                       \
82         drivers/fbportrait_left.c                       \
83         drivers/fbportrait_right.c                      \
84         drivers/genfont.c                               \
85         drivers/genmem.c
86
87      # engine
88      compile                                    \
89         engine/devarc.c                         \
90         engine/devclip.c                        \
91         engine/devdraw.c                        \
92         engine/devfont.c                        \
93         engine/devimage.c                       \
94         engine/devkbd.c                         \
95         engine/devlist.c                        \
96         engine/devmouse.c                       \
97         engine/devopen.c                        \
98         engine/devpal1.c                        \
99         engine/devpal2.c                        \
100         engine/devpal4.c                        \
101         engine/devpal8.c                        \
102         engine/devpoly.c                        \
103         engine/devrgn2.c                        \
104         engine/devrgn.c                         \
105         engine/devtimer.c                       \
106         engine/error.c                          \
107         engine/selfont.c
108
109      # NANO X
110      compile                                    \
111         nanox/srvmain.c                         \
112         nanox/srvfunc.c                         \
113         nanox/srvutil.c                         \
114         nanox/srvevent.c                        \
115         nanox/srvclip.c                         \
116         nanox/srvnet.c                          \
117         nanox/clientfb.c                        \
118         nanox/client.c                          \
119         nanox/error.c                           \
120         nanox/nxdraw.c                          \
121         nanox/nxproto.c                         \
122         nanox/nxutil.c
123
124      # FONTS
125      compile                                    \
126         fonts/helvB10.c                         \
127         fonts/helvB12.c                         \
128         fonts/helvR10.c                         \
129         fonts/rom8x16.c                         \
130         fonts/rom8x8.c                          \
131         fonts/symbol.c                          \
132         fonts/winFreeSansSerif11x13.c           \
133         fonts/winFreeSystem14x16.c              \
134         fonts/X5x7.c                            \
135         fonts/X6x13.c
136
137     # eCos stuff
138     cdl_component CYGBLD_MICROWINDOWS_ECOS {
139         display   "Build MicroWindows eCos support"
140         default_value 0
141
142         # These files are unique to eCos
143         compile ecos/ecos_init.c 
144         compile -library=libextras.a ecos/nanox_thread.c
145
146         cdl_option CYGBLD_MICROWINDOWS_ECOS_APP {
147             display  "Build complete eCos+MicroWindows application"
148             default_value 0
149             make -priority 320 {
150                 <PREFIX>/bin/ecos_mw.elf : $(PREFIX)/lib/target.ld $(PREFIX)/lib/vectors.o $(PREFIX)/lib/libtarget.a $(PREFIX)/lib/libextras.a $(REPOSITORY)/$(PACKAGE)/src/ecos/ecos_app.c
151                         @sh -c "mkdir -p $(dir $@)"
152                         $(CC) -c $(INCLUDE_PATH) $(CFLAGS) -o $(PREFIX)/lib/ecos_app.o $(REPOSITORY)/$(PACKAGE)/src/ecos/ecos_app.c
153                         $(CC) $(LDFLAGS) -L$(PREFIX)/lib -Ttarget.ld -o $@ $(PREFIX)/lib/ecos_app.o
154             }
155             
156         }
157     }
158
159     # eCos VNC server drivers
160     cdl_option CYGBLD_MICROWINDOWS_VNC_DRIVERS {
161         display   "Build MicroWindows VNC server drivers"
162         default_value 0
163         description \
164             "This option builds the drivers for the VNC server.  The VNC server
165              then provides a virtual screen, keyboard and mouse for MicroWindows."
166
167         compile                     \
168             drivers/scr_vnc_ecos.c  \
169             drivers/kbd_vnc_ecos.c  \
170             drivers/mou_vnc_ecos.c
171             
172         requires CYGBLD_MICROWINDOWS_ECOS
173         requires CYGBLD_MICROWINDOWS_NANOWM
174         requires CYGPKG_VNC_SERVER
175         requires !CYGBLD_MICROWINDOWS_ARM_DRIVERS
176         requires CYGPKG_VNC_SERVER_BUILD_MOUSE_DRIVER
177         requires CYGPKG_VNC_SERVER_BUILD_KEYBOARD_DRIVER
178     }
179
180     # eCos ARM drivers
181     cdl_option CYGBLD_MICROWINDOWS_ARM_DRIVERS {
182         display   "Build MicroWindows ARM drivers"
183         default_value CYGPKG_HAL_ARM
184
185         compile                                 \
186             drivers/scr_ecos.c                  \
187             drivers/kbd_ipaq.c                  \
188             drivers/mou_ipaq.c
189
190
191         requires CYGBLD_MICROWINDOWS_ECOS
192         requires CYGBLD_MICROWINDOWS_NANOWM
193         requires CYGBLD_MICROWINDOWS_NXKBD
194         requires CYGBLD_MICROWINDOWS_NANOX_DEMOS
195
196         # This should come from the HAL
197         requires { !CYGPKG_HAL_ARM_SA11X0_IPAQ || is_substr(CYGPKG_MICROWINDOWS_CFLAGS_ADD, " -DMWPIXEL_FORMAT=MWPF_TRUECOLOR565") }
198         requires { !CYGPKG_HAL_ARM_ARM9_AAED2000 || is_substr(CYGPKG_MICROWINDOWS_CFLAGS_ADD, " -DMWPIXEL_FORMAT=MWPF_TRUECOLOR555") }
199
200     }
201
202     cdl_component CYGPKG_MICROWINDOWS_PC {
203         display     "Build options for PC hardware"
204         flavor      none
205     active_if   (CYGPKG_HAL_I386_PCMB && !CYGBLD_MICROWINDOWS_VNC_DRIVERS)
206         compile     drivers/ps2kbdmou_ecos.c
207         
208         requires CYGBLD_MICROWINDOWS_ECOS
209         
210         cdl_option CYGIMP_MICROWINDOWS_PCSVGA32 {
211             display "Assume 32 bits per pixel, RGB == 0888"
212             description \
213                 "This mode can be used when building for a standard PC,
214                  where bootstrap is handled via RedBoot. A custom version
215                  of RedBoot is required, configured to switch the graphics
216                  card to a suitable resolution before the processor enters
217                  protected mode. A VESA-compliant video BIOS is used for
218                  this. The graphics mode should be 32 bits per pixel true-color."
219
220             implements CYGINT_MICROWINDOWS_PC_DRIVER
221             default_value 1
222             compile drivers/scr_ecospcsvga.c
223             requires { is_substr(CYGPKG_MICROWINDOWS_CFLAGS_ADD, " -DMWPIXEL_FORMAT=MWPF_TRUECOLOR0888 ") }
224             requires { !is_substr(CYGPKG_MICROWINDOWS_CFLAGS_ADD, " -DMWPIXEL_FORMAT=MWPF_TRUECOLOR565 ") }
225             requires { !is_substr(CYGPKG_MICROWINDOWS_CFLAGS_ADD, " -DMWPIXEL_FORMAT=MWPF_PALETTE ") }
226         }
227         
228         cdl_option CYGIMP_MICROWINDOWS_PCSVGA16 {
229             display "Assume 16 bits per pixel, RGB == 565"
230             description \
231                 "This mode can be used when building for a standard PC,
232                  where bootstrap is handled via RedBoot. A custom version
233                  of RedBoot is required, configured to switch the graphics
234                  card to a suitable resolution before the processor enters
235                  protected mode. A VESA-compliant video BIOS is used for
236                  this. The graphics mode should be 16 bits per pixel true-color."
237
238             implements CYGINT_MICROWINDOWS_PC_DRIVER
239             default_value 0
240             compile drivers/scr_ecospcsvga.c
241             requires { !is_substr(CYGPKG_MICROWINDOWS_CFLAGS_ADD, " -DMWPIXEL_FORMAT=MWPF_TRUECOLOR0888 ") }
242             requires { is_substr(CYGPKG_MICROWINDOWS_CFLAGS_ADD, " -DMWPIXEL_FORMAT=MWPF_TRUECOLOR565 ") }
243             requires { !is_substr(CYGPKG_MICROWINDOWS_CFLAGS_ADD, " -DMWPIXEL_FORMAT=MWPF_PALETTE ") }
244         }
245         
246         cdl_option CYGIMP_MICROWINDOWS_PCVGA {
247             display "Build for VGA hardware"
248             description \
249                 "This driver manipulates VGA hardware directly, rather than
250                  going via the video BIOS. Only a limited resolution of
251                  640x480 with 4 bits per pixel is available. The driver
252                  does not implement all required microwindows functionality."
253
254             implements CYGINT_MICROWINDOWS_PC_DRIVER
255             default_value 0
256             compile drivers/scr_bios.c drivers/vgainit.c drivers/vgaplan4.c drivers/memplan4.c
257             requires { is_substr(CYGPKG_MICROWINDOWS_CFLAGS_ADD, " -DMWPIXEL_FORMAT=MWPF_PALETTE ") }
258             requires { !is_substr(CYGPKG_MICROWINDOWS_CFLAGS_ADD, " -DMWPIXEL_FORMAT=MWPF_TRUECOLOR0888 ") }
259         }
260         
261         cdl_interface CYGINT_MICROWINDOWS_PC_DRIVER {
262             display "Number of active PC graphics drivers"
263             requires { CYGINT_MICROWINDOWS_PC_DRIVER == 1 }
264         }
265     }
266     
267
268     # Nano WM
269     cdl_option CYGBLD_MICROWINDOWS_NANOWM {
270         display   "Build MicroWindows NANOWM"
271         default_value 0
272
273         compile                                 \
274             demos/nanowm/nanowm.c                       \
275             demos/nanowm/events.c                       \
276             demos/nanowm/wlist.c                        \
277             demos/nanowm/clients.c                      \
278             demos/nanowm/actions.c                      
279         compile -library=libextras.a ecos/nanowm_thread.c
280     }
281
282     # keyboard
283     cdl_option CYGBLD_MICROWINDOWS_NXKBD {
284         display   "Build MicroWindows NXKBD"
285         default_value 0
286
287         compile                                 \
288             demos/nxkbd/nxkbd.c                 \
289             demos/nxkbd/srvconn.c                       \
290             demos/nxkbd/keynorm.c                       \
291             demos/nxkbd/keyctrl.c                       \
292             demos/nxkbd/keyshft.c                       \
293             demos/nxkbd/keynum.c
294     }
295
296     # keyboard
297     cdl_component CYGBLD_MICROWINDOWS_NANOX_DEMOS {
298         display   "Build MicroWindows NanoX demos"
299         default_value 0
300
301         cdl_option CYGBLD_MICROWINDOWS_NANOX_DEMOS_WORLD {
302             display "Include 'world' demo"
303             default_value 0
304             no_define
305             compile demos/nanox/world.c 
306             compile -library=libextras.a ecos/world_thread.c
307         }
308
309         cdl_option CYGBLD_MICROWINDOWS_NANOX_DEMOS_NTETRIS {
310             display "Include 'nano-tetris' demo"
311             default_value 0
312             no_define
313             compile demos/nanox/ntetris.c 
314             compile -library=libextras.a ecos/ntetris_thread.c
315         }
316     }
317
318     cdl_component CYGPKG_MICROWINDOWS_OPTIONS {
319         display "Build options"
320         flavor  none
321         no_define
322         description   "
323             Package specific build options including control over
324             compiler flags used only in building this package,
325             and details of which tests are built."
326
327
328         cdl_option CYGPKG_MICROWINDOWS_CFLAGS_ADD {
329             display "Additional compiler flags"
330             flavor  data
331             no_define
332             default_value { "-I$(PREFIX)/include/microwin -D__ECOS=1 -DMSDOS=0 -DELKS=0 -D__rtems__=0 -D_MINIX=0 -DNOTYET=0 -DUNIX=1 -DHAVE_FILEIO -DHAVE_BMP_SUPPORT=1 -DHAVE_PNM_SUPPORT=1 -DHAVE_XPM_SUPPORT=1 -DxHAVE_JPEG_SUPPORT=1 -DHAVESELECT=1" }
333             description   "
334                 This option modifies the set of compiler flags for
335                 building the MicroWindows package.
336                 These flags are used in addition to the set of global flags."
337         }
338
339         cdl_option CYGPKG_MICROWINDOWS_CFLAGS_REMOVE {
340             display "Suppressed compiler flags"
341             flavor  data
342             no_define
343             default_value { "" }
344             description   "
345                 This option modifies the set of compiler flags for
346                 building the MicroWindows package.
347                 These flags are removed from the set of global flags
348                 if present."
349         }
350     }
351 }