Merge 13159:13510 from trunk
[reactos.git] / reactos / Jamrules
1 # customization for ReactOS goes here
2
3 # The SharedLibrary and SharedLibraryFromObjects rules were
4 # borrowed from here:
5 # http://www.differentpla.net/~roger/devel/jam/tutorial/shared_lib/index.html
6
7 SUFSHR = .dll ;
8 RM = rm ; # rm comes with MinGW, and the default del doesn't work in some cases
9
10 rule SharedLibrary
11 {
12 SharedLibraryFromObjects $(<) : $(>:S=$(SUFOBJ)) ;
13 Objects $(>) ;
14 }
15
16 rule SharedLibraryFromObjects
17 {
18 local _s _t ;
19
20 # Add grist to file names
21 # Add suffix to dll
22
23 _s = [ FGristFiles $(>) ] ;
24 _t = [ FAppendSuffix $(<) : $(SUFSHR) ] ;
25
26 if $(_t) != $(<)
27 {
28 DEPENDS $(<) : $(_t) ;
29 NOTFILE $(<) ;
30 }
31
32 # make compiled sources a dependency of target
33
34 DEPENDS exe : $(_t) ;
35 DEPENDS $(_t) : $(_s) ;
36 MakeLocate $(_t) : $(LOCATE_TARGET) ;
37
38 Clean clean : $(_t) ;
39
40 Link $(_t) : $(_s) ;
41 }
42
43 # nasm needs to know the output file first, or it doesn't
44 # recognize -I :(
45 actions As
46 {
47 $(AS) -o $(<) $(ASFLAGS) -I$(HDRS) $(>)
48 }
49
50 AS = nasm ;
51
52 # why isn't DEFINES working? :(
53 #DEFINES += _M_IX86 ;
54 CCFLAGS += -D_M_IX86 ;