comsetix
[k8jam.git] / defaults / fix / Jambase.fix
blobd850f837ebcf61dc50ab197464ab5262bdb61eb9
1 # This program is free software: you can redistribute it and/or modify
2 # it under the terms of the GNU General Public License as published by
3 # the Free Software Foundation, either version 3 of the License, or
4 # (at your option) any later version.
6 # This program is distributed in the hope that it will be useful,
7 # but WITHOUT ANY WARRANTY; without even the implied warranty of
8 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
9 # GNU General Public License for more details.
11 # You should have received a copy of the GNU General Public License
12 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
15 # NOARUPDATE - can't update an archive
17 if $(NOARUPDATE) {
18   actions Archive {
19     $(AR) $(<) $(>)
20   }
25 # *NIX specific actions
27 if $(UNIX) {
28   actions GenFile1 {
29     PATH=".:$PATH"
30     $(>[1]) $(<) $(>[2-])
31   }
36 # NT specific actions
38 if $(NT) {
39   if $(JAM_TOOLSET) = MINGW {
40     actions together piecemeal Archive {
41       $(AR) $(<) $(>:T)
42     }
43     actions Cc {
44       $(CC) -c -o $(<) $(CFLAGS.all) $(CCFLAGS) $(OPTIM.all) $(OPTIM) $(CCDEFS) $(CCHDRS) -I$(STDHDRS) $(>)
45     }
46     actions C++ {
47       $(C++) -c -o $(<) $(CFLAGS.all) $(C++FLAGS) $(OPTIM.all) $(OPTIM) $(CCDEFS) $(CCHDRS) -I$(STDHDRS) $(>)
48     }
49     actions DllLink bind DEFFILENAME IMPLIBNAME {
50       $(LINK) $(LINKFLAGS.all) $(LINKFLAGS) -shared -o $(<) $(>) $(DEFFILENAME) -Wl,--out-implib,$(IMPLIBNAME) $(LINKLIBS.all) $(LINKLIBS)
51     }
52   } else if $(JAM_TOOLSET) = LCC {
53     actions together piecemeal Archive {
54       $(AR) /out:$(<) $(>)
55     }
56     actions Cc {
57       $(CC) $(CFLAGS.all) $(CCFLAGS) $(OPTIM.all) $(OPTIM) $(CCDEFS) $(CCHDRS) -Fo$(<) -I$(STDHDRS) $(>)
58     }
59     actions Link bind NEEDLIBS {
60       $(LINK) $(LINKFLAGS.all) $(LINKFLAGS) -o $(<) $(UNDEFS) $(>) $(NEEDLIBS) $(LINKLIBS.all) $(LINKLIBS)
61     }
62     actions DllLink bind NEEDLIBS DEFFILENAME {
63       $(LINK) $(LINKFLAGS.all) $(LINKFLAGS) -DLL -o $(<) $(UNDEFS) $(>) $(DEFFILENAME) $(NEEDLIBS) $(LINKLIBS.all) $(LINKLIBS)
64     }
65     actions ignore DllLinkMv {
66       $(MV) $(2) $(1)
67     }
68     actions Shell {
69       $(CP) $(>) $(<)
70     }
71   } else if $(JAM_TOOLSET) = PELLESC {
72     actions together piecemeal Archive {
73       $(AR) /OUT:$(<) $(>)
74     }
75     actions Cc {
76       $(CC) $(CFLAGS.all) $(CCFLAGS) $(OPTIM.all) $(OPTIM) $(CCDEFS) $(CCHDRS)   /Fo $(<) -I$(STDHDRS)  $(>)
77     }
78     actions Link bind NEEDLIBS {
79       $(LINK) $(LINKFLAGS.all) $(LINKFLAGS) /OUT:$(<) $(>) $(NEEDLIBS) $(LINKLIBS.all) $(LINKLIBS)
80     }
81     actions DllLink bind NEEDLIBS DEFFILENAME IMPLIBNAME {
82       $(LINK) $(LINKFLAGS.all) $(LINKFLAGS) /DLL /DEF:$(DEFFILENAME) /IMPLIB:$(IMPLIBNAME) /OUT:$(<) $(>) $(NEEDLIBS) $(LINKLIBS.all) $(LINKLIBS)
83     }
84     actions Shell {
85       $(CP) $(>) $(<)
86     }
87   }