1#============================================================================
2# Jam configuration and actions for MacOS/X
3# Copyright (C) 2003 by Eric Sunshine <sunshine@sunshineco.com>
4#============================================================================
5SHELL ?= "/bin/sh" ;
6DEEPCOPY ?= "cp -R" ;
7
8# Experience seems to indicate that library scanning misbehaves on MacOS/X with
9# Jam 2.4, consequently we disable it.
10AR = "ar ru" ;
11NOARUPDATE = true ;
12NOARSCAN = true ;
13actions Archive
14{
15  $(AR) $(<) $(>)
16}
17
18#------------------------------------------------------------------------------
19# Public rules.
20#------------------------------------------------------------------------------
21
22# ConstructApplicationTarget target : options
23#    Constructs the application target name (ie. foo.app for foo)
24rule ConstructApplicationTarget
25{
26  return $(<) ;
27}
28
29# ConstructLibraryTarget target : options
30rule ConstructLibraryTarget
31{
32  return lib$(<).a ;
33}
34
35# SystemLinkApplication target : objects : options
36rule SystemLinkApplication
37{
38  local target = $($(<)_TARGET) ;
39  Depends $(target) : $(>) ;
40
41  LinkApplication $(target) : $(>) ;
42  LIBS on $(target) = $(LIBS) ;
43  LDFLAGS on $(target) = $(LDFLAGS) ;
44  Clean clean : $(target) ;
45  Clean $(<)clean : $(target) ;
46}
47
48# LinkApplicationConsole exe : objects
49#    Link a console (non-GUI) appliation from a set of object files.
50actions LinkApplication bind NEEDLIBS bind EXTRAOBJECTS
51{
52  $(MACOSX.ENVIRON)
53  $(LINK) -o $(<) $(>) $(EXTRAOBJECTS) $(NEEDLIBS) $(LDFLAGS) $(LIBS)
54}
55
56