Option to jump with up on keyboard.
[supertux.git] / src / scripting / Jamfile
1 SubDir TOP src scripting ;
2
3 if $(MINISWIG)
4 {
5     ##  MiniSwigRule outputcppfile : inputfile : modulename : flags
6     rule MiniSwigRule
7     {
8         local sources = [ SearchSource $(>) ] ;
9         local cppfile = [ LocateTarget $(<) : $(SUBDIR) ] ;
10         local headerfile = [ LocateTarget $(<:S=.hpp) : $(SUBDIR) ] ;   
11         SEARCH on $(headerfile) = $(SOURCH_SOURCE) ;
12
13         MiniSwig $(cppfile) : $(sources) ;
14
15         CPPFLAGS on $(cppfile) = $(CPPFLAGS) -DSCRIPTING_API ;
16         headerfile on $(cppfile) = $(headerfile) ;
17         modulename on $(cppfile) = $(3) ;
18         FLAGS on $(cppfile) = $(4) ;
19
20         local h = $(headerfile:G=) ;
21         h = $(h:D=) ;
22         Includes $(h) : $(headerfile) ;
23         Includes $(headerfile) : $(cppfile) ;
24
25         local object = [ CompileObject $(cppfile) ] ;
26
27         return $(object) ;
28     }
29
30     rule MiniSwig
31     {
32         Depends $(<) : $(>) $(MINISWIG) ;
33     }
34
35     actions MiniSwig bind headerfile
36     {
37         $(CPP) -x c -CC $(CPPFLAGS) $(>) -o $(LOCATE_OBJECTS)/miniswig.tmp
38         ./miniswig --output-cpp $(<) --input $(LOCATE_OBJECTS)/miniswig.tmp --output-hpp $(headerfile) --module $(modulename) $(FLAGS)
39 #       rm -f $(LOCATE_OBJECTS)/miniswig.tmp
40     }
41 }
42
43 wrapper_sources = [ Filter [ Wildcard *.cpp *.hpp ] : wrapper.cpp wrapper.hpp ] ;
44 if ! $(MINISWIG)
45 {
46     wrapper_sources += [ SearchSource wrapper.cpp ] ;
47 }
48 wrapper_objects = [ CompileObjects $(wrapper_sources) ] ;
49 if $(MINISWIG)
50 {
51     wrapper_objects += 
52         [ MiniSwigRule wrapper.cpp : wrapper.interface.hpp : supertux : --select-namespace Scripting ] ;
53 }
54