1 XCOMM platform: $TOG: linux.cf /main/47 1998/04/17 11:32:51 mgreess $
3 /* To reduce the number of warnings generated by X11 and Motif headers that
4 dislike -ansi and -pedantic we can include them with -isystem instead of
5 -I, this tells GCC to treat them as system includes out of our control */
6 #define TopXInclude -isystem$(TOP)/imports/x11/include
9 # define OSName DefaultOSName
11 #ifndef OSMajorVersion
12 # define OSMajorVersion DefaultOSMajorVersion
14 #ifndef OSMinorVersion
15 # define OSMinorVersion DefaultOSMinorVersion
17 #ifndef OSTeenyVersion
18 # define OSTeenyVersion DefaultOSTeenyVersion
21 #ifndef LinuxDistribution
22 #define LinuxDistribution DefaultLinuxDistribution
24 Add "#define LinuxDistribution Linux<mumble>" to your site.def or host.def.
25 Currently only LinuxSuSE will be figured out automatically.
26 Valid values are (from the list at www.linux.org in Oct. 1997):
42 #ifndef LinuxCLibMajorVersion
43 # define LinuxCLibMajorVersion DefaultLinuxCLibMajorVersion
45 #ifndef LinuxCLibMinorVersion
46 # define LinuxCLibMinorVersion DefaultLinuxCLibMinorVersion
48 #ifndef LinuxCLibTeenyVersion
49 # define LinuxCLibTeenyVersion DefaultLinuxCLibTeenyVersion
51 #ifndef LinuxBinUtilsMajorVersion
52 # define LinuxBinUtilsMajorVersion DefaultLinuxBinUtilsMajorVersion
55 XCOMM operating system: OSName (OSMajorVersion./**/OSMinorVersion./**/OSTeenyVersion)
56 XCOMM libc: (LinuxCLibMajorVersion./**/LinuxCLibMinorVersion./**/LinuxCLibTeenyVersion)
57 XCOMM binutils: (LinuxBinUtilsMajorVersion)
60 # if OSMajorVersion > 1 || (OSMajorVersion == 1 && OSMinorVersion > 1)
61 # define UseElfFormat YES
63 # define UseElfFormat NO
64 # error "Only ELF format is supported on linux"
68 #define BuildLibPathVar LD_LIBRARY_PATH
71 #define HasGcc2ForCplusplus YES
72 #define GccUsesGas YES
75 #define HasShadowPasswd YES
78 #define HasSockets YES
79 #if (LinuxDistribution == LinuxRedHat)
83 #define AvoidNullMakeCommand YES
84 #define StripInstalledPrograms YES
85 #define CompressAllFonts YES
86 #define Malloc0ReturnsNull YES
87 #define NeedConstPrototypes YES
88 #define NeedFunctionPrototypes YES
89 #define NeedNestedPrototypes YES
90 #define NeedVarargsPrototypes YES
91 #define NeedWidePrototypes NO
92 #define SetTtyGroup YES
94 #define CcCmd gcc -g -pipe
95 #define CplusplusCmd g++ -g -pipe -fpermissive
99 #define CplusplusLibC -lstdc++
100 #define AsmDefines -D__ELF__
102 #define MkdirHierCmd mkdir -p
103 #define CppCmd /lib/cpp
104 #if OSMajorVersion >= 2
105 # define YaccCmd yacc
107 # define YaccCmd bison -y
109 #define LexCmd flex -l
111 #define PreProcessCmd CcCmd -E
112 #define PostIncDir DefaultGccIncludeDir
113 #define LdCombineFlags -r
114 #define XawI18nDefines -DUSE_XWCHAR_STRING -DUSE_XMBTOWC
115 #define HasWChar32 YES
116 #define StandardCppDefines -traditional StandardDefines
117 #define ExtensionOSDefines -DXTESTEXT1
119 #define LinuxLocaleDefines /**/
121 XCOMM If you have the tirpc library on your system, and you have the
122 XCOMM libtirpc-dev installed, then define HasTIRPCLib to YES in either
123 XCOMM your host.def or site.def file. Using the tirpc lib should
124 XCOMM allow running rpcbind in secure mode (ie: without the -i option).
125 XCOMM The default is NO.
128 # define HasTIRPCLib NO
137 #if !defined(DefaultGcc2i386Opt)
138 # define DefaultGcc2i386Opt -O2 -fno-strict-aliasing
141 #if LinuxCLibMajorVersion < 6
142 # define LinuxSourceDefines -D_POSIX_SOURCE \
143 -D_BSD_SOURCE -D_SVID_SOURCE LinuxLocaleDefines
145 # define HasLibCrypt NO
149 # define LinuxSourceDefines -D_POSIX_C_SOURCE=199309L \
151 -D_BSD_SOURCE -D_SVID_SOURCE -D_XOPEN_SOURCE \
152 -D__NO_STRING_INLINES -D__NO_MATH_INLINES \
154 # define HasPosixThreads YES
155 # define ThreadedX YES
156 # define HasThreadSafeAPI YES
157 # define ThreadsLibraries -lpthread
158 # define SystemMTDefines -D_REENTRANT
160 # define HasLibCrypt YES
164 #ifdef SparcArchitecture
165 # define LinuxMachineDefines -Dsparc
168 # define HasPlugin YES
169 # define VendorHasX11R6_3libXext YES /* XC or XFree86 3.3.1 */
171 #endif /* SparcArchitecture */
173 #ifdef ARMArchitecture
174 # define LinuxMachineDefines -D__arm__
175 # define LSBBitOrder YES
178 # define HasPlugin YES
179 # define VendorHasX11R6_3libXext YES /* XC or XFree86 3.3.1 */
181 #endif /* ARMArchitecture */
183 #ifdef i386Architecture
184 # define OptimizedCDebugFlags DefaultGcc2i386Opt
185 # define LinuxMachineDefines -D__i386__
186 /* For DtHelp TIFF processing routines. */
187 # define LSBBitOrder YES
190 # define HasPlugin YES
191 # define VendorHasX11R6_3libXext YES /* XC or XFree86 3.3.1 */
193 /* add this to void screenfuls of warnings from makedepend */
194 # define DependFlags -I/usr/include/i386-linux-gnu
195 #endif /* i386Architecture */
197 #ifdef AMD64Architecture
198 # define OptimizedCDebugFlags DefaultGcc2i386Opt
199 # define LinuxMachineDefines -D__x86_64__
200 /* For DtHelp TIFF processing routines. */
201 # define LSBBitOrder YES
204 # define HasPlugin YES
205 # define VendorHasX11R6_3libXext YES /* XC or XFree86 3.3.1 */
207 /* add this to void screenfuls of warnings from makedepend */
208 # define DependFlags -I/usr/include/x86_64-linux-gnu
209 #endif /* AMD64Architecture */
211 #ifdef PpcArchitecture
212 # define OptimizedCDebugFlags DefaultGcc2i386Opt
213 # define LinuxMachineDefines -D__powerpc__
214 #endif /* PpcArchitecture */
216 #ifdef AlphaArchitecture
217 # define OptimizedCDebugFlags DefaultGcc2i386Opt
218 # define LinuxMachineDefines -D__alpha__
219 #endif /* AlphaArchitecture */
221 #ifdef Mc68020Architecture
222 # define OptimizedCDebugFlags DefaultGcc2i386Opt
223 # define LinuxMachineDefines -D__mc68000__
224 # define StandardCppDefines -traditional
225 #endif /* Mc68020Architecture */
228 CXXDEPENDINCLUDE = $(shell CppCmd -x c++ -Wp,-v < /dev/null \
229 2>&1 | sed -n 's/ \(.*[cg]++.*\)/-I\1/p')
230 #define CplusplusDependIncludes $(CXXDEPENDINCLUDE)
232 #define DependDefines -D_SYS_RESOURCE_H -D_SYS_UTSNAME_H
234 #define StandardDefines -Dlinux LinuxMachineDefines LinuxSourceDefines
236 #define ConnectionFlags -DUNIXCONN -DTCPCONN
238 XCOMM This is needed for CDE currently
239 #define CplusplusStandardDefines StandardDefines
241 /* Some of these man page defaults are overriden in the above OS sections */
243 # define ManSuffix 1x
246 # define ManDir $(MANSOURCEPATH)1
249 # define LibManSuffix 3x
252 # define LibmanDir $(MANSOURCEPATH)3
254 #ifndef FileManSuffix
255 # define FileManSuffix 5x
258 # define FileManDir $(MANSOURCEPATH)5
261 #define ArchitectureDefines -DLINUX_ARCHITECTURE
263 #define TtClientLibs $(TTLIB) $(TIRPCLIB) $(XTOOLLIB) $(XLIB)
264 #define TtClientDepLibs $(DEPTTLIB) $(DEPXTOOLLIB) $(DEPXLIB)
266 #include <lnxLib.rules>
267 #include <xfree86.cf>