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 Using the tirpc lib should allow running rpcbind in secure
122 XCOMM mode (ie: without the -i option). Make sure you install the
123 XCOMM libtirpc-dev package or equivalent.
125 #define HasTIRPCLib YES
133 #if !defined(DefaultGcc2i386Opt)
134 # define DefaultGcc2i386Opt -O2 -fno-strict-aliasing
137 #if LinuxCLibMajorVersion < 6
138 # define LinuxSourceDefines -D_POSIX_SOURCE \
139 -D_BSD_SOURCE -D_SVID_SOURCE LinuxLocaleDefines
141 # define HasLibCrypt NO
145 # define LinuxSourceDefines -D_POSIX_C_SOURCE=199309L \
147 -D_BSD_SOURCE -D_SVID_SOURCE -D_XOPEN_SOURCE \
148 -D__NO_STRING_INLINES -D__NO_MATH_INLINES \
150 # define HasPosixThreads YES
151 # define ThreadedX YES
152 # define HasThreadSafeAPI YES
153 # define ThreadsLibraries -lpthread
154 # define SystemMTDefines -D_REENTRANT
156 # define HasLibCrypt YES
160 #ifdef SparcArchitecture
161 # define LinuxMachineDefines -Dsparc
164 # define HasPlugin YES
165 # define VendorHasX11R6_3libXext YES /* XC or XFree86 3.3.1 */
167 #endif /* SparcArchitecture */
169 #ifdef ARMArchitecture
170 # define LinuxMachineDefines -D__arm__
171 # define LSBBitOrder YES
174 # define HasPlugin YES
175 # define VendorHasX11R6_3libXext YES /* XC or XFree86 3.3.1 */
177 #endif /* ARMArchitecture */
179 #ifdef i386Architecture
180 # define OptimizedCDebugFlags DefaultGcc2i386Opt
181 # define LinuxMachineDefines -D__i386__
182 /* For DtHelp TIFF processing routines. */
183 # define LSBBitOrder YES
186 # define HasPlugin YES
187 # define VendorHasX11R6_3libXext YES /* XC or XFree86 3.3.1 */
189 /* add this to void screenfuls of warnings from makedepend */
190 # define DependFlags -I/usr/include/i386-linux-gnu
191 #endif /* i386Architecture */
193 #ifdef AMD64Architecture
194 # define OptimizedCDebugFlags DefaultGcc2i386Opt
195 # define LinuxMachineDefines -D__x86_64__
196 /* For DtHelp TIFF processing routines. */
197 # define LSBBitOrder YES
200 # define HasPlugin YES
201 # define VendorHasX11R6_3libXext YES /* XC or XFree86 3.3.1 */
203 /* add this to void screenfuls of warnings from makedepend */
204 # define DependFlags -I/usr/include/x86_64-linux-gnu
205 #endif /* AMD64Architecture */
207 #ifdef PpcArchitecture
208 # define OptimizedCDebugFlags DefaultGcc2i386Opt
209 # define LinuxMachineDefines -D__powerpc__
210 #endif /* PpcArchitecture */
212 #ifdef AlphaArchitecture
213 # define OptimizedCDebugFlags DefaultGcc2i386Opt
214 # define LinuxMachineDefines -D__alpha__
215 #endif /* AlphaArchitecture */
217 #ifdef Mc68020Architecture
218 # define OptimizedCDebugFlags DefaultGcc2i386Opt
219 # define LinuxMachineDefines -D__mc68000__
220 # define StandardCppDefines -traditional
221 #endif /* Mc68020Architecture */
224 CXXDEPENDINCLUDE = $(shell CppCmd -x c++ -Wp,-v < /dev/null \
225 2>&1 | sed -n 's/ \(.*[cg]++.*\)/-I\1/p')
226 #define CplusplusDependIncludes $(CXXDEPENDINCLUDE)
228 #define DependDefines -D_SYS_RESOURCE_H -D_SYS_UTSNAME_H
230 #define StandardDefines -Dlinux LinuxMachineDefines LinuxSourceDefines
232 #define ConnectionFlags -DUNIXCONN -DTCPCONN
234 XCOMM This is needed for CDE currently
235 #define CplusplusStandardDefines StandardDefines
237 /* Some of these man page defaults are overriden in the above OS sections */
239 # define ManSuffix 1x
242 # define ManDir $(MANSOURCEPATH)1
245 # define LibManSuffix 3x
248 # define LibmanDir $(MANSOURCEPATH)3
250 #ifndef FileManSuffix
251 # define FileManSuffix 5x
254 # define FileManDir $(MANSOURCEPATH)5
257 #define ArchitectureDefines -DLINUX_ARCHITECTURE
259 #define TtClientLibs $(TTLIB) $(TIRPCLIB) $(XTOOLLIB) $(XLIB)
260 #define TtClientDepLibs $(DEPTTLIB) $(DEPXTOOLLIB) $(DEPXLIB)
262 #include <lnxLib.rules>
263 #include <xfree86.cf>