-Started to move stuff from library back to main game
[supertux.git] / mk / jam / unix.jam
1 #============================================================================
2 # Jam configuration and actions for Linux/Unix
3 #============================================================================
4 SHELL ?= "/bin/sh" ;
5
6 #----------------------------------------------------------------------------
7 # platform specific rules
8
9 ##  ConstructApplicationTarget target : options
10 ##    Constructs the application atrget name (ie. foo.exe for foo)
11 rule ConstructApplicationTarget
12 {
13     return $(<) ;
14 }
15 rule ConstructLibraryTarget
16 {
17     if [ IsElem shared : $(2) ] {
18         return lib$(<).la ;
19     } else {
20         return lib$(<).a ;
21     }
22 }
23 rule ConstructPluginTarget
24 {
25     return $(<).so ;
26 }
27
28 # SystemLinkApplication target : objects : options
29 #  do system specific actions needed for linking the application and construct
30 #  correct clean targets.
31 rule SystemLinkApplication
32 {
33     local target = $($(<)_TARGET) ;
34   
35     Depends $(target) : $(>) ;
36     LinkApplication $(target) : $(>) ;
37     LIBS on $(target) = $(LIBS) ;
38     # setup clean rules
39     Clean clean : $(target) ;
40     Clean $(<)clean : $(target) ;
41 }
42
43 actions LinkApplication bind NEEDLIBS bind EXTRAOBJECTS
44 {
45     $(LINK) -o $(<) $(>) $(EXTRAOBJECTS) $(NEEDLIBS) $(LIBS)
46 }
47
48