1 XCOMM platform: $TOG: linux.cf /main/47 1998/04/17 11:32:51 mgreess $
4 # define OSName DefaultOSName
7 # define OSMajorVersion DefaultOSMajorVersion
10 # define OSMinorVersion DefaultOSMinorVersion
12 #ifndef OSTeenyVersion
13 # define OSTeenyVersion DefaultOSTeenyVersion
16 #ifndef LinuxDistribution
17 #define LinuxDistribution DefaultLinuxDistribution
19 Add "#define LinuxDistribution Linux<mumble>" to your site.def or host.def.
20 Currently only LinuxSuSE will be figured out automatically.
21 Valid values are (from the list at www.linux.org in Oct. 1997):
38 #ifndef DefaultLinuxCLibMajorVersion
39 # define DefaultLinuxCLibMajorVersion 6
41 #ifndef DefaultLinuxCLibMinorVersion
42 # define DefaultLinuxCLibMinorVersion 0
44 #ifndef DefaultLinuxCLibTeenyVersion
45 # define DefaultLinuxCLibTeenyVersion 0
48 #ifndef LinuxCLibMajorVersion
49 # define LinuxCLibMajorVersion DefaultLinuxCLibMajorVersion
51 #ifndef LinuxCLibMinorVersion
52 # define LinuxCLibMinorVersion DefaultLinuxCLibMinorVersion
54 #ifndef LinuxCLibTeenyVersion
55 # define LinuxCLibTeenyVersion DefaultLinuxCLibTeenyVersion
58 #ifndef LinuxBinUtilsMajorVersion
59 # define LinuxBinUtilsMajorVersion DefaultLinuxBinUtilsMajorVersion
62 XCOMM operating system: OSName (OSMajorVersion./**/OSMinorVersion./**/OSTeenyVersion)
63 XCOMM libc: (LinuxCLibMajorVersion./**/LinuxCLibMinorVersion./**/LinuxCLibTeenyVersion)
64 XCOMM binutils: (LinuxBinUtilsMajorVersion)
67 # if OSMajorVersion > 1 || (OSMajorVersion == 1 && OSMinorVersion > 1)
68 # define UseElfFormat YES
70 # define UseElfFormat NO
71 # error "Only ELF format is supported on linux"
75 #define BuildLibPathVar LD_LIBRARY_PATH
78 #define HasGcc2ForCplusplus YES
79 #define GccUsesGas YES
82 #define HasShadowPasswd YES
85 #define HasSockets YES
87 #define HasMakefileSafeInclude YES
88 #define DependFileName .depend
89 #define DependCmd $(CC) -E -MM -MG
90 #define M4Cmd /usr/bin/m4
92 #ifdef IncludeMakefile
93 # undef IncludeMakefile
96 #define IncludeMakefile(file) -include file
98 #if (LinuxDistribution == LinuxRedHat)
102 #define AvoidNullMakeCommand YES
103 #define StripInstalledPrograms NO
104 #define CompressAllFonts YES
105 #define Malloc0ReturnsNull YES
106 #define NeedConstPrototypes YES
107 #define NeedFunctionPrototypes YES
108 #define NeedNestedPrototypes YES
109 #define NeedVarargsPrototypes YES
110 #define NeedWidePrototypes NO
111 #define SetTtyGroup YES
113 #define CcCmd gcc -g -pipe
114 #define CplusplusCmd g++ -g -pipe
118 #define CplusplusLibC -lstdc++
119 #define AsmDefines -D__ELF__
121 #define MkdirHierCmd mkdir -p
122 #define CppCmd /lib/cpp
123 #if OSMajorVersion >= 2
124 # define YaccCmd yacc
126 # define YaccCmd bison -y
128 #define LexCmd flex -l
130 #define PreProcessCmd CcCmd -E
131 #define PostIncDir DefaultGccIncludeDir
132 #define LdCombineFlags -r
133 #define XawI18nDefines -DUSE_XWCHAR_STRING -DUSE_XMBTOWC
134 #define HasWChar32 YES
135 #define StandardCppDefines -traditional -nostdinc StandardDefines
136 #define ExtensionOSDefines -DXTESTEXT1
138 #define LinuxLocaleDefines /**/
140 #define DefaultCCOptions -ansi
142 XCOMM Lets try XdmAuth instead of the ancient MIT/DES auth
143 #define HasXdmAuth YES
145 XCOMM TIRPC is enabled by default now on Linux. The libtirpc-dev package is
146 XCOMM required for this support. If you cannot use tirpc for some reason,
147 XCOMM can disable it by defining HasTIRPCLib to NO in either
148 XCOMM your host.def or site.def file. Not using the TIRPC lib will require
149 XCOMM that you run rpcbind in insecure mode (ie: with the -i option).
150 XCOMM The default is YES.
153 # define HasTIRPCLib YES
158 TIRPCINC = -I/usr/include/tirpc
164 #if !defined(DefaultGcc2i386Opt)
165 # define DefaultGcc2i386Opt -O2 -fno-strict-aliasing -Wno-write-strings \
169 #if LinuxCLibMajorVersion < 6
170 # define LinuxSourceDefines -D_POSIX_SOURCE -D_DEFAULT_SOURCE \
171 -D_BSD_SOURCE -D_SVID_SOURCE LinuxLocaleDefines
173 # define HasLibCrypt NO
177 # define LinuxSourceDefines -D_POSIX_SOURCE -D_DEFAULT_SOURCE \
178 -D_BSD_SOURCE -D_SVID_SOURCE \
179 -D__NO_STRING_INLINES -D__NO_MATH_INLINES \
181 # define HasPosixThreads YES
182 # define ThreadedX YES
183 # define HasThreadSafeAPI YES
184 # define ThreadsLibraries -lpthread
185 # define SystemMTDefines -D_REENTRANT
187 # define HasLibCrypt YES
191 #ifdef SparcArchitecture
192 # define LinuxMachineDefines -Dsparc
195 # define HasPlugin YES
196 # define VendorHasX11R6_3libXext YES /* XC or XFree86 3.3.1 */
198 #endif /* SparcArchitecture */
200 #ifdef ARMArchitecture
201 # ifndef OptimizedCDebugFlags
202 # define OptimizedCDebugFlags DefaultGcc2i386Opt
204 # define LinuxMachineDefines -D__arm__
205 # define LSBBitOrder YES
208 # define HasPlugin YES
209 # define VendorHasX11R6_3libXext YES /* XC or XFree86 3.3.1 */
211 #endif /* ARMArchitecture */
213 #ifdef i386Architecture
214 # ifndef OptimizedCDebugFlags
215 # define OptimizedCDebugFlags DefaultGcc2i386Opt
217 # define LinuxMachineDefines -D__i386__
218 /* For DtHelp TIFF processing routines. */
219 # define LSBBitOrder YES
222 # define HasPlugin YES
223 # define VendorHasX11R6_3libXext YES /* XC or XFree86 3.3.1 */
225 #endif /* i386Architecture */
227 #ifdef AMD64Architecture
228 # ifndef OptimizedCDebugFlags
229 # define OptimizedCDebugFlags DefaultGcc2i386Opt
231 # define LinuxMachineDefines -D__x86_64__
232 /* For DtHelp TIFF processing routines. */
233 # define LSBBitOrder YES
236 # define HasPlugin YES
237 # define VendorHasX11R6_3libXext YES /* XC or XFree86 3.3.1 */
239 #endif /* AMD64Architecture */
241 #ifdef AArch64Architecture
242 # ifndef OptimizedCDebugFlags
243 # define OptimizedCDebugFlags -fmessage-length=0 -grecord-gcc-switches -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector-strong -funwind-tables -fasynchronous-unwind-tables -fstack-clash-protection -g -fno-strict-aliasing
245 # define LinuxMachineDefines -D__aarch64__
246 # define ServerOSDefines XFree86ServerOSDefines -DDDXTIME
247 # define ServerExtraDefines -DGCCUSESGAS XFree86ServerDefines -D_XSERVER64
248 #endif /* AArch64Architecture */
251 #ifdef PpcArchitecture
252 # ifndef OptimizedCDebugFlags
253 # define OptimizedCDebugFlags DefaultGcc2i386Opt
255 # define LinuxMachineDefines -D__powerpc__
256 #endif /* PpcArchitecture */
258 #ifdef AlphaArchitecture
259 # ifndef OptimizedCDebugFlags
260 # define OptimizedCDebugFlags DefaultGcc2i386Opt
262 # define LinuxMachineDefines -D__alpha__
263 #endif /* AlphaArchitecture */
265 #ifdef Mc68020Architecture
266 # ifndef OptimizedCDebugFlags
267 # define OptimizedCDebugFlags DefaultGcc2i386Opt
269 # define LinuxMachineDefines -D__mc68000__
270 # define StandardCppDefines -traditional
271 #endif /* Mc68020Architecture */
273 #define StandardDefines -D__linux__ LinuxMachineDefines LinuxSourceDefines
275 #define ConnectionFlags -DUNIXCONN -DTCPCONN
277 XCOMM This is needed for CDE currently
278 #define CplusplusStandardDefines StandardDefines
280 /* Some of these man page defaults are overriden in the above OS sections */
282 # define ManSuffix 1x
285 # define ManDir $(MANSOURCEPATH)1
288 # define LibManSuffix 3x
291 # define LibmanDir $(MANSOURCEPATH)3
293 #ifndef FileManSuffix
294 # define FileManSuffix 5x
297 # define FileManDir $(MANSOURCEPATH)5
300 #define ArchitectureDefines -DLINUX_ARCHITECTURE
302 #define TtClientLibs $(TTLIB) $(TIRPCLIB) $(XTOOLLIB) $(XLIB)
304 #define SharedTtReqs $(TIRPCLIB) $(LDPRELIBS) SharedXReqs $(CXXLIB)
306 #include <lnxDep.rules>
307 #include <lnxLib.rules>