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 # OS specific variable settings
18 ###############################################################################
20 ###############################################################################
22 PATH_SEPARATOR = '\' ;
23 local SUPPORTED_TOOLSETS =
29 # if the JAM_TOOLSET environment variable is defined, check that it is
30 # one of our supported values
33 if ! $(JAM_TOOLSET) in $(SUPPORTED_TOOLSETS) {
34 Echo 'The JAM_TOOLSET environment variable is defined but its value' ;
35 Echo 'is invalid, please use one of the following:' ;
37 for t in $(SUPPORTED_TOOLSETS) { Echo ' ' $(t) ; }
43 Echo 'The JAM_TOOLSET environment variable is not defined, defaults to MINGW' ;
45 MINGW ?= 'c:\mingw\bin\' ;
58 if $(JAM_TOOLSET) = MINGW {
59 Echo 'Compiler is GCC with MinGW' ;
65 C++FLAGS ?= $(CCFLAGS) ;
68 LINKLIBS ?= -lkernel32 ;
70 CC.standard ?= -std=gnu11 ;
74 # MinGW-specific thingy
75 MINGW_GUI = '-Wl,-subsystem,windows' ;
76 MINGW_THREADS = '-mthreads' ;
86 CC = "$(MINGW)$(CC:J= )" ;
87 C++ = "$(MINGW)$(C++:J= )" ;
88 LINK = "$(MINGW)$(LINK:J= )" ;
89 C++LINK = "$(MINGW)$(C++LINK:J= )" ;
90 AR = "$(MINGW)$(AR:J= )" ;
91 if $(RANLIB) { RANLIB = "$(MINGW)$(RANLIB:J= )" ; }
93 } else if $(JAM_TOOLSET) = LCC {
94 Echo 'Compiler is Win32-LCC' ;
106 } else if $(JAM_TOOLSET) = PELLESC {
107 Echo 'Compiler is PellesC' ;
117 LINKLIBS ?= crt.lib oldnames.lib 'Win\kernel32.lib' ;
121 # XXX: We need better comments here !!
122 Exit "On NT, set MINGW to the root of the MinGW dir (but it won't help you anyway)" ;
127 ###############################################################################
129 ###############################################################################
131 PATH_SEPARATOR = '/' ;
135 CCFLAGS += -D__cygwin__ ;
148 OBJCFLAGS ?= $(CCFLAGS) ;
149 C++FLAGS ?= $(CCFLAGS) ;
154 LINKFLAGS ?= $(CCFLAGS) ;
157 CC.standard ?= -std=gnu11 ;
160 if $(OS) != 'LINUX' { RANLIB ?= ranlib ; }
168 STDHDRS ?= /usr/include ;
171 # shared library object file suffix. We assume that it is identical
172 # than the normal one
173 SUFOBJSHR ?= $(SUFOBJ) ;
174 SUFLIBSHR ?= $(SUFLIB) ;
181 # General defaults; a lot like UNIX
183 PATH_SEPARATOR ?= '/' ;
184 if $(OS) != 'LINUX' { AR ?= ar ru ; } else { AR ?= ar sru ; }
188 BINDIR ?= /usr/local/bin ;
189 C++ ?= g++ ; # k8: was cc
191 CC ?= gcc ; # k8: was cc
199 JAMRULES ?= Jamrules ;
201 LIBDIR ?= /usr/local/lib ;
206 MANDIR ?= /usr/local/man ;
218 SHELLHEADER ?= '#!/bin/sh' ;
222 SUBDIRRESET ?= ASFLAGS HDRS C++FLAGS CCFLAGS HDRS DEFINES ;
226 UNDEFFLAG ?= '-u _' ;
236 GDCLINK ?= gdc -pipe ;
238 HDRPATTERN = '^\s*#\s*include\s+[<"]([^">]+)[">].*$' ;
241 OSFULL = $(OS)$(OSVER)$(OSPLAT) $(OS)$(OSPLAT) $(OS)$(OSVER) $(OS) ;
244 #C++OPTIM ?= $(OPTIM) ;
246 #C++LINKFLAGS ?= $(LINKFLAGS) ;
247 #C++LINKLIBS ?= $(LINKLIBS) ;
249 OBJCOPTIM ?= $(OPTIM) ;
251 OBJCLINKFLAGS ?= $(LINKFLAGS) ;
252 OBJCLINKLIBS ?= $(LINKLIBS) ;
253 OBJCLINKLIBS += -lobjc ;
256 if ( 'gcc' in $(CC) ) && ! ( '-pipe' in $(CC) ) { CC += -pipe ; }
257 if ( 'g++' in $(C++) ) && ! ( '-pipe' in $(C++) ) { C++ += -pipe ; }
261 #Echo 'OSFULL:' $(OSFULL) ;
262 #Echo 'UNIX:' $(UNIX) ;