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
80 #define HasMakefileSafeInclude YES
81 #define DependFileName .depend
82 #define DependCmd $(CC) -E -MM -MG
84 #ifdef IncludeMakefile
85 # undef IncludeMakefile
88 #define IncludeMakefile(file) -include file
90 #if (LinuxDistribution == LinuxRedHat)
94 #define AvoidNullMakeCommand YES
95 #define StripInstalledPrograms YES
96 #define CompressAllFonts YES
97 #define Malloc0ReturnsNull YES
98 #define NeedConstPrototypes YES
99 #define NeedFunctionPrototypes YES
100 #define NeedNestedPrototypes YES
101 #define NeedVarargsPrototypes YES
102 #define NeedWidePrototypes NO
103 #define SetTtyGroup YES
105 #define CcCmd gcc -g -pipe
106 #define CplusplusCmd g++ -g -pipe -fpermissive
110 #define CplusplusLibC -lstdc++
111 #define AsmDefines -D__ELF__
113 #define MkdirHierCmd mkdir -p
114 #define CppCmd /lib/cpp
115 #if OSMajorVersion >= 2
116 # define YaccCmd yacc
118 # define YaccCmd bison -y
120 #define LexCmd flex -l
122 #define PreProcessCmd CcCmd -E
123 #define PostIncDir DefaultGccIncludeDir
124 #define LdCombineFlags -r
125 #define XawI18nDefines -DUSE_XWCHAR_STRING -DUSE_XMBTOWC
126 #define HasWChar32 YES
127 #define StandardCppDefines -traditional StandardDefines
128 #define ExtensionOSDefines -DXTESTEXT1
130 #define LinuxLocaleDefines /**/
132 XCOMM If you have the tirpc library on your system, and you have the
133 XCOMM libtirpc-dev installed, then define HasTIRPCLib to YES in either
134 XCOMM your host.def or site.def file. Using the tirpc lib should
135 XCOMM allow running rpcbind in secure mode (ie: without the -i option).
136 XCOMM The default is NO.
139 # define HasTIRPCLib NO
148 #if !defined(DefaultGcc2i386Opt)
149 # define DefaultGcc2i386Opt -O2 -fno-strict-aliasing
152 #if LinuxCLibMajorVersion < 6
153 # define LinuxSourceDefines -D_POSIX_SOURCE \
154 -D_BSD_SOURCE -D_SVID_SOURCE LinuxLocaleDefines
156 # define HasLibCrypt NO
160 # define LinuxSourceDefines -D_POSIX_C_SOURCE=199309L \
162 -D_BSD_SOURCE -D_SVID_SOURCE -D_XOPEN_SOURCE \
163 -D__NO_STRING_INLINES -D__NO_MATH_INLINES \
165 # define HasPosixThreads YES
166 # define ThreadedX YES
167 # define HasThreadSafeAPI YES
168 # define ThreadsLibraries -lpthread
169 # define SystemMTDefines -D_REENTRANT
171 # define HasLibCrypt YES
175 #ifdef SparcArchitecture
176 # define LinuxMachineDefines -Dsparc
179 # define HasPlugin YES
180 # define VendorHasX11R6_3libXext YES /* XC or XFree86 3.3.1 */
182 #endif /* SparcArchitecture */
184 #ifdef ARMArchitecture
185 # define LinuxMachineDefines -D__arm__
186 # define LSBBitOrder YES
189 # define HasPlugin YES
190 # define VendorHasX11R6_3libXext YES /* XC or XFree86 3.3.1 */
192 #endif /* ARMArchitecture */
194 #ifdef i386Architecture
195 # define OptimizedCDebugFlags DefaultGcc2i386Opt
196 # define LinuxMachineDefines -D__i386__
197 /* For DtHelp TIFF processing routines. */
198 # define LSBBitOrder YES
201 # define HasPlugin YES
202 # define VendorHasX11R6_3libXext YES /* XC or XFree86 3.3.1 */
204 #endif /* i386Architecture */
206 #ifdef AMD64Architecture
207 # define OptimizedCDebugFlags DefaultGcc2i386Opt
208 # define LinuxMachineDefines -D__x86_64__
209 /* For DtHelp TIFF processing routines. */
210 # define LSBBitOrder YES
213 # define HasPlugin YES
214 # define VendorHasX11R6_3libXext YES /* XC or XFree86 3.3.1 */
216 #endif /* AMD64Architecture */
218 #ifdef PpcArchitecture
219 # define OptimizedCDebugFlags DefaultGcc2i386Opt
220 # define LinuxMachineDefines -D__powerpc__
221 #endif /* PpcArchitecture */
223 #ifdef AlphaArchitecture
224 # define OptimizedCDebugFlags DefaultGcc2i386Opt
225 # define LinuxMachineDefines -D__alpha__
226 #endif /* AlphaArchitecture */
228 #ifdef Mc68020Architecture
229 # define OptimizedCDebugFlags DefaultGcc2i386Opt
230 # define LinuxMachineDefines -D__mc68000__
231 # define StandardCppDefines -traditional
232 #endif /* Mc68020Architecture */
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 XCOMM different dependancy handling
264 #ifndef DependDependency
265 #define DependDependency() /**/
272 #define DependTarget() @@@@\
273 DependDependency() @@@@\
275 depend:: DependFileName @@@@\
277 DependFileName:: @@@@\
278 -RunProgram(DEPEND,$(DEPENDFLAGS) $(ALLDEFINES) $(DEPEND_DEFINES) $(SRCS)) > $@
281 # undef DependTarget3
284 #define DependTarget3(srcs1,srcs2,srcs3) @@@@\
285 DependDependency() @@@@\
287 depend:: DependFileName @@@@\
289 DependFileName:: @@@@\
290 -RunProgram(DEPEND,$(DEPENDFLAGS) $(ALLDEFINES) $(DEPEND_DEFINES) srcs1) > $@ @@@@\
291 -RunProgram(DEPEND,$(DEPENDFLAGS) $(ALLDEFINES) $(DEPEND_DEFINES) srcs2) >> $@ @@@@\
292 -RunProgram(DEPEND,$(DEPENDFLAGS) $(ALLDEFINES) $(DEPEND_DEFINES) srcs3) >> $@
296 #define TtClientLibs $(TTLIB) $(TIRPCLIB) $(XTOOLLIB) $(XLIB)
297 #define TtClientDepLibs $(DEPTTLIB) $(DEPXTOOLLIB) $(DEPXLIB)
299 #include <lnxLib.rules>
300 #include <xfree86.cf>