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 #endif /* i386Architecture */
174 #ifdef AMD64Architecture
175 #define OptimizedCDebugFlags DefaultGcc2i386Opt
176 #define LinuxMachineDefines -D__x86_64__
177 /* For DtHelp TIFF processing routines. */
178 #define LSBBitOrder YES
181 #define HasPlugin YES
182 #define VendorHasX11R6_3libXext YES /* XC or XFree86 3.3.1 */
184 #endif /* AMD64Architecture */
186 #ifdef PpcArchitecture
187 #define OptimizedCDebugFlags -O2
188 #define LinuxMachineDefines -D__powerpc__
189 #endif /* PpcArchitecture */
191 #ifdef AlphaArchitecture
192 #define OptimizedCDebugFlags -O2
193 #define LinuxMachineDefines -D__alpha__
194 #endif /* AlphaArchitecture */
196 #ifdef Mc68020Architecture
197 #define OptimizedCDebugFlags -O2
198 #define LinuxMachineDefines -D__mc68000__
199 #define StandardCppDefines -traditional
200 #endif /* Mc68020Architecture */
202 #define StandardDefines -Dlinux LinuxMachineDefines LinuxSourceDefines
204 #define ConnectionFlags -DUNIXCONN -DTCPCONN
206 XCOMM This is needed for CDE currently
207 #define CplusplusStandardDefines StandardDefines
209 /* Some of these man page defaults are overriden in the above OS sections */
211 # define ManSuffix 1x
214 # define ManDir $(MANSOURCEPATH)1
217 # define LibManSuffix 3x
220 # define LibmanDir $(MANSOURCEPATH)3
222 #ifndef FileManSuffix
223 # define FileManSuffix 5x
226 # define FileManDir $(MANSOURCEPATH)5
229 #define ArchitectureDefines -DLINUX_ARCHITECTURE
231 #define TtClientLibs $(TTLIB) $(XTOOLLIB) $(XLIB)
232 #define TtClientDepLibs $(DEPTTLIB) $(DEPXTOOLLIB) $(DEPXLIB)
234 #include <lnxLib.rules>
235 #include <xfree86.cf>