1 SubDir TOP src scripting ;
5 ## MiniSwigRule outputcppfile : inputfile : modulename : flags
8 local sources = [ SearchSource $(>) ] ;
9 local cppfile = [ LocateTarget $(<) : $(SUBDIR) ] ;
10 local headerfile = [ LocateTarget $(<:S=.hpp) : $(SUBDIR) ] ;
11 SEARCH on $(headerfile) = $(SOURCH_SOURCE) ;
13 MiniSwig $(cppfile) : $(sources) ;
15 CPPFLAGS on $(cppfile) = $(CPPFLAGS) -DSCRIPTING_API ;
16 headerfile on $(cppfile) = $(headerfile) ;
17 modulename on $(cppfile) = $(3) ;
18 FLAGS on $(cppfile) = $(4) ;
20 local h = $(headerfile:G=) ;
22 Includes $(h) : $(headerfile) ;
23 Includes $(headerfile) : $(cppfile) ;
25 local object = [ CompileObject $(cppfile) ] ;
32 Depends $(<) : $(>) $(MINISWIG) ;
35 actions MiniSwig bind headerfile
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
43 wrapper_sources = [ Filter [ Wildcard *.cpp *.hpp ] : wrapper.cpp wrapper.hpp ] ;
46 wrapper_sources += [ SearchSource wrapper.cpp ] ;
48 wrapper_objects = [ CompileObjects $(wrapper_sources) ] ;
52 [ MiniSwigRule wrapper.cpp : wrapper.interface.hpp : supertux : --select-namespace Scripting ] ;