File: unix.jam

package info (click to toggle)
lincity-ng 2.9~git20150314-3
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 191,124 kB
  • ctags: 4,615
  • sloc: cpp: 34,384; xml: 25,862; sh: 3,218; ansic: 806; python: 302; makefile: 24
file content (48 lines) | stat: -rw-r--r-- 1,234 bytes parent folder | download | duplicates (9)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
#============================================================================
# Jam configuration and actions for Linux/Unix
#============================================================================
SHELL ?= "/bin/sh" ;

#----------------------------------------------------------------------------
# platform specific rules

##  ConstructApplicationTarget target : options
##    Constructs the application atrget name (ie. foo.exe for foo)
rule ConstructApplicationTarget
{
    return $(<) ;
}
rule ConstructLibraryTarget
{
    if [ IsElem shared : $(2) ] {
        return lib$(<).la ;
    } else {
        return lib$(<).a ;
    }
}
rule ConstructPluginTarget
{
    return $(<).so ;
}

# SystemLinkApplication target : objects : options
#  do system specific actions needed for linking the application and construct
#  correct clean targets.
rule SystemLinkApplication
{
    local target = $($(<)_TARGET) ;
  
    Depends $(target) : $(>) ;
    LinkApplication $(target) : $(>) ;
    LIBS on $(target) = $(LIBS) ;
    # setup clean rules
    Clean clean : $(target) ;
    Clean $(<)clean : $(target) ;
}

actions LinkApplication bind NEEDLIBS bind EXTRAOBJECTS
{
    $(LINK) -o $(<) $(>) $(EXTRAOBJECTS) $(NEEDLIBS) $(LIBS)
}