[PRINTING]
[reactos.git] / rosapps / applications / explorer-old / rc-mingw.jam
1 import type ;
2 import generators ;
3 import feature ;
4
5 type.register RC : rc ;
6
7 rule init ( )
8 {
9 }
10
11 rule resource-compile ( target : sources * : properties * )
12 {
13 # local OS = [ feature.get-values <os> : $(properties) ] ;
14 resource-compile-mingw $(target) : $(sources[1]) ;
15 # switch $(OS)
16 # {
17 # case "NT" :
18 # resource-compile-nt $(target) : $(sources[1]) ;
19 # case "CYGWIN" :
20 # resource-compile-cygwin $(target) : $(sources[1]) ;
21 # case "FREEBSD" :
22 # create-empty-object $(target) : $(sources[1]) ;
23 # case "*" :
24 # errors.error "Cannot process RC files for OS=$(OS)" ;
25 # }
26 }
27
28
29 actions quietly resource-compile-nt
30 {
31 rc /i "$(>:D)" /fo "$(<)" "$(>)"
32 }
33
34 actions quietly resource-compile-mingw
35 {
36 windres -D__WINDRES__ -o "$(<)" -i "$(>)"
37 }
38
39 actions quietly resource-compile-cygwin
40 {
41 windres -D__WINDRES__ --include-dir "$(>:D)" -o "$(<)" -i "$(>)"
42 }
43
44 actions quietly create-empty-object
45 {
46 as /dev/null -o "$(<)"
47 }
48
49 # Since it's a common practice to write
50 # exe hello : hello.cpp hello.rc
51 # we change the name of object created from RC file, to
52 # avoid conflict with hello.cpp.
53 generators.register-standard rc-mingw.resource-compile : RC : OBJ(%_res) ;