XCOMM /* @(#)sun.cf	1.3 11 Sep 1992 SunSoft */
XCOMM platform:  $XConsortium: sun.cf,v 1.77 92/05/29 18:37:21 rws Exp $

#define ServerDDKMajorVersion 1
#define ServerDDKMinorVersion 1
#define ConfigDir             /usr/openwin/lib/config

#define TroffCmd    troff -Tpost -t

#ifndef SVR4
#define OSName            SunOS 4.1.2
XCOMM operating system:  OSName
#define OSMajorVersion    4
#define OSMinorVersion    1
#define OSTeenyVersion    2

#if OSMajorVersion < 4 || (OSMajorVersion == 4 && OSMinorVersion < 1)
/* We do not guarantee this will work */
#define BootstrapCFlags   -DNOSTDHDRS
#define StandardDefines   -DNOSTDHDRS
#endif

/* You ALSO need this if you have Sun ld patch 100170-06 or later to 4.1.1 */
#if OSMajorVersion == 4 && (OSMinorVersion > 1 || (OSMinorVersion == 1 && OSTeenyVersion > 1))
#define SunPost411FCSLd	  YES
#endif

#define HasSaberC	  YES		/* for machines that have it */
#define HasNdbm		  YES
#define HasShm		  YES
#define HasSecureRPC	  YES
#define SetTtyGroup	  YES
#define HasPutenv	  YES
#define XsunServer	  YES		/* has color and mono support */
#define BuildPexExt	  XsunServer
#define BuildXInputExt    YES
#define InstKmemFlags     -g kmem -m 2755
#define ExtraFilesToClean *.O		/* clobber Big O files on clean */

/* Keep Imakefiles up to date */
.INIT: Makefile
REVCTLARCHFILE = SCCS/s.Imakefile
REVCTLCMD = sccs get

#include <sunLib.rules>

#if HasGcc
#if HasGcc2
#define OptimizedCDebugFlags -O2
#else
#define SharedLibraryCcCmd cc
#define ExtraLoadFlags -B/usr/bin/
#define AllocateLocalDefines /**/
#endif


.c.o:
	$(CC) -c $(CFLAGS) $*.c

#else

#define AllocateLocalDefines -DINCLUDE_ALLOCA_H

#ifdef Sun3Architecture
#define DefaultCCOptions -f68881 -pipe
#else
#define DefaultCCOptions -pipe
#endif

#define PexCCOptions DefaultCCOptions

#endif

#define SharedAllocateLocalDefines -DINCLUDE_ALLOCA_H
#define LibraryCCOptions /* don't want special floating point */

#ifndef UseSunWindowsInServer
#define UseSunWindowsInServer	NO	/* link in SunWindows support? */
#endif

#if UseSunWindowsInServer
#define SunWindowsDefines -DSUN_WINDOWS
#else
#define SunWindowsDefines /* as nothing */
#endif

#define ServerOSDefines SunWindowsDefines AllocateLocalDefines

/**************************************************************

	From here on down is the defs for SVR4.

**************************************************************/

#else

#define OSName            SunOS 5.0
XCOMM operating system:  OSName
#define OSMajorVersion    5
#define OSMinorVersion    0


#define HasSaberC	  NO		/* for machines that have it */
#define HasNdbm		  NO
#define HasShm		  YES
#define HasSecureRPC	  YES
#define SetTtyGroup	  YES
#define HasPutenv	  YES
#define HasSockets	  YES
#define XsunServer	  YES		/* has color and mono support */
#define BuildPexExt	  XsunServer
#define BuildXInputExt    YES
#define BuildDPSExt       YES
#define BuildDPSLib       YES
#define SystemV4          YES      /* SVR4 */
#define InstallCmd	  /usr/ucb/install 	/* Use install instead of bsdinst */
#define ExtraFilesToClean *.O		/* clobber Big O files on clean */

/* Keep Imakefiles up to date */
.INIT: Makefile
REVCTLARCHFILE = SCCS/s.Imakefile
REVCTLCMD = sccs get


#include <sv4Lib.rules>

#if HasGcc
#if HasGcc2
#define OptimizedCDebugFlags -O2
#else
#define SharedLibraryCcCmd cc
#define ExtraLoadFlags -B/usr/bin/
#define AllocateLocalDefines /**/
#endif

.c.o:
	$(CC) -c $(CFLAGS) $*.c

#else

#define AllocateLocalDefines -DNO_ALLOCA
#define CppCmd /usr/ccs/lib/cpp

#ifdef SparcArchitecture
#define ServerDDXSOCDebugFlags -xO3
#define DefaultCCOptions -DSYSV -DSVR4 -xF -Wa,-cg92
#else
#define ServerDDXSOCDebugFlags -O
#define DefaultCCOptions -DSYSV -DSVR4 
#endif

#define SharedLibraryCCOptions -DSYSV -DSVR4
#define MapfileName mapfile
#define ExtraLoadOptions -R$(LD_RUN_PATH):/usr/openwin/lib

#define PexCCOptions DefaultCCOptions

#endif /* HasGcc */

#define SharedAllocateLocalDefines -DINCLUDE_ALLOCA_H
#define LibraryCCOptions /* don't want special floating point */

#ifdef UseSunWindowsInServer
#undef UseSunWindowsInServer
#endif
#define UseSunWindowsInServer	NO	/* link in SunWindows support? */

#define ServerOSDefines AllocateLocalDefines

#endif /* SVR4 */
