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. '97):
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"
67 #define BuildLibPathVar LD_LIBRARY_PATH
70 #define HasGcc2ForCplusplus YES
71 #define GccUsesGas YES
74 #define HasShadowPasswd YES
77 #define HasSockets YES
78 #if (LinuxDistribution == LinuxRedHat)
82 #define AvoidNullMakeCommand YES
83 #define StripInstalledPrograms YES
84 #define CompressAllFonts YES
85 #define Malloc0ReturnsNull YES
86 #define NeedConstPrototypes YES
87 #define NeedFunctionPrototypes YES
88 #define NeedNestedPrototypes YES
89 #define NeedVarargsPrototypes YES
90 #define NeedWidePrototypes NO
91 #define SetTtyGroup YES
93 #define CcCmd gcc -g -pipe
94 #define CplusplusCmd g++ -g -pipe -fpermissive
98 #define CplusplusLibC -lstdc++
99 #define AsmDefines -D__ELF__
101 #define MkdirHierCmd mkdir -p
102 #define CppCmd /lib/cpp
103 #if OSMajorVersion >= 2
106 #define YaccCmd bison -y
108 #define LexCmd flex -l
110 #define PreProcessCmd CcCmd -E
111 #define PostIncDir DefaultGccIncludeDir
112 #define LdCombineFlags -r
113 #define XawI18nDefines -DUSE_XWCHAR_STRING -DUSE_XMBTOWC
114 #define HasWChar32 YES
115 #define StandardCppDefines -traditional StandardDefines
116 #define ExtensionOSDefines -DXTESTEXT1
118 #define LinuxLocaleDefines /**/
120 #if LinuxCLibMajorVersion < 6
121 # define LinuxSourceDefines -D_POSIX_SOURCE \
122 -D_BSD_SOURCE -D_SVID_SOURCE LinuxLocaleDefines
124 # define HasLibCrypt NO
128 # define LinuxSourceDefines -D_POSIX_C_SOURCE=199309L \
130 -D_BSD_SOURCE -D_SVID_SOURCE -D_XOPEN_SOURCE \
131 -D__NO_STRING_INLINES -D__NO_MATH_INLINES \
133 # define HasPosixThreads YES
134 # define ThreadedX YES
135 # define HasThreadSafeAPI YES
136 # define ThreadsLibraries -lpthread
137 # define SystemMTDefines -D_REENTRANT
139 # define HasLibCrypt YES
143 #ifdef SparcArchitecture
144 #define LinuxMachineDefines -Dsparc
147 #define HasPlugin YES
148 #define VendorHasX11R6_3libXext YES /* XC or XFree86 3.3.1 */
150 #endif /* SparcArchitecture */
152 #ifdef ARMArchitecture
153 #define LinuxMachineDefines -D__arm__
154 #define LSBBitOrder YES
157 #define HasPlugin YES
158 #define VendorHasX11R6_3libXext YES /* XC or XFree86 3.3.1 */
160 #endif /* ARMArchitecture */
162 #ifdef i386Architecture
163 #define OptimizedCDebugFlags DefaultGcc2i386Opt
164 #define LinuxMachineDefines -D__i386__
165 /* For DtHelp TIFF processing routines. */
166 #define LSBBitOrder YES
169 #define HasPlugin YES
170 #define VendorHasX11R6_3libXext YES /* XC or XFree86 3.3.1 */
172 /* add this to void screenfuls of warnings from makedepend */
173 #define DependFlags -I/usr/include/i386-linux-gnu
174 #endif /* i386Architecture */
176 #ifdef AMD64Architecture
177 #define OptimizedCDebugFlags DefaultGcc2i386Opt
178 #define LinuxMachineDefines -D__x86_64__
179 /* For DtHelp TIFF processing routines. */
180 #define LSBBitOrder YES
183 #define HasPlugin YES
184 #define VendorHasX11R6_3libXext YES /* XC or XFree86 3.3.1 */
186 /* add this to void screenfuls of warnings from makedepend */
187 #define DependFlags -I/usr/include/x86_64-linux-gnu
188 #endif /* AMD64Architecture */
190 #ifdef PpcArchitecture
191 #define OptimizedCDebugFlags -O2
192 #define LinuxMachineDefines -D__powerpc__
193 #endif /* PpcArchitecture */
195 #ifdef AlphaArchitecture
196 #define OptimizedCDebugFlags -O2
197 #define LinuxMachineDefines -D__alpha__
198 #endif /* AlphaArchitecture */
200 #ifdef Mc68020Architecture
201 #define OptimizedCDebugFlags -O2
202 #define LinuxMachineDefines -D__mc68000__
203 #define StandardCppDefines -traditional
204 #endif /* Mc68020Architecture */
206 #define StandardDefines -Dlinux LinuxMachineDefines LinuxSourceDefines
208 #define ConnectionFlags -DUNIXCONN -DTCPCONN
210 XCOMM This is needed for CDE currently
211 #define CplusplusStandardDefines StandardDefines
213 /* Some of these man page defaults are overriden in the above OS sections */
215 # define ManSuffix 1x
218 # define ManDir $(MANSOURCEPATH)1
221 # define LibManSuffix 3x
224 # define LibmanDir $(MANSOURCEPATH)3
226 #ifndef FileManSuffix
227 # define FileManSuffix 5x
230 # define FileManDir $(MANSOURCEPATH)5
233 #define ArchitectureDefines -DLINUX_ARCHITECTURE
235 #define TtClientLibs $(TTLIB) $(XTOOLLIB) $(XLIB)
236 #define TtClientDepLibs $(DEPTTLIB) $(DEPXTOOLLIB) $(DEPXLIB)
238 #include <lnxLib.rules>
239 #include <xfree86.cf>