diff options
Diffstat (limited to 'nx-X11/config/cf')
28 files changed, 14192 insertions, 0 deletions
diff --git a/nx-X11/config/cf/Imake.cf b/nx-X11/config/cf/Imake.cf new file mode 100644 index 000000000..32f3e321b --- /dev/null +++ b/nx-X11/config/cf/Imake.cf @@ -0,0 +1,1037 @@ +/* + * To add support for another platform: + * + * 1. Identify a machine-specific cpp symbol. If your preprocessor + * does not have any built in, you will need to add the symbol to the + * cpp_argv table in config/imake/imakemdep.h and rebuild imake with + * the BOOTSTRAPCFLAGS variable set (see the macII for an example). + * + * 2. Add all machine-specific cpp symbols (either defined by you or by + * the preprocessor or compiler) to the predefs table in + * config/imake/imakemdep.h. + * + * 3. But a new #ifdef block below that defines MacroIncludeFile and + * MacroFile for your new platform and then #undefs the machine- + * specific preprocessor symbols (to avoid problems with file names). + * + * 4. Create a .cf file with the name given by MacroFile. + */ + +#if defined(__APPLE__) +# undef __APPLE__ +# define MacroIncludeFile <darwin.cf> +# define MacroFile darwin.cf +# define DarwinArchitecture +# ifdef __ppc__ +# define PpcDarwinArchitecture +# undef __ppc__ +# endif +# ifdef __i386__ +# define i386DarwinArchitecture +# undef __i386__ +# endif +#endif + +#if defined(clipper) || defined(__clipper__) +# undef clipper +# define MacroIncludeFile <ingr.cf> +# define MacroFile ingr.cf +# define IngrArchitecture +#endif /* clipper */ + +#ifdef __CYGWIN__ +#define MacroIncludeFile <cygwin.cf> +#define MacroFile cygwin.cf +#define cygwinArchitecture +#define i386Architecture +#undef i386 +#undef i486 +#undef i586 +#undef i686 +#undef __i386__ +#undef _X86_ +#undef __CYGWIN__ +#endif /* CYGWIN */ + +#ifdef ultrix +# define MacroIncludeFile <ultrix.cf> +# define MacroFile ultrix.cf +# ifdef vax +# undef vax +# define VaxArchitecture +# endif +# ifdef mips +# undef mips +# define MipsArchitecture +# define MipselArchitecture +# endif +# undef ultrix +# define UltrixArchitecture +#endif /* ultrix */ + +#if defined(vax) && !defined(UltrixArchitecture) && !defined(__OpenBSD__) +# define MacroIncludeFile <bsd.cf> +# define MacroFile bsd.cf +# undef vax +# define BSDArchitecture +# define VaxArchitecture +#endif /* vax */ + +#ifdef __bsdi__ +# define MacroIncludeFile <bsdi.cf> +# define MacroFile bsdi.cf +# undef __bsdi__ +# ifdef bsdi +# undef bsdi +# endif +# define BSDOSArchitecture +# if defined(__i386__) || defined(i386) +# define i386BsdArchitecture +# define i386Architecture +# undef i386 +# undef __i386__ +# endif +# if defined(__ppc__) || defined(ppc) +# define PpcBsdArchitecture +# define PpcArchitecture +# undef ppc +# undef __ppc__ +# endif +# if defined(__sparc__) || defined(__sparc_v9__) || defined(sparc) +# define SparcBsdArchitecture +# define SparcArchitecture +# undef sparc +# undef __sparc__ +# undef __sparc_v9__ +# endif +#endif /* bsdi */ + +#ifdef __OpenBSD__ +# undef __OpenBSD__ +# undef __NetBSD__ +# define OpenBSDArchitecture +# define KOpenBSDArchitecture +# define MacroIncludeFile <OpenBSD.cf> +# define MacroFile OpenBSD.cf +# ifdef __i386__ +# define i386BsdArchitecture +# define i386Architecture +# undef i386 +# endif +# if defined(__sparc__) || defined(sparc) +# if !defined(__arch64__) +# define SparcArchitecture +# else +# define Sparc64Architecture +# endif +# undef sparc +# endif +# if defined(__mips__) || defined(mips) +# define MipsArchitecture +# ifdef arc +# define ArcArchitecture +# undef arc +# endif +# ifdef pmax +# define PmaxArchitecture +# undef pmax +# endif +# undef mips +# endif +# if defined(__alpha__) || defined(alpha) +# define AlphaArchitecture +# undef __alpha__ +# undef alpha +# endif +# if defined(__amd64__) || defined(__x86_64__) +# define AMD64Architecture +# undef __amd64__ +# undef __x86_64__ +# undef amd64 +# endif +# if defined(__mc68020__) || defined(mc68020) +# define Mc68020Architecture +# if defined(amiga) +# define AmigaArchitecture +# undef amiga +# endif +# if defined(hp300) +# define Hp300Architecture +# undef hp300 +# endif +# if defined(mac68k) +# define Mac68kArchitecture +# undef mac68k +# endif +# if defined(mvme68k) +# define Mvme68kArchitecture +# undef mvme68k +# endif +# if defined(sun3) +# define Sun3Architecture +# undef sun3 +# endif +# undef mc68000 +# endif +# ifdef __powerpc__ +# define PpcArchitecture +# undef __powerpc__ +# undef __macppc__ +# undef macppc +# endif +# ifdef __vax__ +# undef vax +# undef __vax__ +# define VaxArchitecture +# endif +#endif /* OpenBSD */ + +/* Systems based on kernel of OpenBSD */ +#if defined(__OpenBSD_kernel__) +#define KOpenBSDArchitecture +#endif + +#ifdef __NetBSD__ +# define MacroIncludeFile <NetBSD.cf> +# define MacroFile NetBSD.cf +# undef __NetBSD__ +# define NetBSDArchitecture +# define KNetBSDArchitecture +# ifdef __i386__ +# define i386BsdArchitecture +# define i386Architecture +# undef i386 +# endif +# if defined(__sparc64__) || defined(__sparc_v9__) || defined(__arch64__) +# define Sparc64Architecture +# endif +# if defined(__sparc__) || defined(sparc) +# define SparcArchitecture +# undef sparc +# if defined(__sparc_v9__) || defined(__arch64__) +# define Sparc64Architecture +# endif +# endif +# ifdef mips +# define MipsArchitecture +# define ArcArchitecture +# undef mips +# endif +# ifdef __alpha__ +# define AlphaArchitecture +# define AlphaBsdArchitecture +# undef __alpha__ +# endif +# ifdef mc68000 +# define Mc68020Architecture +# endif +# ifdef __arm32__ +# define Arm32Architecture +# undef __arm32__ +# endif +# ifdef __vax__ +# define VaxArchitecture +# undef __vax__ +# endif +# ifdef __powerpc__ +# define PpcArchitecture +# undef __powerpc__ +# endif +#endif /* NetBSD */ + +/* Systems based on kernel of NetBSD */ +#if defined(__NetBSD_kernel__) +#define KNetBSDArchitecture +#endif + +#ifdef __DragonFly__ +# define MacroIncludeFile <DragonFly.cf> +# define MacroFile DragonFly.cf +# undef __DragonFly__ +# undef __FreeBSD__ +# define DragonFlyArchitecture +# define FreeBSDArchitecture +# ifdef __i386__ +# define i386BsdArchitecture +# define i386Architecture +# undef i386 +# endif +# ifdef __sparc64__ +# define Sparc64Architecture +# undef __sparc64__ +# endif +# ifdef __ia64__ +# define ia64Architecture +# undef __ia64__ +# endif +# ifdef __amd64__ +# define x86_64Architecture +# undef __amd64__ +# undef __x86_64__ +# endif +#endif /* __DragonFly__ */ + +#ifdef __FreeBSD__ +# define MacroIncludeFile <FreeBSD.cf> +# define MacroFile FreeBSD.cf +# undef __FreeBSD__ +# define FreeBSDArchitecture +# define KFreeBSDArchitecture +# ifdef __i386__ +# define i386BsdArchitecture +# define i386Architecture +# undef i386 +# endif +# ifdef __alpha__ +# define AlphaBsdArchitecture +# define AlphaArchitecture +# undef __alpha__ +# endif +# ifdef __sparc64__ +# define Sparc64Architecture +# undef __sparc64__ +# endif +# ifdef __ia64__ +# define ia64Architecture +# undef __ia64__ +# endif +# ifdef __amd64__ +# define AMD64Architecture +# undef __amd64__ +# undef __x86_64__ +# endif +# ifdef __powerpc__ +# define PpcArchitecture +# undef __powerpc__ +# endif +#endif /* __FreeBSD__ */ + +/* Systems based on kernel of FreeBSD */ +#if defined(__FreeBSD_kernel__) +#define KFreeBSDArchitecture +#endif + +#ifdef AMOEBA + /* Should be before the 'sun' entry because we may be cross-compiling */ +# define MacroIncludeFile <Amoeba.cf> +# define MacroFile Amoeba.cf +# if defined(i80386) || defined(__i80386__) +# undef i80386 +# define i386Architecture +# else +# if defined(mc68000) || defined(__mc68000__) +# undef mc68000 +# define Sun3Architecture +# define SunArchitecture +# else +# if defined(sparc) || defined(__sparc__) +# undef sparc +# define SparcArchitecture +# define SunArchitecture +# endif +# endif +# undef sun +# endif +#endif /* AMOEBA */ + +#ifdef sun +# define MacroIncludeFile <sun.cf> +# define MacroFile sun.cf +# ifdef SVR4 +# undef SVR4 +# define SVR4Architecture +# endif +# ifdef sparc +# undef sparc +# define SparcArchitecture +# endif +# ifdef __sparcv9 +# undef __sparcv9 +# define Sparc64Architecture +# endif +# ifdef mc68000 +# undef mc68000 +# define Sun3Architecture +# endif +# if defined(__amd64) || defined(__x86_64) +# undef __amd64 +# undef __x86_64 +# undef amd64 +# undef i386 +# define AMD64Architecture +# endif +# ifdef i386 +# undef i386 +# define i386Architecture +# endif +# undef sun +# define SunArchitecture +#endif /* sun */ + +#ifdef __SCO__ +# define MacroIncludeFile <sco5.cf> +# define MacroFile sco5.cf +# undef __SCO__ +# undef sco +# undef USL +# undef SYSV +# undef i386 +# undef SCO +# undef SVR4 +# define i386Architecture +# define SCOArchitecture +# define i386SVR3Architecture +# define SVR3Architecture +# define i386ScoArchitecture +# define i386Sco325Architecture +# undef i386 +# undef i486 +# undef i586 +# undef i686 +# undef k6 +# undef __i386__ +# undef __i486__ +# undef __i586__ +# undef __i686__ +# undef __k6__ +# undef __i386 +# undef __i486 +# undef __i586 +# undef __i686 +# undef __k6 +# undef pentium +# undef __pentium +# undef pentiumpro +# undef __pentiumpro +#endif /* __SCO__ - SCO Open Server 5 */ + +#ifdef __UNIXWARE__ +# define MacroIncludeFile <usl.cf> +# define MacroFile usl.cf +# undef __UNIXWARE__ +# undef USL +# undef SVR4 +# undef i386 +# undef SVR5 +# undef SYSV5 +# define SVR4Architecture +# define i386Architecture +# define USLArchitecture +# define UnixWareArchitecture +# undef i386 +# undef i486 +# undef i586 +# undef i686 +# undef k6 +# undef __i386__ +# undef __i486__ +# undef __i586__ +# undef __i686__ +# undef __k6__ +# undef __i386 +# undef __i486 +# undef __i586 +# undef __i686 +# undef __k6 +# undef pentium +# undef __pentium +# undef pentiumpro +# undef __pentiumpro +#endif /* __UNIXWARE__ */ + +#ifdef NCR +# define MacroIncludeFile <ncr.cf> +# define MacroFile ncr.cf +# undef NCR +# undef SVR4 +# undef i386 +# define SVR4Architecture +# define i386Architecture +# define NCRArchitecture +#endif /* NCR */ + +#ifdef apollo +# define MacroIncludeFile <apollo.cf> +# define MacroFile apollo.cf +# undef apollo +# define ApolloArchitecture +#endif /* apollo */ + +#ifdef sony +# define MacroIncludeFile <sony.cf> +# define MacroFile sony.cf +# undef sony +# undef sony_news +# define SonyArchitecture +# ifdef mc68020 +# undef mc68020 +# undef mc68030 +# define Mc68020Architecture +# endif +# ifdef mips +# undef mips +# define MipsArchitecture +# endif +# ifdef __svr4 +# define SVR4Architecture +# else +# if !defined(bsd43) || defined(SYSTYPE_SYSV) || defined(_SYSTYPE_SYSV) +# define SonySysvArchitecture +# else +# define SonyBsdArchitecture +# endif +# endif +#endif /* sony */ + +#ifdef M4310 +# define MacroIncludeFile <pegasus.cf> +# define MacroFile pegasus.cf +# undef M4310 +# define PegasusArchitecture +#endif /* M4310 */ + +#ifdef M4330 +# define MacroIncludeFile <m4330.cf> +# define MacroFile m4330.cf +# undef M4330 +# define M4330Architecture +#endif /* M4330 */ + +#ifdef macII +# define MacroIncludeFile <macII.cf> +# define MacroFile macII.cf +# undef macII +# define MacIIArchitecture +#endif /* macII */ + +#ifdef stellar +# define MacroIncludeFile <stellar.cf> +# define MacroFile stellar.cf +# undef stellar +# define StellarArchitecture +#endif /* stellar */ + +#if defined(ibm) || defined(_IBMR2) || defined(ibm032) +# define MacroIncludeFile <ibm.cf> +# define MacroFile ibm.cf +# ifdef ibm +# undef ibm +# endif +# define IBMArchitecture +# ifdef i386 +# undef i386 +# define PS2Architecture +# endif +# ifdef ibm032 +# undef ibm032 +# define RtArchitecture +# endif +# ifdef _IBMR2 +# undef _IBMR2 +# if (DefaultOSMajorVersion < 5) +# define RsArchitecture +# else +# define PpcArchitecture +# endif +# endif +#endif /* ibm */ + +#ifdef luna +# undef luna +# define MacroIncludeFile <luna.cf> +# define MacroFile luna.cf +# define LunaArchitecture +# ifdef mc68000 +# undef mc68000 +# define Mc68000Architecture +# else +# undef mc88000 +# define Mc88000Architecture +# endif +#endif /* luna */ + +#ifdef Mips +# define MacroIncludeFile <Mips.cf> +# define MacroFile Mips.cf +# undef Mips +# undef mips +# if defined(SYSTYPE_BSD43) || defined(BSD) || defined(BSD43) +# define MipsBsdArchitecture +# else /* BSD */ +# define MipsSysvArchitecture +# endif /* BSD */ +#endif /* Mips */ + +#ifdef MOTOROLA +# define MacroIncludeFile <moto.cf> +# define MacroFile moto.cf +# undef MOTOROLA +# ifdef SYSV +# define MotoR3Architecture +# endif +# ifdef SVR4 +# define MotoR4Architecture +# endif +#endif /* MOTOROLA */ + +#if defined(SVR4) +# ifdef i386 +# define i386Architecture +# undef i386 +# endif +# ifdef PC98 +# define PANIX98Architecture +# undef PC98 +# endif +# define SVR4Architecture +# define MacroIncludeFile <svr4.cf> +# define MacroFile svr4.cf +# undef SVR4 +#endif /* SVR4 */ + +#ifdef SYSV +# ifdef i386 +# undef i386 +# ifdef ISC +# define i386Architecture +# define i386SVR3Architecture +# define MacroIncludeFile <isc.cf> +# define MacroFile isc.cf +# define i386IscArchitecture +# undef ISC +# ifdef ISC202 +# define IscVersion 202 +# undef ISC202 +# else +# ifdef ISC30 +# define IscVersion 300 +# undef ISC30 +# else +# ifdef ISC40 +# define IscVersion 400 +# undef ISC40 +# else +# define IscVersion 221 +# endif /* ISC40 */ +# endif /* ISC30 */ +# endif /* ISC202 */ +# endif /* ISC */ +# ifndef MacroFile +# define i386SVR3Architecture +# define MacroIncludeFile <x386.cf> +# define MacroFile x386.cf +# endif /* MacroFile */ +# endif /* i386 */ +#endif /* SYSV */ + +/* SYSV386 is here for backward compatibility only */ +#ifdef SYSV386 +# undef i386 +# ifdef SVR4 +# define i386Architecture +# define SVR4Architecture +# define i386SVR4Architecture +# define MacroIncludeFile <svr4.cf> +# define MacroFile svr4.cf +# undef SVR4 +# else /* ! SVR4 */ +# ifdef ISC +# define i386Architecture +# define i386SVR3Architecture +# define MacroIncludeFile <isc.cf> +# define MacroFile isc.cf +# define i386IscArchitecture +# undef ISC +# ifdef ISC202 +# define IscVersion 202 +# undef ISC202 +# else +# ifdef ISC30 +# define IscVersion 300 +# undef ISC30 +# else +# ifdef ISC40 +# define IscVersion 400 +# undef ISC40 +# else +# define IscVersion 221 +# endif /* ISC40 */ +# endif /* ISC30 */ +# endif /* ISC202 */ +# endif /* ISC */ +# ifndef MacroFile +# define i386SVR3Architecture +# define MacroIncludeFile <x386.cf> +# define MacroFile x386.cf +# endif /* MacroFile */ +# endif /* ! SVR4 */ +#endif /* SYSV386 */ + +#ifdef __convex__ +# define MacroIncludeFile <convex.cf> +# define MacroFile convex.cf +# ifdef convex +# undef convex +# endif +# define ConvexArchitecture +#endif /* _convex_ */ + +#ifdef Oki +# define MacroIncludeFile <Oki.cf> +# define MacroFile Oki.cf +# undef Oki +# define i860SVR4Architecture +# define SVR4Architecture +# undef SVR4 +#endif /* Oki */ + +#if defined(WIN32) && !defined(__GNUC__) +# define MacroIncludeFile <Win32.cf> +# define MacroFile Win32.cf +# define Win32Architecture +#endif /* WIN32 */ + +#if defined(WIN32) && defined(__GNUC__) +#define MacroIncludeFile <mingw.cf> +#define MacroFile mingw.cf +#define Win32Architecture +#define mingwArchitecture +#define i386Architecture +#undef i386 +#undef i486 +#undef i586 +#undef i686 +#undef __i386__ +#undef _X86_ +#undef __MINGW32__ +#endif /* CYGWIN */ + +#if defined(linux) || defined(__GLIBC__) +# define MacroIncludeFile <linux.cf> +# define MacroFile linux.cf +# undef linux +# ifdef __linux__ +# define LinuxArchitecture +# endif +# ifdef i386 +# ifndef i386Architecture +# define i386Architecture +# endif +# undef i386 +XCOMM Keep cpp from replacing path elements containing i486/i586/i686 +# ifdef i486 +# ifndef i386Architecture +# define i386Architecture +# endif +# undef i486 +# endif +# ifdef i586 +# ifndef i386Architecture +# define i386Architecture +# endif +# undef i586 +# endif +# ifdef i686 +# ifndef i386Architecture +# define i386Architecture +# endif +# undef i686 +# endif +# ifdef k6 +# ifndef i386Architecture +# define i386Architecture +# endif +# undef k6 +# endif +# endif /* k6 */ +# ifdef __i386__ +# ifndef i386Architecture +# define i386Architecture +# endif +# undef __i386__ +# endif /* __i386__ */ +# ifdef __i486__ +# ifndef i386Architecture +# define i386Architecture +# endif +# undef __i486__ +# endif /* __i486__ */ +# ifdef __i586__ +# ifndef i386Architecture +# define i386Architecture +# endif +# undef __i586__ +# endif /* __i586__ */ +# ifdef __i686__ +# ifndef i386Architecture +# define i386Architecture +# endif +# undef __i686__ +# endif /* __i686__ */ +# ifdef __k6__ +# ifndef i386Architecture +# define i386Architecture +# endif +# undef __k6__ +# endif /* __k6__ */ +# ifdef __i386 +# ifndef i386Architecture +# define i386Architecture +# endif +# undef __i386 +# endif /* __i386 */ +# ifdef __i486 +# ifndef i386Architecture +# define i386Architecture +# endif +# undef __i486 +# endif /* __i486 */ +# ifdef __i586 +# ifndef i386Architecture +# define i386Architecture +# endif +# undef __i586 +# endif /* __i586 */ +# ifdef __i686 +# ifndef i386Architecture +# define i386Architecture +# endif +# undef __i686 +# endif /* __i686 */ +# ifdef __k6 +# ifndef i386Architecture +# define i386Architecture +# endif +# undef __k6 +# endif /* __k6 */ +/* Keep this order! s390x has also __s390__ defined */ +# if defined(__s390x__) +# define s390xArchitecture +# undef __s390x__ +# undef __s390__ +# endif +# ifdef __s390__ +# define s390Architecture +# undef __s390__ +# endif /* s390 */ +# ifdef __alpha +# define AlphaArchitecture +# undef __alpha +# endif /* __alpha */ +# ifdef __alpha__ +# ifndef AlphaArchitecture +# define AlphaArchitecture +# endif +# undef __alpha__ +# endif /* __alpha__ */ +# ifdef __arm__ +# define Arm32Architecture +# undef arm +# undef __arm +# undef __arm__ +# if defined(__ARMEB__) +# define Arm32ebArchitecture +# endif +# undef __ARMEB__ +# endif +# ifdef __aarch64__ +# define Arm64Architecture +# endif +# ifdef mc68000 +# define Mc68020Architecture +# undef mc68000 +# endif /* mc68000 */ +# if defined (powerpc) && !defined(__powerpc64__) && !defined (powerpc64) +# define PpcArchitecture +# undef powerpc +# endif +# if defined (__powerpc__) && !defined(__powerpc64__) && !defined (powerpc64) +# ifndef PpcArchitecture +# define PpcArchitecture +# endif +# undef __powerpc__ +# endif +# ifdef __powerpc64__ +# ifndef Ppc64Architecture +# define Ppc64Architecture +# endif +# undef __powerpc64__ +# endif +# ifdef sparc +# define SparcArchitecture +# undef sparc +# endif +# ifdef __sparc__ +# ifndef SparcArchitecture +# define SparcArchitecture +# endif +# undef __sparc__ +# endif +# ifdef ia64 +# define ia64Architecture +# undef ia64 +# endif +# ifdef __ia64__ +# ifndef ia64Architecture +# define ia64Architecture +# endif +# undef __ia64__ +# endif +# if defined(mips) || defined(__mips__) +# define MipsArchitecture +# undef mips +# undef __mips__ +# if defined(MIPSEL) || defined(_MIPSEL) +# define MipselArchitecture +# endif +# undef MIPSEL +# undef _MIPSEL +# endif +# ifdef __sh__ +# ifndef SuperHArchitecture +# define SuperHArchitecture +# endif +# ifdef __BIG_ENDIAN__ +# ifndef SuperHebArchitecture +# define SuperHebArchitecture +# endif +# endif +# undef __sh__ +# endif /* __sh__ */ +# if defined(__SH3__) || defined(__sh3__) +# ifndef SuperH3Architecture +# define SuperH3Architecture +# endif +# undef __SH3__ +# undef __sh3__ +# endif /* __SH3__ or __sh3__ */ +# ifdef __SH4__ +# ifdef __SH4_NOFPU__ +# ifndef SuperH4NOFPUArchitecture +# define SuperH4NOFPUArchitecture +# endif +# undef __SH4_NOFPU__ +# else +# ifndef SuperH4Architecture +# define SuperH4Architecture +# endif +# endif +# undef __SH4__ +# endif /* __SH4__ */ +/* for compatibility with 3.3.x */ +# ifdef PpcArchitecture +# define PowerPCArchitecture +# endif +# if defined(__s390x__) +# define s390xArchitecture +# undef __s390x__ +# endif +# if defined(__amd64__) || defined (__x86_64__) +# undef __amd64__ +# undef __x86_64__ +# define AMD64Architecture +# endif +# if defined(amd64__) || defined (x86_64__) +# undef amd64__ +# undef x86_64__ +# ifndef AMD64Architecture +# define AMD64Architecture +# endif +# endif +#endif /* linux || __GLIBC__ */ + +#ifdef __uxp__ +# define MacroIncludeFile <fujitsu.cf> +# define MacroFile fujitsu.cf +# define FujitsuArchitecture +# undef __uxp__ +# define UXPArchitecture +# define SVR4Architecture +# ifdef sparc +# undef sparc +# define SparcArchitecture +# endif +#endif /* __uxp__ */ + +#ifdef __sxg__ +# define MacroIncludeFile <fujitsu.cf> +# define MacroFile fujitsu.cf +# define FujitsuArchitecture +# undef __sxg__ +# define mc68000Architecture +#endif /* __sxg__ */ + +#ifdef _SEQUENT_ +/* undefine assignments resulting from -DSVR4 */ +# undef MacroIncludeFile +# define MacroIncludeFile <sequent.cf> +# undef MacroFile +# define MacroFile sequent.cf +# undef _SEQUENT_ +# define DynixPtxArchitecture +# define SequentArchitecture +#endif + +#if defined(_nec_ews_svr4) || defined(nec_ews_svr4) || defined(nec_ews_svr2) || defined(SX) || defined(_nec_up) || defined(_nec_ft) || defined(PC_UX) +# ifdef nec +# undef nec +# endif +# define MacroIncludeFile <nec.cf> +# define MacroFile nec.cf +# define NecArchitecture +#endif + +#ifdef minix +#define MacroIncludeFile <minix.cf> +#define MacroFile minix.cf +#undef minix +#define MinixArchitecture +#define i386Architecture +#endif /* minix */ + +/* Systems with GNU libc and userland */ +#if defined(__GNU__) +#define GNUArchitecture +#define MacroIncludeFile <gnu.cf> +#define MacroFile gnu.cf +#ifdef __i386__ +#define i386Architecture +#endif +#endif + +#ifdef MACH +#ifdef __GNU__ +/* Mach-based GNU system */ +#define GNUMachArchitecture +#else +#define MacroIncludeFile <mach.cf> +#define MacroFile mach.cf +#endif +#undef MACH +#ifdef i386 +#define i386MachArchitecture +#define i386Architecture +#endif /* i386 */ +#undef i386 +#endif /* MACH */ + +/* On NetBSD, `unix' is not defined, and cpp emits a warning every time + * it sees a test using the `unix' symbol */ +#if !defined(NetBSDArchitecture) || (defined(NetBSDArchitecture) && DefaultOSMajorVersion == 1 && DefaultOSMinorVersion <= 3) +#ifdef unix +#undef unix +#endif +#endif + +#ifdef SparcArchitecture +# if defined(__sparc_v9) || defined(__arch64__) +# define Sparc64Architecture +# endif +#endif + +#ifndef MacroIncludeFile +XCOMM WARNING: Imake.cf not configured; guessing at definitions!!! +XCOMM This might mean that BOOTSTRAPCFLAGS was not set when building imake. +#define MacroIncludeFile <generic.cf> +#define MacroFile generic.cf +#endif diff --git a/nx-X11/config/cf/Imake.rules b/nx-X11/config/cf/Imake.rules new file mode 100644 index 000000000..06b78993b --- /dev/null +++ b/nx-X11/config/cf/Imake.rules @@ -0,0 +1,3575 @@ +XCOMM --------------------------------------------------------------------- +XCOMM Imake rules for building libraries, programs, scripts, and data files +XCOMM --------------------------------------------------------------------- + +/* + * MACHINE-INDEPENDENT RULES; DO NOT MODIFY + * + * Warning, when defining rules: make sure you do not include both a trailing + * backslash and double ampersand backslash or else you will get an extra + * backslash in the Makefile. + * + * The following macros are defined for the various templates and Imakefiles + * (for a list of the applicable make variables, see the template files): + * + * Concat (a,b) + * Concat3 (a,b,c) + * Concat4 (a,b,c,d) + * _Use (a,b) + * _UseCat (a,b,c) + * _MUse (a,b) + * _MUseCat (a,b,c) + * ProgramTargetName (target) + * HostProgramTargetName (target) + * RunProgram (progvar,options) + * RunProgramWithSetup (setup,progvar,options) + * RemoveFile (file) + * RemoveFiles (files) + * CenterLoadTarget (target,srclist,libs,defines) + * CenterProgramTarget (program,srclist,objlist,locallibs,syslibs) + * SentinelLinkTarget (step,program,linklist) + * SentinelProgramTarget (program,deplist,linklist) + * SentinelCplusplusProgramTarget (program,deplist,linklist) + * PurifyLinkTarget (step,program,linklist) + * PurifyProgramTarget (program,deplist,linklist) + * PurifyCplusplusProgramTarget (program,deplist,linklist) + * ProofLinkTarget (step,program,linklist) + * ProofProgramTarget (program,deplist,linklist) + * ProofCplusplusProgramTarget (program,deplist,linklist) + * ProofCleanTarget () + * RemoveTargetProgram (program) + * MakeDir (dir) + * InstallDirectory (dir) + * BuildIncludesTop (srclist) + * BuildIncludes (srclist,dstsubdir,dstupdir) + * LinkRule (program,options,objects,libraries) + * HostLinkRule (program,options,objects,libraries) + * NoCmpScript (target) + * NoConfigRec (target) + * NormalProgramTarget (program,objects,deplibs,locallibs,syslibs) + * SetUIDProgramTarget (program,objects,deplibs,locallibs,syslibs) + * SingleProgramTarget (program,objects,locallibs,syslibs) + * SimpleProgramTarget (program) + * ComplexProgramTarget (program) + * ComplexProgramTarget_1 (program,locallib,syslib) + * ComplexProgramTarget_2 (program,locallib,syslib) + * ComplexProgramTarget_3 (program,locallib,syslib) + * ServerTargetWithFlags (server,subdirs,objects,libs,syslibs,flags) + * ServerTarget (server,subdirs,objects,libs,syslibs) + * MoveToBakFile (file) + * RMoveToBakFile (file) + * RanLibrary (args) + * LibraryTargetName (libname) + * LibraryTargetNameSuffix (libname,suffix) + * InstallNamedTarget (step,srcname,flags,dest,dstname) + * InstallTarget (step,file,flags,dest) + * InstallLibrary (libname,dest) + * MergeIntoInstalledLibrary (tolib,fromlib) + * InstallLibraryAlias (libname,alias,dest) + * InstallLintLibrary (libname,dest) + * InstallManPageLong (file,destdir,dest) + * InstallManPage (file,destdir) + * InstallManPageAliases (file,destdir,aliases) + * ManKeywordsTarget (manpath) + * InstallNamedNonExec (srcname,dstname,dest) + * InstallNonExecFile (file,dest) + * InstallNonExecFileNoClobber (file,dest) + * InstallNonExec (file,dest) + * InstallProgramWithFlags (program,dest,flags) + * InstallProgram (program,dest) + * InstallScript (program,dest) + * InstallNamedProg (srcname,dstname,dest) + * InstallNamedProgNoClobber (srcname,dstname,dest) + * MakeFlagsToShellFlags (makeflags,shellcmd) + * MakeNamedTargetSubdir (dir,flags,subname) + * LinkConfDirectoryLong (mdir,cdir,rdir,ldir,opath,npath) + * LinkConfDirectory (mdir,cdir,rdir,ldir) + * LinkConfFileLong (cfile,lfile,opath,npath) + * LinkConfFile (cfile,lfile) + * LinkFileList (step,list,dir,sub) + * LinkVarDirectory (mdir,cdir,rdir,ldir) + * InstallMultipleDestFlags (step,list,dest,flags) + * InstallMultipleDest (step,list,dest) + * InstallMultiple (list,dest) + * InstallMultipleFlags (list,dest,flags) + * InstallMultipleMan (list,dest) + * InstallMultipleManSuffix (list,dest,suffix) + * DependDependency () + * DependTarget () + * DependTarget3 (srcs1,srcs2,srcs3) + * CleanTarget () + * TagsTarget () + * ImakeDependency (target) + * BuildMakefileTarget (notused,imakeflags) + * MakefileTarget () + * LibMkdir (dir) + * LibCleanDir (dir) + * LintLibReferences (varname,libname,libsource) + * UnsharedLibReferences (varname,libname,libsource) + * ProjectUnsharedLibReferences (varname,libname,libsource,buildlibdir) + * SharedLibDependencies (libname,libsource,revname) + * SharedDSLibDependencies (libname,libsource,revname) + * SharedLibReferences (varname,libname,libsource,revname,rev) + * SharedDSLibReferences (varname,libname,libsource,revname,rev) + * ObjectCompile (options) + * NormalLibObjCompile (options) + * NormalSharedLibObjCompile (options) + * NormalRelocLibObjCompile (options) + * LibObjCompile (dir,options) + * DebuggedLibObjCompile (options) + * ProfiledLibObjCompile (options) + * SharedLibObjCompile (options) + * NormalLibraryObjectRule () + * NormalFortranObjectRule () + * ObjectFromSpecialSource (dst,src,flags) + * SpecialObjectRule (objs,depends,options) + * SpecialCObjectRule (basename,depends,options) + * LexFile (file) + * M4File (file,includes) + * YaccFile (file,flags) + * YaccFileNoFlags (file) + * MakeLibrary (libname,objlist) + * LinkBuildLibrary (lib) + * LinkBuildSonameLibrary (lib) + * NormalLibraryTarget (libname,objlist) + * NormalLibraryTarget2 (libname,objlist1,objlist2) + * NormalLibraryTarget3 (libname,objlist1,objlist2,objlist3) + * NormalDepLibraryTarget (libname,deplist,objlist) + * UnsharedLibraryTarget (libname,objlist,down,up) + * UnsharedLibraryTarget3 (libname,objlist1,objlist2,objlist3,down,up) + * SubdirLibraryRule (objlist) + * ProfiledLibraryTarget (libname,objlist) + * DebuggedLibraryTarget (libname,objlist) + * AliasedLibraryTarget (libname,alias) + * NormalRelocatableTarget (objname,objlist) + * ProfiledRelocatableTarget (objname,objlist) + * DebuggedRelocatableTarget (objname,objlist) + * LintLibraryTarget (libname,srclist) + * NormalLintTarget (srclist) + * LintTarget () + * LinkSourceFile (src,dir) + * LinkFile (tofile,fromfile) + * MakeSubincludesForBuild (step,dir,srclist) + * LangNamedTargetSubdirs (lang,name,dirs,verb,flags,subname) + * LangNamedMakeSubdirs (lang,name,dirs) + * LangMakeSubdirs (lang,dirs) + * NamedTargetSubdirs (name,dirs,verb,flags,subname) + * NamedMakeSubdirs (name,dirs) + * MakeSubdirs (dirs) + * DependSubdirs (dirs) + * ForceSubdirs (dirs) + * InstallSubdirs (dirs) + * InstallManSubdirs (dirs) + * IncludesSubdirs (dirs) + * NamedCleanSubdirs (name,dirs) + * CleanSubdirs (dirs) + * NamedTagSubdirs (name,dirs) + * TagSubdirs (dirs) + * MakeLintSubdirs (dirs,target,subtarget) + * LintSubdirs (dirs) + * MakeLintLibSubdirs (dirs) + * MakeMakeSubdirs (dirs,target) + * MakefileSubdirs (dirs) + * CppScriptTarget (dst,src,defs,deplist) + * MakeScriptFromCpp (name,defs) + * CppFileTarget (dst,src,defs,deplist) + * CppSourceFile (dst,src,defs,deplist) + * MakeDirectories (step,dirs) + * AllTarget (depends) + * StaticLibrary (libpath,libname) + * MakeMutex (targets) + * LinkBuildModule (module,subdir) + * LinkBuildNamedModule (module,name,subdir) + * DynamicModuleTarget (module,modlist) + * InstallDynamicModule (module,dest,subdir) + * InstallDynamicNamedModule (module,instname,dest,subdir) + * LinkerRuntimeLibraryPathFlag (path) + * + * + * The following are in specific <os>Lib.rules: + * + * SharedLibraryTarget (libname,rev,solist,down,up) + * SharedLibraryDataTarget (libname,rev,salist) + * InstallSharedLibrary (libname,rev,dest) + * InstallSharedLibraryData (libname,rev,dest) + * SharedDepModuleTarget (name,deps,solist) + * + */ + +#define NullParameter + +/* if [ -d ] or [ ! -d ] causes make to fail, define this as - */ +#ifndef DirFailPrefix +#define DirFailPrefix +#endif + +/* + * NoCmpScript - suppress clearmake build script comparison. + */ +#ifndef NoCmpScript +#if HasClearmake +#define NoCmpScript(targ) @@\ +XCOMM special target for clearmake @@\ +.NO_CMP_SCRIPT: targ +#else +#define NoCmpScript(targ) /**/ +#endif +#endif + +/* + * NoConfigRec - suppress using clearmake configuration records. + */ +#ifndef NoConfigRec +#if HasClearmake +#define NoConfigRec(targ) @@\ +XCOMM special target for clearmake @@\ +.NO_CONFIG_REC: targ +#else +#define NoConfigRec(targ) /**/ +#endif +#endif + +/* + * Concat - concatenates two strings. + */ +#ifndef Concat +#if (defined(__STDC__) && !defined(UnixCpp)) || defined(AnsiCpp) +#define Concat(a,b)a##b +#else +#define Concat(a,b)a/**/b +#endif +#endif + +/* + * Concat3 - concatenates three strings. + */ +#ifndef Concat3 +#if (defined(__STDC__) && !defined(UnixCpp)) || defined(AnsiCpp) +#define Concat3(a,b,c)a##b##c +#else +#define Concat3(a,b,c)a/**/b/**/c +#endif +#endif + +/* + * Concat4 - concatenates four strings. + */ +#ifndef Concat4 +#if (defined(__STDC__) && !defined(UnixCpp)) || defined(AnsiCpp) +#define Concat4(a,b,c,d)a##b##c##d +#else +#define Concat4(a,b,c,d)a/**/b/**/c/**/d +#endif +#endif + +/* + * _XUse - makes a choice based on UseInstalledX11. + */ +#ifndef _XUse +# if defined(UseInstalled) || UseInstalledX11 +# define _XUse(a,b) a +# else +# define _XUse(a,b) b +# endif +#endif /* _XUse */ + +/* + * _Use - makes a choice based on UseInstalled. + */ +#ifndef _Use +# define _Use _XUse +#endif /* _Use */ + +/* + * _XUseCat - combination of _XUse and Concat. + * exists to avoid problems with some preprocessors + */ +#ifndef _XUseCat +# if (defined(__STDC__) && !defined(UnixCpp)) || defined(AnsiCpp) +# if defined(UseInstalled) || UseInstalledX11 +# define _XUseCat(a,b,c) a##c +# else +# define _XUseCat(a,b,c) b##c +# endif +# else +# if defined(UseInstalled) || UseInstalledX11 +# define _XUseCat(a,b,c) a/**/c +# else +# define _XUseCat(a,b,c) b/**/c +# endif +# endif +#endif /* _XUseCat */ + +/* + * _UseCat - combination of _Use and Concat. + * exists to avoid problems with some preprocessors + */ +#ifndef _UseCat +# define _UseCat _XUseCat +#endif /* _UseCat */ + +#ifndef ProgramTargetName +#define ProgramTargetName(target)target +#endif + +#ifndef HostProgramTargetName +#define HostProgramTargetName(target)target +#endif + +#ifndef RunProgram +#define RunProgram(progvar,options) $(progvar) options +#endif + +#ifndef RunProgramWithSetup +#define RunProgramWithSetup(setup,progvar,options) setup $(progvar) options +#endif + +#ifndef RunPerlScript +#define RunPerlScript(script,options) $(PERLENVSETUP) $(PERL) $(PERLOPTS) script options +#endif + +#ifndef RemoveFile +#define RemoveFile(file) $(RM) file +#endif /* RemoveFile */ + +#ifndef RemoveFiles +#define RemoveFiles(files) $(RM) files +#endif /* RemoveFiles */ + +#if RemoveObsoleteFiles +#define RemoveOldFile(new,old,dir) @@\ + @if [ -f new ]; then set -x; \ @@\ + RemoveFile($(DESTDIR)dir/old); \ @@\ + fi +#else +#define RemoveOldFile(new,old,dir) $(_NULLCMD_) +#endif + +/* + * CenterLoadTarget - generate rules to load files into CodeCenter + */ +#ifndef CenterLoadTarget +#if HasCodeCenter +#define CenterLoadTarget(target,srclist,libs,defines) @@\ +ProgramTargetName(target):: srclist @@\ + XCOMM load defines srclist libs +#else +#define CenterLoadTarget(target,srclist,libs,defines) /**/ +#endif +#endif /* CenterLoadTarget */ + +/* + * CenterProgramTarget - generate rules to make CodeCenter read in sources + * and objects. + */ +#ifndef CenterProgramTarget +#define CenterProgramTarget(program,srclist,objlist,locallibs,syslibs) @@\ +CenterLoadTarget(Concat(debug_,program),srclist,$(EXTRA_LDOPTIONS) $(LOCAL_LDFLAGS) $(LDPRELIBS) locallibs $(LDLIBS) syslibs,$(ALLDEFINES)) @@\ + @@\ +CenterLoadTarget(Concat(odebug_,program),objlist,$(EXTRA_LDOPTIONS) $(LOCAL_LDFLAGS) $(LDPRELIBS) locallibs $(LDLIBS) syslibs,$(ALLDEFINES)) +#endif /* CenterProgramTarget */ + +#ifndef SentinelLinkTarget +#if HasSentinel +#define SentinelLinkTarget(step,program,linklist) @@\ +ProgramTargetName(step.sentinel): @@\ + RemoveTargetProgram($@) @@\ + $(CCENVSETUP) $(SENTINEL) $(SENTINELOPTIONS) $(CC) -o program.sentinel $(LDOPTIONS) linklist $(EXTRA_LOAD_FLAGS) +#else +#define SentinelLinkTarget(step,program,linklist) /**/ +#endif +#endif /* SentinelLinkTarget */ + +/* + * SentinelProgramTarget - generate rules to make Sentinel image + */ +#ifndef SentinelProgramTarget +#if HasSentinel +#define SentinelProgramTarget(program,deplist,linklist) @@\ +ProgramTargetName(program.sentinel): deplist @@\ + RemoveTargetProgram($@) @@\ + $(CCENVSETUP) $(SENTINEL) $(SENTINELOPTIONS) $(CC) -o $@ $(LDOPTIONS) linklist $(EXTRA_LOAD_FLAGS) @@\ + @@\ +clean clean.sentinel:: @@\ + RemoveFile(program.sentinel) +#else +#define SentinelProgramTarget(program,deplist,linklist) /**/ +#endif +#endif /* SentinelProgramTarget */ + +/* + * SentinelCplusplusProgramTarget - generate rules to make Sentinel image + */ +#ifndef SentinelCplusplusProgramTarget +#if HasSentinel +#define SentinelCplusplusProgramTarget(program,deplist,linklist) @@\ +ProgramTargetName(program.sentinel): deplist @@\ + RemoveTargetProgram($@) @@\ + $(CXXENVSETUP) $(SENTINEL) $(SENTINELOPTIONS) $(CXX) -o $@ $(CXXLDOPTIONS) linklist $(EXTRA_LOAD_FLAGS) @@\ + @@\ +clean clean.sentinel:: @@\ + RemoveFile(program.sentinel) +#else +#define SentinelCplusplusProgramTarget(program,deplist,linklist) /**/ +#endif +#endif /* SentinelCplusplusProgramTarget */ + +#ifndef PurifyLinkTarget +#if HasPurify +#define PurifyLinkTarget(step,program,linklist) @@\ +ProgramTargetName(step.pure): @@\ + RemoveTargetProgram($@) @@\ + $(CCENVSETUP) $(PURIFY) $(PURIFYOPTIONS) $(CC) -o program.pure $(LDOPTIONS) linklist $(EXTRA_LOAD_FLAGS) +#else +#define PurifyLinkTarget(step,program,linklist) /**/ +#endif +#endif /* PurifyLinkTarget */ + +/* + * PurifyProgramTarget - generate rules to make Purify'ed image + */ +#ifndef PurifyProgramTarget +#if HasPurify +#define PurifyProgramTarget(program,deplist,linklist) @@\ +ProgramTargetName(program.pure): deplist @@\ + RemoveTargetProgram($@) @@\ + $(CCENVSETUP) $(PURIFY) $(PURIFYOPTIONS) $(CC) -o $@ $(LDOPTIONS) linklist $(EXTRA_LOAD_FLAGS) @@\ + @@\ +clean clean.pure:: @@\ + RemoveFile(program.pure) +#else +#define PurifyProgramTarget(program,deplist,linklist) /**/ +#endif +#endif /* PurifyProgramTarget */ + +/* + * PurifyCplusplusProgramTarget - generate rules to make Purify'ed image + */ +#ifndef PurifyCplusplusProgramTarget +#if HasPurify +#define PurifyCplusplusProgramTarget(program,deplist,linklist) @@\ +ProgramTargetName(program.pure): deplist @@\ + RemoveTargetProgram($@) @@\ + $(CXXENVSETUP) $(PURIFY) $(PURIFYOPTIONS) $(CXX) -o $@ $(CXXLDOPTIONS) linklist $(EXTRA_LOAD_FLAGS) @@\ + @@\ +clean clean.pure:: @@\ + RemoveFile(program.pure) +#else +#define PurifyCplusplusProgramTarget(program,deplist,linklist) /**/ +#endif +#endif /* PurifyCplusplusProgramTarget */ + +#ifndef ProofLinkTarget +#if HasTestCenter +#define ProofLinkTarget(step,program,linklist) @@\ +ProgramTargetName(step.tc): @@\ + RemoveTargetProgram($@) @@\ + $(CCENVSETUP) $(PROOF) $(PROOFOPTIONS) $(CC) -o program.tc $(LDOPTIONS) linklist $(EXTRA_LOAD_FLAGS) +#else +#define ProofLinkTarget(step,program,linklist) /**/ +#endif +#endif /* ProofLinkTarget */ + +/* + * ProofProgramTarget - generate rules to make Proof'ed image + */ +#ifndef ProofProgramTarget +#if HasTestCenter +#define ProofProgramTarget(program,deplist,linklist) @@\ +ProgramTargetName(program.tc): deplist @@\ + RemoveTargetProgram($@) @@\ + $(CCENVSETUP) $(PROOF) $(PROOFOPTIONS) $(CC) -o $@ $(LDOPTIONS) linklist $(EXTRA_LOAD_FLAGS) @@\ + @@\ +clean cleantc:: @@\ + RemoveFiles(program.tc program.tc.*.*) +#else +#define ProofProgramTarget(program,deplist,linklist) /**/ +#endif +#endif /* ProofProgramTarget */ + +/* + * ProofCplusplusProgramTarget - generate rules to make Proof'ed image + */ +#ifndef ProofCplusplusProgramTarget +#if HasTestCenter +#define ProofCplusplusProgramTarget(program,deplist,linklist) @@\ +ProgramTargetName(program.tc): deplist @@\ + RemoveTargetProgram($@) @@\ + $(CXXENVSETUP) $(PROOF) $(PROOFOPTIONS) $(CXX) -o $@ $(CXXLDOPTIONS) linklist $(EXTRA_LOAD_FLAGS) @@\ + @@\ +clean cleantc:: @@\ + RemoveFiles(program.tc program.tc.*.*) +#else +#define ProofCplusplusProgramTarget(program,deplist,linklist) /**/ +#endif +#endif /* ProofCplusplusProgramTarget */ + +#ifndef ProofCleanTarget +#if HasTestCenter +#define ProofCleanTarget() @@\ +clean cleantc:: @@\ + $(RM) -r TC.Cache +#else +#define ProofCleanTarget() /**/ +#endif +#endif /* ProofCleanTarget */ + +#ifndef RemoveTargetProgram +#if RemoveTargetProgramByMoving +#define RemoveTargetProgram(program) \ +-if [ -f program ]; then RemoveFile(Concat(program,~)); $(MV) program Concat(program,~); fi +#else +#define RemoveTargetProgram(program) RemoveFile(program) +#endif +#endif /* RemoveTargetProgram */ + +#ifndef MakeDir +#define MakeDir(dir) DirFailPrefix@if [ -d dir ]; then \ @@\ + set +x; \ @@\ + else \ @@\ + if [ -h dir ]; then \ @@\ + (set -x; rm -f dir); \ @@\ + fi; \ @@\ + (set -x; $(MKDIRHIER) dir); \ @@\ + fi +#endif /* MakeDir */ + +#ifndef MakeDirInline +#define MakeDirInline(dir) if [ -d dir ]; then \ @@\ + :; \ @@\ + else \ @@\ + if [ -h dir ]; then \ @@\ + (set -x; rm -f dir); \ @@\ + fi; \ @@\ + (set -x; $(MKDIRHIER) dir); \ @@\ + fi +#endif /* MakeDirInline */ + +#ifndef InstallDirectory +#define InstallDirectory(dir) @@\ +install:: @@\ + MakeDir(dir) +#endif /* InstallDirectory */ + +#ifndef InstallCreateLink +# define InstallCreateLink(dest,from,to) @@\ +install:: @@\ + cd $(DESTDIR)dest && \ @@\ + $(LN) -sf from to +#endif + +#ifndef BuildIncludesTop +#define BuildIncludesTop(srclist) @@\ +includes:: srclist @@\ + MakeDir($(BUILDINCDIR)) @@\ + @(set -x; cd $(BUILDINCDIR) && for i in srclist; do \ @@\ + RemoveFile(`basename $$i`); \ @@\ + $(LN) $(BUILDINCTOP)/$(CURRENT_DIR)/$$i .; \ @@\ + done) +#endif /* BuildIncludesTop */ + +#ifndef BuildIncludes +#define BuildIncludes(srclist,dstsubdir,dstupdir) @@\ +includes:: srclist @@\ + MakeDir($(BUILDINCDIR)/dstsubdir) @@\ + @(set -x; cd $(BUILDINCDIR)/dstsubdir && for i in srclist; do \ @@\ + RemoveFile(`basename $$i`); \ @@\ + $(LN) $(BUILDINCTOP)/dstupdir/$(CURRENT_DIR)/$$i .; \ @@\ + done) +#endif /* BuildIncludes */ + +/* + * LinkBuildBinary - export a binary from the build tree. + */ +#ifndef LinkBuildBinary +#define LinkBuildBinary(binary) @@\ +all:: $(BUILDBINDIR)/binary binary @@\ + @@\ +$(BUILDBINDIR)/binary: binary @@\ + MakeDir($(BUILDBINDIR)) @@\ + RemoveFile($@) @@\ + cd $(BUILDBINDIR) && $(LN) $(BUILDBINTOP)/$(CURRENT_DIR)/binary . +#endif /* LinkBuildBinary */ + +#ifndef BuildInterfaces +#define BuildInterfaces(srclist,dstsubdir,dstupdir) @@\ +interfaces:: @@\ + MakeDir($(BUILDINCDIR)/dstsubdir) @@\ + @(set -x; cd $(BUILDINCDIR)/dstsubdir && for i in srclist; do \ @@\ + RemoveFile($$i); \ @@\ + $(LN) $(BUILDINCTOP)/dstupdir/$(CURRENT_DIR)/$$i .; \ @@\ + done) +#endif /* BuildInterfaces */ + +/* + * LinkRule - link a program + */ +#ifndef LinkRule +#define LinkRule(program,options,objects,libraries) \ +$(CCLINK) -o program options objects libraries $(EXTRA_LOAD_FLAGS) +#endif /* LinkRule */ + +/* + * HostLinkRule - link a utility to be used on the build host + * (differs from LinkRule if cross compiling) + */ +#ifndef HostLinkRule +#define HostLinkRule LinkRule +#endif + +#ifndef CplusplusLinkRule +#define CplusplusLinkRule(program,options,objects,libraries) \ +$(CXXLINK) -o program options objects libraries $(EXTRA_LOAD_FLAGS) +#endif /* CplusplusLinkRule */ + +/* + * NormalProgramTarget - generate rules to compile and link the indicated + * program; since it does not use any default object files, it may be used for + * multiple programs in the same Imakefile. + */ +#ifndef NormalProgramTarget +#define NormalProgramTarget(program,objects,deplibs,locallibs,syslibs) @@\ +ProgramTargetName(program): objects deplibs @@\ + RemoveTargetProgram($@) @@\ + LinkRule($@,$(LDOPTIONS),objects,locallibs $(LDLIBS) syslibs) @@\ + @@\ +SentinelProgramTarget(program,objects deplibs,objects locallibs $(LDLIBS) syslibs) @@\ +PurifyProgramTarget(program,objects deplibs,objects locallibs $(LDLIBS) syslibs) @@\ +ProofProgramTarget(program,objects deplibs,objects locallibs $(LDLIBS) syslibs) @@\ + @@\ +clean:: @@\ + RemoveFile(ProgramTargetName(program)) +#endif /* NormalProgramTarget */ + + +/* + * NormalCplusplusProgramTarget - Like NormalTargetProgram, but uses + * C++ linking rules. + */ +#ifndef NormalCplusplusProgramTarget +#define NormalCplusplusProgramTarget(program,objects,deplibs,locallibs,syslibs) @@\ +ProgramTargetName(program): objects deplibs @@\ + RemoveTargetProgram($@) @@\ + CplusplusLinkRule($@,$(CXXLDOPTIONS),objects,locallibs $(LDLIBS) syslibs) @@\ + @@\ +SentinelCplusplusProgramTarget(program,objects deplibs,objects locallibs $(LDLIBS) syslibs) @@\ +PurifyCplusplusProgramTarget(program,objects deplibs,objects locallibs $(LDLIBS) syslibs) @@\ +ProofCplusplusProgramTarget(program,objects deplibs,objects locallibs $(LDLIBS) syslibs) @@\ + @@\ +clean:: @@\ + RemoveFile(ProgramTargetName(program)) +#endif /* NormalCplusplusProgramTarget */ + + +#ifndef SetUIDProgramTarget +#define SetUIDProgramTarget NormalProgramTarget +#endif + + +/* + * SingleProgramTarget - obsolete version of NormalProgramTarget that does + * not have deplibs. + */ +#ifndef SingleProgramTarget +#define SingleProgramTarget(program,objects,locallibs,syslibs) @@\ +NormalProgramTarget(program,objects,NullParameter,locallibs,syslibs) +#endif /* SingleProgramTarget */ + +/* + * SimpleProgramTarget - generate rules for compiling and linking programs + * that only have one C source file. It should only be used in Imakefiles + * that describe a single program. + */ +#ifndef SimpleProgramTarget +#define SimpleProgramTarget(program) @@\ + OBJS = program.o @@\ + SRCS = program.c @@\ + @@\ +ComplexProgramTarget(program) +#endif /* SimpleProgramTarget */ + +#ifndef SimpleProgramTarget_1 +#define SimpleProgramTarget_1(program) @@\ + OBJS1 = program.o @@\ + SRCS1 = program.c @@\ + @@\ +ComplexProgramTarget_1(program,$(LOCAL_LIBRARIES),NullParameter) +#endif /* SimpleProgramTarget_1 */ +#ifndef SimpleProgramTarget_2 +#define SimpleProgramTarget_2(program) @@\ + OBJS2 = program.o @@\ + SRCS2 = program.c @@\ + @@\ +ComplexProgramTarget_2(program,$(LOCAL_LIBRARIES),NullParameter) +#endif /* SimpleProgramTarget_2 */ +#ifndef SimpleProgramTarget_3 +#define SimpleProgramTarget_3(program) @@\ + OBJS3 = program.o @@\ + SRCS3 = program.c @@\ + @@\ +ComplexProgramTarget_3(program,$(LOCAL_LIBRARIES),NullParameter) +#endif /* SimpleProgramTarget_3 */ +#ifndef SimpleProgramTarget_4 +#define SimpleProgramTarget_4(program) @@\ + OBJS4 = program.o @@\ + SRCS4 = program.c @@\ + @@\ +ComplexProgramTarget_4(program,$(LOCAL_LIBRARIES),NullParameter) +#endif /* SimpleProgramTarget_4 */ +#ifndef SimpleProgramTarget_5 +#define SimpleProgramTarget_5(program) @@\ + OBJS5 = program.o @@\ + SRCS5 = program.c @@\ + @@\ +ComplexProgramTarget_5(program,$(LOCAL_LIBRARIES),NullParameter) +#endif /* SimpleProgramTarget_5 */ +#ifndef SimpleProgramTarget_6 +#define SimpleProgramTarget_6(program) @@\ + OBJS6 = program.o @@\ + SRCS6 = program.c @@\ + @@\ +ComplexProgramTarget_6(program,$(LOCAL_LIBRARIES),NullParameter) +#endif /* SimpleProgramTarget_6 */ +#ifndef SimpleProgramTarget_7 +#define SimpleProgramTarget_7(program) @@\ + OBJS7 = program.o @@\ + SRCS7 = program.c @@\ + @@\ +ComplexProgramTarget_7(program,$(LOCAL_LIBRARIES),NullParameter) +#endif /* SimpleProgramTarget_7 */ +#ifndef SimpleProgramTarget_8 +#define SimpleProgramTarget_8(program) @@\ + OBJS8 = program.o @@\ + SRCS8 = program.c @@\ + @@\ +ComplexProgramTarget_8(program,$(LOCAL_LIBRARIES),NullParameter) +#endif /* SimpleProgramTarget_8 */ +#ifndef SimpleProgramTarget_9 +#define SimpleProgramTarget_9(program) @@\ + OBJS9 = program.o @@\ + SRCS9 = program.c @@\ + @@\ +ComplexProgramTarget_9(program,$(LOCAL_LIBRARIES),NullParameter) +#endif /* SimpleProgramTarget_9 */ +#ifndef SimpleProgramTarget_10 +#define SimpleProgramTarget_10(program) @@\ + OBJS10 = program.o @@\ + SRCS10 = program.c @@\ + @@\ +ComplexProgramTarget_10(program,$(LOCAL_LIBRARIES),NullParameter) +#endif /* SimpleProgramTarget_10 */ + +#ifndef SimpleCplusplusProgramTarget +#define SimpleCplusplusProgramTarget(program) @@\ + OBJS = program.o @@\ + SRCS = program.CCsuf @@\ + @@\ +ComplexCplusplusProgramTarget(program) +#endif /* SimpleCplusplusProgramTarget */ + +#ifndef ProgramTargetHelper +#define ProgramTargetHelper(program,srcs,objs,deplib,locallib,syslib) @@\ +ProgramTargetName(program): $(objs) $(deplib) @@\ + RemoveTargetProgram($@) @@\ + LinkRule($@,$(LDOPTIONS),$(objs),locallib $(LDLIBS) syslib) @@\ + @@\ +CenterProgramTarget(program,$(srcs),$(objs),locallib,syslib) @@\ +SentinelProgramTarget(program,$(objs) $(deplib),$(objs) locallib $(LDLIBS) syslib) @@\ +PurifyProgramTarget(program,$(objs) $(deplib),$(objs) locallib $(LDLIBS) syslib) @@\ +ProofProgramTarget(program,$(objs) $(deplib),$(objs) locallib $(LDLIBS) syslib) @@\ + @@\ +InstallProgram(program,$(BINDIR)) @@\ +InstallManPage(program,$(MANDIR)) +#endif /* ProgramTargetHelper */ + +#ifndef ProgramTargetHelperNoMan +#define ProgramTargetHelperNoMan(program,srcs,objs,deplib,locallib,syslib) @@\ +ProgramTargetName(program): $(objs) $(deplib) @@\ + RemoveTargetProgram($@) @@\ + LinkRule($@,$(LDOPTIONS),$(objs),locallib $(LDLIBS) syslib) @@\ + @@\ +CenterProgramTarget(program,$(srcs),$(objs),locallib,syslib) @@\ +SentinelProgramTarget(program,$(objs) $(deplib),$(objs) locallib $(LDLIBS) syslib) @@\ +PurifyProgramTarget(program,$(objs) $(deplib),$(objs) locallib $(LDLIBS) syslib) @@\ +ProofProgramTarget(program,$(objs) $(deplib),$(objs) locallib $(LDLIBS) syslib) @@\ + @@\ +InstallProgram(program,$(BINDIR)) +#endif /* ProgramTargetHelperNoMan */ + +#ifndef CplusplusProgramTargetHelper +#define CplusplusProgramTargetHelper(program,srcs,objs,deplib,locallib,syslib) @@\ +ProgramTargetName(program): $(objs) $(deplib) @@\ + RemoveTargetProgram($@) @@\ + CplusplusLinkRule($@,$(CXXLDOPTIONS),$(objs),locallib $(LDLIBS) syslib) @@\ + @@\ +CenterProgramTarget(program,$(srcs),$(objs),locallib,syslib) @@\ +SentinelCplusplusProgramTarget(program,$(objs) $(deplib),$(objs) locallib $(LDLIBS) syslib) @@\ +PurifyCplusplusProgramTarget(program,$(objs) $(deplib),$(objs) locallib $(LDLIBS) syslib) @@\ +ProofCplusplusProgramTarget(program,$(objs) $(deplib),$(objs) locallib $(LDLIBS) syslib) @@\ + @@\ +InstallProgram(program,$(BINDIR)) @@\ +InstallManPage(program,$(MANDIR)) +#endif /* CplusplusProgramTargetHelper */ + +#ifndef CplusplusProgramTargetHelperNoMan +#define CplusplusProgramTargetHelperNoMan(program,srcs,objs,deplib,locallib,syslib) @@\ +ProgramTargetName(program): $(objs) $(deplib) @@\ + RemoveTargetProgram($@) @@\ + CplusplusLinkRule($@,$(CXXLDOPTIONS),$(objs),locallib $(LDLIBS) syslib) @@\ + @@\ +CenterProgramTarget(program,$(srcs),$(objs),locallib,syslib) @@\ +SentinelCplusplusProgramTarget(program,$(objs) $(deplib),$(objs) locallib $(LDLIBS) syslib) @@\ +PurifyCplusplusProgramTarget(program,$(objs) $(deplib),$(objs) locallib $(LDLIBS) syslib) @@\ +ProofCplusplusProgramTarget(program,$(objs) $(deplib),$(objs) locallib $(LDLIBS) syslib) @@\ + @@\ +InstallProgram(program,$(BINDIR)) @@ +#endif /* CplusplusProgramTargetHelperNoMan */ + +/* + * ComplexProgramTarget - generate rules for compiling and linking the + * program specified by $(OBJS) and $(SRCS), installing the program and its + * man page, and generating dependencies. It should only be used in + * Imakefiles that describe a single program. + */ +#ifndef ComplexProgramTarget +#define ComplexProgramTarget(program) @@\ + PROGRAM = ProgramTargetName(program) @@\ + @@\ +AllTarget(ProgramTargetName(program)) @@\ + @@\ +ProgramTargetHelper(program,SRCS,OBJS,DEPLIBS,$(LOCAL_LIBRARIES),NullParameter) @@\ + @@\ +DependTarget() @@\ +LintTarget() @@\ + @@\ +clean:: @@\ + RemoveFile(ProgramTargetName(program)) +#endif /* ComplexProgramTarget */ + +#ifndef ComplexCplusplusProgramTarget +#define ComplexCplusplusProgramTarget(program) @@\ + PROGRAM = ProgramTargetName(program) @@\ + @@\ +AllTarget(ProgramTargetName(program)) @@\ + @@\ +CplusplusProgramTargetHelper(program,SRCS,OBJS,DEPLIBS,$(LOCAL_LIBRARIES),NullParameter) @@\ + @@\ +DependTarget() @@\ +LintTarget() @@\ + @@\ +clean:: @@\ + RemoveFile(ProgramTargetName(program)) +#endif /* ComplexCplusplusProgramTarget */ + +/* + * ComplexProgramTargetNoMan - generate rules for compiling and linking + * the program specified by $(OBJS) and $(SRCS), installing the program + * and generating dependencies. It should only be used in Imakefiles + * that describe a single program, and have no manual page. + */ +#ifndef ComplexProgramTargetNoMan +#define ComplexProgramTargetNoMan(program) @@\ + PROGRAM = ProgramTargetName(program) @@\ + @@\ +AllTarget(ProgramTargetName(program)) @@\ + @@\ +ProgramTargetHelperNoMan(program,SRCS,OBJS,DEPLIBS,$(LOCAL_LIBRARIES),NullParameter) @@\ + @@\ +DependTarget() @@\ +LintTarget() @@\ + @@\ +clean:: @@\ + RemoveFile(ProgramTargetName(program)) +#endif /* ComplexProgramTargetNoMan */ + +#ifndef ComplexCplusplusProgramTarget +#define ComplexCplusplusProgramTarget(program) @@\ + PROGRAM = program @@\ + @@\ +AllTarget(program) @@\ + @@\ +CplusplusProgramTargetHelperNoMan(program,SRCS,OBJS,DEPLIBS,$(LOCAL_LIBRARIES),NullParameter) @@\ + @@\ +DependTarget() @@\ +LintTarget() @@\ + @@\ +clean:: @@\ + RemoveFile(ProgramTargetName(program)) +#endif /* ComplexCplusplusProgramTarget */ + +/* + * ComplexProgramTarget_1 - generate rules for compiling and linking the + * program specified by $(OBJS1) and $(SRCS1), installing the program and its + * man page, and generating dependencies for it and any programs described + * by $(SRCS2) through $(SRCS10). It should be used to build the primary + * program in Imakefiles that describe multiple programs. + */ +#ifndef ComplexProgramTarget_1 +#define ComplexProgramTarget_1(program,locallib,syslib) @@\ + OBJS = $(OBJS1) $(OBJS2) $(OBJS3) $(OBJS4) $(OBJS5) \ @@\ + $(OBJS6) $(OBJS7) $(OBJS8) $(OBJS9) $(OBJS10) @@\ + SRCS = $(SRCS1) $(SRCS2) $(SRCS3) $(SRCS4) $(SRCS5) \ @@\ + $(SRCS6) $(SRCS7) $(SRCS8) $(SRCS9) $(SRCS10) @@\ + @@\ +AllTarget($(PROGRAMS)) @@\ + @@\ +ProgramTargetHelper(program,SRCS1,OBJS1,DEPLIBS1,locallib,syslib) @@\ + @@\ +DependTarget() @@\ +LintTarget() @@\ + @@\ +clean:: @@\ + RemoveFiles($(PROGRAMS)) +#endif /* ComplexProgramTarget_1 */ + +#ifndef ComplexCplusplusProgramTarget_1 +#define ComplexCplusplusProgramTarget_1(program,locallib,syslib) @@\ + OBJS = $(OBJS1) $(OBJS2) $(OBJS3) $(OBJS4) $(OBJS5) \ @@\ + $(OBJS6) $(OBJS7) $(OBJS8) $(OBJS9) $(OBJS10) @@\ + SRCS = $(SRCS1) $(SRCS2) $(SRCS3) $(SRCS4) $(SRCS5) \ @@\ + $(SRCS6) $(SRCS7) $(SRCS8) $(SRCS9) $(SRCS10) @@\ + @@\ +AllTarget($(PROGRAMS)) @@\ + @@\ +CplusplusProgramTargetHelper(program,SRCS1,OBJS1,DEPLIBS1,locallib,syslib)@@\ + @@\ +DependTarget() @@\ +LintTarget() @@\ + @@\ +clean:: @@\ + RemoveFiles($(PROGRAMS)) +#endif /* ComplexCplusplusProgramTarget_1 */ + +/* + * ComplexProgramTarget_2 - generate rules for compiling and linking the + * program specified by $(OBJS2) and $(SRCS2) and installing the program and + * man page. It should be used to build the second program in Imakefiles + * describing more than one program. + */ +#ifndef ComplexProgramTarget_2 +#define ComplexProgramTarget_2(program,locallib,syslib) @@\ +ProgramTargetHelper(program,SRCS2,OBJS2,DEPLIBS2,locallib,syslib) +#endif /* ComplexProgramTarget_2 */ + +#ifndef ComplexCplusplusProgramTarget_2 +#define ComplexCplusplusProgramTarget_2(program,locallib,syslib) @@\ +CplusplusProgramTargetHelper(program,SRCS2,OBJS2,DEPLIBS2,locallib,syslib) +#endif /* ComplexCplusplusProgramTarget_2 */ + +/* + * ComplexProgramTarget_3 - generate rules for compiling and linking the + * program specified by $(OBJS3) and $(SRCS3) and installing the program and + * man page. It should be used to build the third program in Imakefiles + * describing more than one program. + */ +#ifndef ComplexProgramTarget_3 +#define ComplexProgramTarget_3(program,locallib,syslib) @@\ +ProgramTargetHelper(program,SRCS3,OBJS3,DEPLIBS3,locallib,syslib) +#endif /* ComplexProgramTarget_3 */ + +#ifndef ComplexCplusplusProgramTarget_3 +#define ComplexCplusplusProgramTarget_3(program,locallib,syslib) @@\ +CplusplusProgramTargetHelper(program,SRCS3,OBJS3,DEPLIBS3,locallib,syslib) +#endif /* ComplexCplusplusProgramTarget_3 */ + +/* + * ComplexProgramTarget_4 - generate rules for compiling and linking the + * program specified by $(OBJS4) and $(SRCS4) and installing the program and + * man page. It should be used to build the third program in Imakefiles + * describing more than one program. + */ +#ifndef ComplexProgramTarget_4 +#define ComplexProgramTarget_4(program,locallib,syslib) @@\ +ProgramTargetHelper(program,SRCS4,OBJS4,DEPLIBS4,locallib,syslib) +#endif /* ComplexProgramTarget_4 */ + +#ifndef ComplexCplusplusProgramTarget_4 +#define ComplexCplusplusProgramTarget_4(program,locallib,syslib) @@\ +CplusplusProgramTargetHelper(program,SRCS4,OBJS4,DEPLIBS4,locallib,syslib) +#endif /* ComplexCplusplusProgramTarget_4 */ + +/* + * ComplexProgramTarget_5 - generate rules for compiling and linking the + * program specified by $(OBJS5) and $(SRCS5) and installing the program and + * man page. It should be used to build the third program in Imakefiles + * describing more than one program. + */ +#ifndef ComplexProgramTarget_5 +#define ComplexProgramTarget_5(program,locallib,syslib) @@\ +ProgramTargetHelper(program,SRCS5,OBJS5,DEPLIBS5,locallib,syslib) +#endif /* ComplexProgramTarget_5 */ + +#ifndef ComplexCplusplusProgramTarget_5 +#define ComplexCplusplusProgramTarget_5(program,locallib,syslib) @@\ +CplusplusProgramTargetHelper(program,SRCS5,OBJS5,DEPLIBS5,locallib,syslib) +#endif /* ComplexCplusplusProgramTarget_5 */ + +/* + * ComplexProgramTarget_6 - generate rules for compiling and linking the + * program specified by $(OBJS6) and $(SRCS6) and installing the program and + * man page. It should be used to build the third program in Imakefiles + * describing more than one program. + */ +#ifndef ComplexProgramTarget_6 +#define ComplexProgramTarget_6(program,locallib,syslib) @@\ +ProgramTargetHelper(program,SRCS6,OBJS6,DEPLIBS6,locallib,syslib) +#endif /* ComplexProgramTarget_6 */ + +#ifndef ComplexCplusplusProgramTarget_6 +#define ComplexCplusplusProgramTarget_6(program,locallib,syslib) @@\ +CplusplusProgramTargetHelper(program,SRCS6,OBJS6,DEPLIBS6,locallib,syslib) +#endif /* ComplexCplusplusProgramTarget_6 */ + +/* + * ComplexProgramTarget_7 - generate rules for compiling and linking the + * program specified by $(OBJS7) and $(SRCS7) and installing the program and + * man page. It should be used to build the third program in Imakefiles + * describing more than one program. + */ +#ifndef ComplexProgramTarget_7 +#define ComplexProgramTarget_7(program,locallib,syslib) @@\ +ProgramTargetHelper(program,SRCS7,OBJS7,DEPLIBS7,locallib,syslib) +#endif /* ComplexProgramTarget_7 */ + +#ifndef ComplexCplusplusProgramTarget_7 +#define ComplexCplusplusProgramTarget_7(program,locallib,syslib) @@\ +CplusplusProgramTargetHelper(program,SRCS7,OBJS7,DEPLIBS7,locallib,syslib) +#endif /* ComplexCplusplusProgramTarget_7 */ + +/* + * ComplexProgramTarget_8 - generate rules for compiling and linking the + * program specified by $(OBJS8) and $(SRCS8) and installing the program and + * man page. It should be used to build the third program in Imakefiles + * describing more than one program. + */ +#ifndef ComplexProgramTarget_8 +#define ComplexProgramTarget_8(program,locallib,syslib) @@\ +ProgramTargetHelper(program,SRCS8,OBJS8,DEPLIBS8,locallib,syslib) +#endif /* ComplexProgramTarget_8 */ + +#ifndef ComplexCplusplusProgramTarget_8 +#define ComplexCplusplusProgramTarget_8(program,locallib,syslib) @@\ +CplusplusProgramTargetHelper(program,SRCS8,OBJS8,DEPLIBS8,locallib,syslib) +#endif /* ComplexCplusplusProgramTarget_8 */ + +/* + * ComplexProgramTarget_9 - generate rules for compiling and linking the + * program specified by $(OBJS9) and $(SRCS9) and installing the program and + * man page. It should be used to build the third program in Imakefiles + * describing more than one program. + */ +#ifndef ComplexProgramTarget_9 +#define ComplexProgramTarget_9(program,locallib,syslib) @@\ +ProgramTargetHelper(program,SRCS9,OBJS9,DEPLIBS9,locallib,syslib) +#endif /* ComplexProgramTarget_9 */ + +#ifndef ComplexCplusplusProgramTarget_9 +#define ComplexCplusplusProgramTarget_9(program,locallib,syslib) @@\ +CplusplusProgramTargetHelper(program,SRCS9,OBJS9,DEPLIBS9,locallib,syslib) +#endif /* ComplexCplusplusProgramTarget_9 */ + +/* + * ComplexProgramTarget_10 - generate rules for compiling and linking the + * program specified by $(OBJS10) and $(SRCS10) and installing the program and + * man page. It should be used to build the third program in Imakefiles + * describing more than one program. + */ +#ifndef ComplexProgramTarget_10 +#define ComplexProgramTarget_10(program,locallib,syslib) @@\ +ProgramTargetHelper(program,SRCS10,OBJS10,DEPLIBS10,locallib,syslib) +#endif /* ComplexProgramTarget_10 */ + +#ifndef ComplexCplusplusProgramTarget_10 +#define ComplexCplusplusProgramTarget_10(program,locallib,syslib) @@\ +CplusplusProgramTargetHelper(program,SRCS10,OBJS10,DEPLIBS10,locallib,syslib) +#endif /* ComplexCplusplusProgramTarget_10 */ + +#ifndef MoveToBakFile +#define MoveToBakFile(file) -@if [ -f file ]; then set -x; \ @@\ + $(MV) file file.bak; else exit 0; fi +#endif /* MoveToBakFile */ + +#ifndef RMoveToBakFile +#define RMoveToBakFile(file) -@if [ -f file ]; then set -x; \ @@\ + RemoveFile(file.bak); $(MV) file file.bak; \ @@\ + else exit 0; fi +#endif /* RMoveToBakFile */ + +/* + * ServerTargetWithFlags - generate rules to compile, link, and relink a server + */ +#ifndef ServerTargetWithFlags +#define ServerTargetWithFlags(server,subdirs,objects,libs,syslibs,flags) @@\ +AllTarget(ProgramTargetName(server)) @@\ +ProgramTargetName(server): subdirs objects libs @@\ + MoveToBakFile($@) @@\ + LinkRule($@,$(LDOPTIONS),objects,libs $(LDLIBS) syslibs) @@\ + @@\ +Concat(load,server): @@\ + MoveToBakFile(ProgramTargetName(server)) @@\ + LinkRule(ProgramTargetName(server),$(LDOPTIONS),objects,libs $(LDLIBS) syslibs) @@\ + @@\ +loadX:: Concat(load,server) @@\ + @@\ +SentinelProgramTarget(server,subdirs objects libs,objects libs $(LDLIBS) syslibs) @@\ +SentinelLinkTarget(Concat(load,server),server,objects libs $(LDLIBS) syslibs) @@\ +PurifyProgramTarget(server,subdirs objects libs,objects libs $(LDLIBS) syslibs) @@\ +PurifyLinkTarget(Concat(load,server),server,objects libs $(LDLIBS) syslibs) @@\ +ProofProgramTarget(server,subdirs objects libs,objects libs $(LDLIBS) syslibs) @@\ +ProofLinkTarget(Concat(load,server),server,objects libs $(LDLIBS) syslibs) @@\ + @@\ +InstallProgramWithFlags(server,$(BINDIR),flags) @@\ + @@\ +clean:: @@\ + RemoveFile(ProgramTargetName(server)) +#endif /* ServerTargetWithFlags */ + +/* + * ServerTarget - rules to compile, link, and relink a normal server + */ +#ifndef ServerTarget +#define ServerTarget(server,subdirs,objects,libs,syslibs) @@\ +ServerTargetWithFlags(server,subdirs,objects,libs,syslibs,$(_NOOP_)) +#endif /* ServerTarget */ + +#if DoRanlibCmd +#define RanLibrary(args) $(RANLIB) args +#else +#define RanLibrary(args) $(_NULLCMD_) +#endif + +#ifndef LibraryTargetName +#define LibraryTargetName(libname)Concat(lib,libname.a) +#endif + +/* This rule is used for libs in Xserver/Imakefile which are loaded, not + * linked into the core module. Since modules are called libXXXX.a, + * this rule mustn't be overriden by .cf files. + */ +#ifndef ModuleLibraryTargetName +#define ModuleLibraryTargetName(libname)Concat(lib,libname.a) +#endif + +#ifndef LibraryTargetNameSuffix +#define LibraryTargetNameSuffix(libname,suffix)Concat3(lib,libname,suffix.a) +#endif + +#ifndef InstallNamedInline +#define InstallNamedInline(srcname,flags,dest,dstname) $(INSTALL) $(INSTALLFLAGS) flags srcname $(DESTDIR)dest/dstname +#endif + +#ifndef InstallNamedTarget +#define InstallNamedTarget(step,srcname,flags,dest,dstname) @@\ +step:: srcname @@\ + MakeDir($(DESTDIR)dest) @@\ + InstallNamedInline(srcname,flags,dest,dstname) +#endif /* InstallNamedTarget */ + +/* + * InstallNamedTargetNoClobber - Like InstallNamedTarget, but doesn't + * do the install if an installed version already exists. Useful + * for files that might have local customizations that you don't + * want to clobber. Config files are good candidates for this. + */ +#ifndef InstallNamedTargetNoClobber +#define InstallNamedTargetNoClobber(step,srcname,flags,dest,dstname) @@\ +step:: srcname @@\ + MakeDir($(DESTDIR)dest) @@\ + @if [ -f $(DESTDIR)dest/dstname ]; then \ @@\ + echo "Not overwriting existing" $(DESTDIR)dest/dstname; \ @@\ + else set -x; \ @@\ + $(INSTALL) $(INSTALLFLAGS) flags srcname $(DESTDIR)dest/dstname; fi +#endif /* InstallNamedTargetNoClobber */ + +#ifndef InstallTarget +#define InstallTarget(step,file,flags,dest) @@\ +InstallNamedTarget(step,file,flags,dest,file) +#endif /* InstallTarget */ + +#ifndef InstallInline +#define InstallInline(file,flags,dest) InstallNamedInline(file,flags,dest,file) +#endif + +/* + * InstallLibrary - generate rules to install the indicated library. + */ +#ifndef InstallLibrary +#define InstallLibrary(libname,dest) @@\ +install:: LibraryTargetName(libname) @@\ + MakeDir($(DESTDIR)dest) @@\ + $(INSTALL) $(INSTALLFLAGS) $(INSTLIBFLAGS) LibraryTargetName(libname) $(DESTDIR)dest @@\ + RanLibrary($(RANLIBINSTFLAGS) $(DESTDIR)dest/LibraryTargetName(libname)) +#endif /* InstallLibrary */ + + +/* + * InstallDriverSDKLibrary - rule to install Driver SDK library. + * (only used for XFree86). This is a no-op + * rule so that Imakefiles on non-XFree86 systems + * continue to build Makefiles correctly. + */ +#ifndef InstallDriverSDKLibrary +#define InstallDriverSDKLibrary(lib,dir) +#endif + + +/* + * InstallDriverSDKNamedLibrary - rule to install Driver SDK library. + * (only used for XFree86). This is a no-op + * rule so that Imakefiles on non-XFree86 systems + * continue to build Makefiles correctly. + */ +#ifndef InstallDriverSDKNamedLibrary +#define InstallDriverSDKNamedLibrary(lib,dlib,dir) +#endif + + +/* + * InstallDriverSDKLibraryModule - rule to install Driver SDK library module. + * (only used for XFree86). This is a no-op + * rule so that Imakefiles on non-XFree86 systems + * continue to build Makefiles correctly. + */ +#ifndef InstallDriverSDKLibraryModule +#define InstallDriverSDKLibraryModule(lib,dlib,dir) +#endif + + +/* + * MergeIntoInstalledLibrary - generate rules to merge one library into another + */ +#ifndef MergeIntoInstalledLibrary +#define MergeIntoInstalledLibrary(tolib,fromlib) @@\ +install:: fromlib @@\ + $(SCRIPTSRC)/mergelib $(DESTDIR)tolib fromlib +#endif /* MergeIntoInstalledLibrary */ + +/* + * InstallLibraryAlias - generate rules to create a link from one library name + * to another for the purposes of aliasing. + */ +#ifndef InstallLibraryAlias +#define InstallLibraryAlias(libname,alias,dest) @@\ +install:: @@\ + -(cd $(DESTDIR)dest && ( \ @@\ + RemoveFile(LibraryTargetName(alias)); \ @@\ + $(LN) LibraryTargetName(libname) LibraryTargetName(alias))) +#endif /* InstallLibraryAlias */ + + +/* + * InstallLintLibrary - generate rules to install the indicated lint library. + */ +#ifndef InstallLintLibrary +#define InstallLintLibrary(libname,dest) @@\ +InstallTarget(install.ln,Concat(llib-l,libname.ln),$(INSTLIBFLAGS),dest) +#endif /* InstallLintLibrary */ + + +#if !CompressManPages +/* + * InstallManPageLong - generate rules to install the indicated manual page, + * giving it an alternate name. This is used for installing man pages whose + * base name without the .man suffix would normally be longer than 8 characters + * (the limit for using source code control systems on files systems with + * short file names). + */ +#ifndef InstallManPageLong +#define InstallManPageLong(file,destdir,dest) @@\ +BuildInstallHtmlManPage(file,dest,$(MANSUFFIX)) @@\ + @@\ +CppManTarget(file,$(EXTRAMANDEFS)) @@\ + @@\ +InstallNamedTarget(install.man,file.$(MANNEWSUFFIX),$(INSTMANFLAGS),destdir,dest.$(MANSUFFIX)) +#endif /* InstallManPageLong */ + + +/* + * InstallManPageAliases - generate rules to install manual page aliases. + */ +#ifndef InstallManPageAliases +#define InstallManPageAliases(file,destdir,aliases) @@\ +InstallHtmlManPageAliases(file,aliases,$(MANSUFFIX)) @@\ + @@\ +install.man:: @@\ + @(TMP="#tmp.$$$$"; \ @@\ + RemoveFile($${TMP}); \ @@\ + echo .so `basename destdir`/file.$(MANSUFFIX) > $${TMP}; \ @@\ + for i in aliases; do (set -x; \ @@\ + $(INSTALL) $(INSTALLFLAGS) $(INSTMANFLAGS) $${TMP} $(DESTDIR)destdir/$$i.$(MANSUFFIX)); \ @@\ + done; \ @@\ + RemoveFile($${TMP})) +#endif /* InstallManPageAliases */ + + +/* + * InstallGenManPageLong - More general rules for installing manual pages -- + * doesn't assume MANSUFFIX. + */ +#ifndef InstallGenManPageLong +#define InstallGenManPageLong(file,destdir,dest,suffix) @@\ +BuildInstallHtmlManPage(file,dest,suffix) @@\ + @@\ +CppManTarget(file, $(EXTRAMANDEFS)) @@\ + @@\ +install.man:: file.$(MANNEWSUFFIX) @@\ + MakeDir($(DESTDIR)destdir) @@\ + $(INSTALL) -c $(INSTMANFLAGS) file.$(MANNEWSUFFIX) \ @@\ + $(DESTDIR)destdir/dest.suffix +#endif /* InstallGenManPageLong */ + + +/* + * InstallGenManPageAliases - general equivalent of InstallManPageAliases + */ +#ifndef InstallGenManPageAliases +#define InstallGenManPageAliases(file,destdir,suffix,aliases) @@\ +InstallHtmlManPageAliases(file,aliases,suffix) @@\ + @@\ +install.man:: @@\ + @(TMP="#tmp.$$$$"; \ @@\ + RemoveFile($${TMP}); \ @@\ + echo .so `basename destdir`/file.suffix > $${TMP}; \ @@\ + for i in aliases; do (set -x; \ @@\ + $(INSTALL) $(INSTALLFLAGS) $(INSTMANFLAGS) $${TMP} $(DESTDIR)destdir/$$i.suffix); \ @@\ + done; \ @@\ + RemoveFile($${TMP})) +#endif /* InstallGenManPageAliases */ + +#else /* CompressManPages */ + +#ifndef InstallManPageLong +#define InstallManPageLong(file,destdir,dest) @@\ +BuildInstallHtmlManPage(file,dest,$(MANSUFFIX)) @@\ + @@\ +CppManTarget(file, $(EXTRAMANDEFS)) @@\ + @@\ +install.man:: file.$(MANNEWSUFFIX) @@\ + MakeDir($(DESTDIR)destdir) @@\ + $(RM) $(DESTDIR)destdir/dest.$(MANSUFFIX)* @@\ + $(INSTALL) -c $(INSTMANFLAGS) file.$(MANNEWSUFFIX) \ @@\ + $(DESTDIR)destdir/dest.$(MANSUFFIX) @@\ + -$(COMPRESSMANCMD) $(DESTDIR)destdir/dest.$(MANSUFFIX) +#endif + +#ifndef InstallGenManPageLong +#define InstallGenManPageLong(file,destdir,dest,suffix) @@\ +BuildInstallHtmlManPage(file,dest,suffix) @@\ + @@\ +CppManTarget(file, $(EXTRAMANDEFS)) @@\ + @@\ +install.man:: file.$(MANNEWSUFFIX) @@\ + MakeDir($(DESTDIR)destdir) @@\ + $(RM) $(DESTDIR)destdir/dest.suffix* @@\ + $(INSTALL) -c $(INSTMANFLAGS) file.$(MANNEWSUFFIX) \ @@\ + $(DESTDIR)destdir/dest.suffix @@\ + -$(COMPRESSMANCMD) $(DESTDIR)destdir/dest.suffix +#endif + +#ifndef InstallMultipleMan +#define InstallMultipleMan(list,dest) @@\ +install.man:: list @@\ + MakeDir($(DESTDIR)dest) @@\ + @case '${MFLAGS}' in *[i]*) set +e;; esac; \ @@\ + for i in list; do \ @@\ + (MNAME=`echo $$i | cut -f1 -d.`; \ @@\ + set -x; \ @@\ + $(RM) $(DESTDIR)dest/$${MNAME}*; \ @@\ + $(INSTALL) -c $(INSTMANFLAGS) $$i \ @@\ + $(DESTDIR)dest/$${MNAME}.$(MANSUFFIX); \ @@\ + $(COMPRESSMANCMD) $(DESTDIR)dest/$${MNAME}.$(MANSUFFIX)); \ @@\ + done +#endif + +/* + * InstallManPageAliases - install soft links for aliases. + */ +#ifndef InstallManPageAliasesBase +#define InstallManPageAliasesBase(file,destdir,aliases) @@\ +install.man:: @@\ + @(SUFFIX=`echo $(DESTDIR)destdir/file.* | sed -e 's,.*/[^\.]*.,,'`; \ @@\ + for i in aliases; do (set -x; \ @@\ + $(RM) $(DESTDIR)destdir/$$i.*; \ @@\ + (cd $(DESTDIR)destdir; $(LN) file.$${SUFFIX} \ @@\ + $$i.$${SUFFIX})); \ @@\ + done) +#endif + +#ifndef InstallManPageAliases +#define InstallManPageAliases(file,destdir,aliases) @@\ +InstallHtmlManPageAliases(file,aliases,$(MANSUFFIX)) @@\ + @@\ +InstallManPageAliasesBase(file,destdir,aliases) +#endif + + +/* + * InstallGenManPageAliases - install soft links for aliases. + */ +#ifndef InstallGenManPageAliases +#define InstallGenManPageAliases(file,destdir,suffix,aliases) @@\ +InstallHtmlManPageAliases(file,aliases,suffix) @@\ + @@\ +InstallManPageAliasesBase(file,destdir,aliases) +#endif + +#endif /* CompressManPages */ + + +/* + * InstallManPage - generate rules to install the indicated manual page. + */ +#ifndef InstallManPage +#define InstallManPage(file,destdir) @@\ +InstallManPageLong(file,destdir,file) +#endif /* InstallManPage */ + + +/* + * InstallGenManPage - general equivalent of InstallManPage + */ +#ifndef InstallGenManPage +#define InstallGenManPage(file,destdir,suffix) @@\ +InstallGenManPageLong(file,destdir,file,suffix) +#endif /* InstallGenManPage */ + + +/* + * RmanDependency - generate rules to build the rman program if + * this Imakefile is within the source tree. + */ +#ifndef RmanDependency +#ifdef UseInstalled +#define RmanDependency() /**/ +#else +#define RmanDependency() @@\ +NoCmpScript(ProgramTargetName($(RMAN))) @@\ + @@\ +ProgramTargetName($(RMAN)): @@\ + @echo "checking $(RMANBASENAME) over in $(TOP)/config/util first..."; \ @@\ + cd $(TOP)/config/util && $(MAKE) rmanonly; \ @@\ + echo "okay, continuing in $(CURRENT_DIR)" + +#endif /* UseInstalled */ +#endif /* RmanDependency */ + +#ifndef RmanCmdDependency +#ifdef UseInstalled +#define RmanCmdDependency /**/ +#else +#define RmanCmdDependency ProgramTargetName($(RMAN)) +#endif +#endif + +#ifndef BuildInstallHtmlManPage +#if BuildHtmlManPages +#define BuildInstallHtmlManPage(file,dest,suffix) @@\ +AllTarget(dest.suffix.html) @@\ + @@\ +dest.suffix.html: file.$(MANNEWSUFFIX) RmanCmdDependency @@\ + RemoveFiles(dest.suffix.html dest.suffix-html) @@\ + RunProgram(RMAN,$(RMANOPTIONS) < file.$(MANNEWSUFFIX) \ @@\ + > dest.suffix-html) && $(MV) dest.suffix-html $@ @@\ + @@\ +install.man:: dest.suffix.html @@\ + MakeDir($(DESTDIR)$(DOCHTMLDIR)) @@\ + @(SUF=`expr suffix \: '\(.\)'`; \ @@\ + set -x; \ @@\ + $(INSTALL) $(INSTALLFLAGS) $(INSTMANFLAGS) dest.suffix.html $(DESTDIR)$(DOCHTMLDIR)/dest.$$SUF.html) @@\ + @@\ +clean:: @@\ + RemoveFiles(dest.suffix.html dest.suffix-html) +#else +#define BuildInstallHtmlManPage(file,dest,suffix) /**/ +#endif +#endif + +#ifndef InstallHtmlManPageAliases +#if BuildHtmlManPages +#define InstallHtmlManPageAliases(file,aliases,suffix) @@\ +install.man:: file.suffix.html @@\ + MakeDir($(DESTDIR)$(DOCHTMLDIR)) @@\ + @SUF=`expr suffix \: '\(.\)'`; \ @@\ + for i in aliases; do (set -x; \ @@\ + RemoveFile($(DESTDIR)$(DOCHTMLDIR)/$$i.$$SUF.html); \ @@\ + (cd $(DESTDIR)$(DOCHTMLDIR); \ @@\ + $(LN) file.$$SUF.html $$i.$$SUF.html)); \ @@\ + done +#else +#define InstallHtmlManPageAliases(file,aliases,suffix) /**/ +#endif +#endif + +#ifndef HtmlManIndex +#if BuildHtmlManPages +#define HtmlManIndex @@\ +html_index:: @@\ + MakeDir($(DESTDIR)$(DOCHTMLDIR)) @@\ + $(HTMLINDEXCMD) $(DESTDIR)$(DOCHTMLDIR) +#else +#define HtmlManIndex html_index:: +#endif +#endif + + +/* + * ManKeywordsTarget - generate the database used by "man -k". + * This rule updates the index in the directory "manpath", which + * indexes all the manual pages in the section subdirectories under + * it. An update command is defined only on systems that have a + * per MANPATH element index. If the OS supports only one system-wide + * database, we don't update it, because then we can't do cross + * installations or use a non-empty DESTDIR for testing. + */ +#ifndef ManKeywordsTarget +#define ManKeywordsTarget(manpath) man_keywords:: +#endif + +/* + * InstallNamedNonExec - generate rules to install a data file + */ +#ifndef InstallNamedNonExec +#define InstallNamedNonExec(srcname,dstname,dest) @@\ +InstallNamedTarget(install,srcname,$(INSTDATFLAGS),dest,dstname) +#endif /* InstallNamedNonExec */ + + +/* + * InstallDriverSDKNamedNonExec - rule for installing server Driver SDK files. + * (only used for XFree86). This is a no-op + * rule so that Imakefiles on non-XFree86 systems + * continue to build Makefiles correctly. + */ +#ifndef InstallDriverSDKNamedNonExec +#define InstallDriverSDKNamedNonExec(srcname,dstname,dest) +#endif + + +/* + * InstallNonExecFile - generate rules to install a data file + */ +#ifndef InstallNonExecFile +#define InstallNonExecFile(file,dest) @@\ +InstallTarget(install,file,$(INSTDATFLAGS),dest) +#endif /* InstallNonExecFile */ + + +/* + * InstallNonExecFileNoClobber - install a data file once + */ +#ifndef InstallNonExecFileNoClobber +#define InstallNonExecFileNoClobber(file,dest) @@\ +InstallNamedTargetNoClobber(install,file,$(INSTDATFLAGS),dest,file) +#endif /* InstallNonExecFileNoClobber */ + + +/* + * InstallDriverSDKNonExecFile - rule for installing server Driver SDK files. + * (only used for XFree86). This is a no-op + * rule so that Imakefiles on non-XFree86 systems + * continue to build Makefiles correctly. + */ +#ifndef InstallDriverSDKNonExecFile +#define InstallDriverSDKNonExecFile(file,dir) +#endif + + +/* + * InstallNonExec - generate rules to install a data file, but does not + * try to create the destination directory (deprecated) + */ +#ifndef InstallNonExec +#define InstallNonExec(file,dest) @@\ +install:: file @@\ + $(INSTALL) $(INSTALLFLAGS) $(INSTDATFLAGS) file $(DESTDIR)dest +#endif /* InstallNonExec */ + + +/* + * InstallProgramWithFlags - generate rules to install an executable program + * using given install flags. + */ +#ifndef InstallProgramWithFlags +#if StripInstalledPrograms && CrossCompiling +#define InstallProgramWithFlags(program,dest,flags) @@\ +InstallTarget(install,ProgramTargetName(program),$(INSTPGMFLAGS) flags,dest) @@\ + CrossStripCmd $(DESTDIR)dest/ProgramTargetName(program) +#else +#define InstallProgramWithFlags(program,dest,flags) @@\ +InstallTarget(install,ProgramTargetName(program),$(INSTPGMFLAGS) flags,dest) +#endif /* StripInstalledPrograms && CrossCompiling */ +#endif /* InstallProgramWithFlags */ + + +/* + * InstallProgram - generate rules to install an executable program using any + * special install flags set in $(INSTALLFLAGS). + */ +#ifndef InstallProgram +#define InstallProgram(program,dest) @@\ +InstallProgramWithFlags(program,dest,NullParameter) +#endif /* InstallProgram */ + + + +/* + * InstallScript - install a shell script. + */ +#ifndef InstallScript +#define InstallScript(program,dest) @@\ +InstallNamedTarget(install,program.script,$(INSTBINFLAGS),dest,program) +#endif /* InstallScript */ + + +/* + * InstallNamedProg - install a program with renaming and no stripping. + */ +#ifndef InstallNamedProg +#define InstallNamedProg(srcname,dstname,dest) @@\ +InstallNamedTarget(install,srcname,$(INSTBINFLAGS),dest,dstname) +#endif /* InstallNamedProg */ + + +/* + * InstallNamedProgNoClobber - Like InstallNamedProg, but doesn't + * do the install if an installed version already exists. + */ +#ifndef InstallNamedProgNoClobber +#define InstallNamedProgNoClobber(srcname,dstname,dest) @@\ +InstallNamedTargetNoClobber(install,srcname,$(INSTBINFLAGS),dest,dstname) +#endif /* InstallNamedProgNoClobber */ + + +/* + * InstallDriverSDKNamedProg - rule for installing server Driver SDK files. + * (only used for XFree86). This is a no-op + * rule so that Imakefiles on non-XFree86 systems + * continue to build Makefiles correctly. + */ +#ifndef InstallDriverSDKNamedProg +#define InstallDriverSDKNamedProg(srcname,dstname,dest) +#endif + + +/* + * MakeFlagsToShellFlags - set variables before starting a loop. + * makeflags is the set of "make" flags to check. + * shellcmd is the shell command to execute if any of the flags are set. + * + * The usual use of this rule is to translate make's "don't quit on error" + * flags into the equivalent for the shell. To do this, "make -i" always + * becomes "set +e". "make -k" should also turn on "set +e" if the target + * is building subdirectories. That is, subdirectories are independent + * and should appear to be multiple targets, even though they are + * implemented in a loop in a single target. + */ +#ifndef MakeFlagsToShellFlags +#define MakeFlagsToShellFlags(makeflags,shellcmd)\ + for flag in ${MAKEFLAGS} ''; do \ @@\ + case "$$flag" in *=*) ;; --*) ;; *[makeflags]*) shellcmd;; esac; done +#endif + +/* + * MakeNamedTargetSubdir - do make in a subdir. + */ +#ifndef MakeNamedTargetSubdir +#define MakeNamedTargetSubdir(dir,flags,subname)\ + (cd dir && $(MAKE) $(MFLAGS) $(PARALLELMFLAGS) \ @@\ + flags subname) +#endif + +/* + * LinkFileList - link a list of files from one place to another + */ +#ifndef LinkFileList +#define LinkFileList(step,list,dir,sub) @@\ +step:: @@\ + @MakeFlagsToShellFlags(i,set +e); \ @@\ + echo " cd" dir; cd dir && \ @@\ + for i in list; do (set -x; $(LN) -f sub/$$i .); done +#endif + + +/* + * LinkConfDirectoryLong + * + * Make links from opath (usually <ProjectRoot>/lib/X11) to npath + * For example /usr/X11R6/lib/X11/xdm ==> /etc/X11/xdm so that X + * binaries can be mounted from a read-only volume like a CD-ROM; + * but files that may need to be edited can be stored locally on + * read-write media. If someone has an existing installation, be + * careful and move existing files to the new location in /etc. + * XXX Need to make the installation script do this when installing + * binary distributions. + * + * Since the link is used in the installation process, we need to + * make the link relative in order to honor $(DESTDIR) if it is set. + * + * Note: The sed script used here is not completely general. It assumes + * that no elements of the path are '..', and that none start with '.' + * that aren't just '.'. + * + * For a more general solution $(REVPATH) could be used. Even though + * it was intended for something a little different, it does do what is + * required here. + * + */ +#ifndef LinkConfDirectoryLong +#if UseSeparateConfDir && HasSymLinks +#define LinkConfDirectoryLong(mdir,cdir,rdir,ldir,opath,npath) @@\ +install:: @@\ + @MakeFlagsToShellFlags(i,set +e); \ @@\ + if [ -h Concat($(DESTDIR),npath/mdir) ]; then \ @@\ + $(RM) Concat($(DESTDIR),npath/mdir); \ @@\ + fi @@\ + MakeDir(Concat($(DESTDIR),opath/cdir)) @@\ + MakeDir(Concat($(DESTDIR),npath/mdir)) @@\ + @MakeFlagsToShellFlags(i,set +e); \ @@\ + if [ -d Concat($(DESTDIR),opath/cdir) ]; then \ @@\ + RELPATH=`echo opath/cdir | \ @@\ + sed -e 's:^/::' -e 's:[^/.][^/]*:..:'g -e 's:/\.$$::'`; \ @@\ + cd Concat($(DESTDIR),opath/cdir); \ @@\ + if [ -d rdir -a ! -h rdir ]; then \ @@\ + (cd rdir; tar cf - . | \ @@\ + (cd Concat($(DESTDIR),npath/mdir); \ @@\ + tar xf -; exit 0); exit 0); \ @@\ + fi; \ @@\ + $(RM) -r rdir; \ @@\ + $(LN) Concat($${RELPATH},npath/mdir) ldir; \ @@\ + fi +#else +#define LinkConfDirectoryLong(mdir,cdir,rdir,ldir,opath,npath) +#endif +#endif + +#ifndef LinkConfDirectory +#define LinkConfDirectory(mdir,cdir,rdir,ldir) LinkConfDirectoryLong(mdir,cdir,rdir,ldir,$(LIBDIR),$(CONFDIR)) +#endif + +#ifndef LinkVarDirectory +#define LinkVarDirectory(mdir,cdir,rdir,ldir) LinkConfDirectoryLong(mdir,cdir,rdir,ldir,$(LIBDIR),$(VARDIR)) +#endif + +/* + * LinkConfFileLong + * + * Make links from opath (<ProjectRoot>/lib/X11) to npath + * For example /usr/X11R6/lib/X11/xxx ==> /etc/X11/xxx so that X binaries + * can be mounted from a read-only volume like a CD-ROM; + * but files that may need to be edited can be stored locally on + * read-write media. If someone has an existing installation, be + * careful and move existing files to the new location in /etc. + * XXX Need to make the installation script do this when installing + * binary distributions. + * + * Since the link is used in the installation process, we need to + * make the link relative in order to honor $(DESTDIR) if it is set. + */ +#ifndef LinkConfFileLong +#if UseSeparateConfDir && HasSymLinks +#define LinkConfFileLong(cfile,lfile,opath,npath) @@\ +install:: @@\ + MakeDir(Concat($(DESTDIR),opath)) @@\ + MakeDir(Concat($(DESTDIR),npath)) @@\ + @MakeFlagsToShellFlags(i,set +e); \ @@\ + if [ -d Concat($(DESTDIR),opath) ]; then \ @@\ + RELPATH=`echo opath | \ @@\ + sed -e 's:^.::' -e 's:[^/.][^/]*:..:'g`; \ @@\ + cd Concat($(DESTDIR),opath); \ @@\ + if [ -f lfile -a ! -h lfile ]; then \ @@\ + cp -p lfile Concat($(DESTDIR),npath/cfile); \ @@\ + fi; \ @@\ + $(RM) -r lfile; \ @@\ + $(LN) Concat($${RELPATH},npath/cfile) lfile; \ @@\ + fi +#else +#define LinkConfFileLong(cfile,lfile,opath,npath) +#endif +#endif + + +#ifndef LinkConfFile +#define LinkConfFile(cfile,lfile) LinkConfFileLong(cfile,lfile,$(LIBDIR),$(CONFDIR)) +#endif + +/* + * InstallMultipleDestFlags - generate rules to install multiple files at + * once during a particular step in the build using a specific set of install + * flags. + */ +#ifndef InstallMultipleDestFlags +#define InstallMultipleDestFlags(step,list,dest,flags) @@\ +step:: list @@\ + MakeDir($(DESTDIR)dest) @@\ + @MakeFlagsToShellFlags(i,set +e); \ @@\ + for i in list; do \ @@\ + (set -x; $(INSTALL) $(INSTALLFLAGS) flags $$i $(DESTDIR)dest); \ @@\ + done +#endif /* InstallMultipleDestFlags */ + + +/* + * InstallDriverSDKMultipleDestFlags - rule for installing server Driver SDK + * files. (only used for XFree86). This is a no-op + * rule so that Imakefiles on non-XFree86 systems + * continue to build Makefiles correctly. + */ +#ifndef InstallDriverSDKMultipleDestFlags +#define InstallDriverSDKMultipleDestFlags(list,dest,flags) +#endif + + +/* + * InstallMultipleDest - generate rules to install multiple files at once + * during a particular step in the build using any install flags set in + * $(INSTDATFLAGS). + */ +#ifndef InstallMultipleDest +#define InstallMultipleDest(step,list,dest) @@\ +InstallMultipleDestFlags(step,list,dest,$(INSTDATFLAGS)) +#endif /* InstallMultipleDest */ + +/* + * InstallMultiple - generate rules to install multiple files at once + * during the install step of the build using any install flags set in + * $(INSTALLFLAGS). + */ +#ifndef InstallMultiple +#define InstallMultiple(list,dest) @@\ +InstallMultipleDest(install,list,dest) +#endif /* InstallMultiple */ + + +/* + * InstallMultipleFlags - generate rules to install multiple files at once + * during the install step of the build using the given install flags. + */ +#ifndef InstallMultipleFlags +#define InstallMultipleFlags(list,dest,flags) @@\ +InstallMultipleDestFlags(install,list,dest,flags) +#endif /* InstallMultipleFlags */ + + +/* + * InstallMultipleMan - generate rules to install a variety of manual pages + * during the install.man step of the build. + */ +#ifndef InstallMultipleMan +#define InstallMultipleMan(list,dest) @@\ +InstallMultipleDestFlags(install.man,list,dest,$(INSTMANFLAGS)) +#endif /* InstallMultipleMan */ + +/* + * InstallMultipleManSuffix - generate rules to install multiple manual + * pages dufing the install.man step of the build, where + * the target files have the suffix given. + */ +#ifndef InstallMultipleManSuffix +#define InstallMultipleManSuffix(list,dest,suffix) @@\ +install.man:: @@\ + MakeDir($(DESTDIR)dest) @@\ + @MakeFlagsToShellFlags(i,set +e); \ @@\ + for i in list; do \ @@\ + (set -x; $(INSTALL) $(INSTALLFLAGS) $(INSTMANFLAGS) $$i.suffix $(DESTDIR)dest/$$i.$(MANSUFFIX)); \ @@\ + done +#endif /* InstallMultipleManSuffix */ + + +/* + * IncludeMakefile - rule to include another Makefile. + * Must not generate an error or even a warning if the named file + * is not present, since we use this to include Makefile.dep, which + * may not be built yet. + * This is defined non-null iff HasMakefileSafeInclude is YES. + * The double-@ is to ensure no leading spaces on the line. + */ +#ifndef IncludeMakefile +#if HasClearmake +#define IncludeMakefile(file) @@sinclude file +#else +#if HasBsdMake +#define IncludeMakefile(file) @@# dependencies are in .depend +#else +#define IncludeMakefile(file) /**/ +#endif +#endif +#endif + +/* + * DependDependencyStatement - Used by DependDependency to set up the + * most specific dependency, which differs based on whether we support + * a separate Makefile.dep on this platform. + */ +#ifndef DependDependencyStatement +#if HasMakefileSafeInclude +#define DependDependencyStatement() @@\ +DependFileName:: ProgramTargetName($(DEPEND)) +#else +#define DependDependencyStatement() @@\ +depend:: ProgramTargetName($(DEPEND)) +#endif +#endif + +/* + * DependDependency - generate rules to build the makedepend program if + * this Imakefile is within the source tree. + */ +#ifndef DependDependency +#ifdef UseInstalled +#define DependDependency() /**/ +#else +#define DependDependency() @@\ +DependDependencyStatement() @@\ + @@\ +NoCmpScript(ProgramTargetName($(DEPEND))) @@\ + @@\ +ProgramTargetName($(DEPEND)): @@\ + echo "using system-wide depend, continuing in $(CURRENT_DIR)" + +#endif /* UseInstalled */ +#endif /* DependDependency */ + + +/* + * DependTarget - generate rules to compute dependencies for all files listed + * in $(SRCS). + */ +#ifndef DependTarget +#if HasMakefileSafeInclude +#define DependTarget() @@\ +DependDependency() @@\ + @@\ +depend:: DependFileName @@\ + @@\ +DependFileName:: @@\ + RemoveFile($@) @@\ + RunProgram(DEPEND,-f- $(DEPENDFLAGS) -- $(ALLDEFINES) $(DEPEND_DEFINES) -- $(SRCS)) > $@ +#else /* HasMakefileSafeInclude */ +#define DependTarget() @@\ +DependDependency() @@\ + @@\ +depend:: @@\ + RunProgram(DEPEND,$(DEPENDFLAGS) -- $(ALLDEFINES) $(DEPEND_DEFINES) -- $(SRCS)) +#endif /* HasMakefileSafeInclude else */ +#endif /* DependTarget */ + +/* + * DependTarget3 - generate rules to compute dependencies for all files given. + */ +#ifndef DependTarget3 +#if HasMakefileSafeInclude +#define DependTarget3(srcs1,srcs2,srcs3) @@\ +DependDependency() @@\ + @@\ +depend:: DependFileName @@\ + @@\ +DependFileName:: @@\ + RemoveFile($@) @@\ + RunProgram(DEPEND,-f- $(DEPENDFLAGS) -- $(ALLDEFINES) $(DEPEND_DEFINES) -- srcs1) > $@ @@\ + RunProgram(DEPEND,-f- $(DEPENDFLAGS) -- $(ALLDEFINES) $(DEPEND_DEFINES) -- srcs2) >> $@ @@\ + RunProgram(DEPEND,-f- $(DEPENDFLAGS) -- $(ALLDEFINES) $(DEPEND_DEFINES) -- srcs3) >> $@ +#else /* HasMakefileSafeInclude */ +#define DependTarget3(srcs1,srcs2,srcs3) @@\ +DependDependency() @@\ + @@\ +depend:: @@\ + RunProgram(DEPEND,$(DEPENDFLAGS) -- $(ALLDEFINES) $(DEPEND_DEFINES) -- srcs1) @@\ + RunProgram(DEPEND,-a $(DEPENDFLAGS) -- $(ALLDEFINES) $(DEPEND_DEFINES) -- srcs2) @@\ + RunProgram(DEPEND,-a $(DEPENDFLAGS) -- $(ALLDEFINES) $(DEPEND_DEFINES) -- srcs3) +#endif /* HasMakefileSafeInclude else */ +#endif /* DependTarget3 */ + + +/* + * CleanTarget - generate rules to remove any garbage files + */ +#ifndef CleanTarget +#define CleanTarget() @@\ +clean:: @@\ + $(RM) FilesToClean ExtraFilesToClean DocFilesToClean "#"* @@\ + @@\ +ProofCleanTarget() +#endif /* CleanTarget */ + + +/* + * TagsTarget - generate rules to compute tags files for C source code. + */ +#ifndef TagsTarget +#define TagsTarget() @@\ +tags:: @@\ + $(TAGS) -w *.[ch] @@\ + $(TAGS) -xw *.[ch] > TAGS +#endif /* TagsTarget */ + + +/* + * ImakeDependency - generate rules to compile imake if this Imakefile is + * within the source tree. + */ +#ifndef ImakeDependency +#ifdef UseInstalled +#define ImakeDependency(target) /**/ +#else +#define ImakeDependency(target) @@\ +target:: ProgramTargetName($(IMAKE)) @@\ + @@\ +NoCmpScript(ProgramTargetName($(IMAKE)) $(IMAKE).Osuf) @@\ + @@\ +ProgramTargetName($(IMAKE)) $(IMAKE).Osuf: @@\ + echo "using system-wide imake, continuing in $(CURRENT_DIR)" +#endif /* UseInstalled */ +#endif /* ImakeDependency */ + + +/* + * BuildMakefileTarget - generate rules to build a Makefile from an Imakefile + * and any special imake flags. This is generally done automatically by the + * template or by any special Imakefiles. The first argument exists just + * because imakeflags is usually empty and some preprocessors will complain + * if an empty argument is passed as the sole argument to a macro. + */ +#ifndef BuildMakefileTarget +#define BuildMakefileTarget(notused,imakeflags) @@\ +ImakeDependency(Makefile) @@\ + @@\ +Makefile:: @@\ + RMoveToBakFile(Makefile) @@\ + $(IMAKE_CMD) -DTOPDIR=$(TOP) -DCURDIR=$(CURRENT_DIR) imakeflags + +#endif /* BuildMakefileTarget */ + + +/* + * MakefileTarget - generate rules to build a normal Makefile. + */ +#ifndef MakefileTarget +#define MakefileTarget() @@\ +BuildMakefileTarget(Imakefile,NullParameter) +#endif /* MakefileTarget */ + + +/* + * LibMkdir - helper for creating library object subdirectories + */ +#ifndef LibMkdir +#define LibMkdir(dir) DirFailPrefix@if [ -d dir ]; then exit 0; else set -x; mkdir dir; fi +#endif + +#ifndef LibMkdirLinkSubdirs +#define LibMkdirLinkSubdirs(dir) DirFailPrefix@if [ -d dir ]; then \ @@\ + exit 0; \ @@\ + else \ @@\ + echo "mkdir dir"; mkdir dir; \ @@\ + for i in $(SUBDIRS); do \ @@\ + j=`echo "$$i" | sed -e 's;[^/]\{1,\};..;g'`; \ @@\ + if [ ! -d "dir/`dirname $$i`" ]; then \ @@\ + $(MKDIRHIER) "dir/`dirname $$i`"; \ @@\ + fi; \ @@\ + echo $(LN) "$$j/$$i/dir" "dir/$$i"; \ @@\ + $(LN) "$$j/$$i/dir" "dir/$$i"; \ @@\ + done; \ @@\ + fi +#endif + +/* + * LibCleanDir - helper for cleaning library object subdirectories + */ +#ifndef LibCleanDir +#define LibCleanDir(dir) -@if [ -d dir ]; then \ @@\ + set -x; $(RM) -r dir; else exit 0; fi +#endif + +/* + * LintLibReferences - variables for lint libraries + */ +#ifndef LintLibReferences +#define LintLibReferences(varname,libname,libsource) @@\ +Concat(LINT,varname) = _UseCat($(LINTLIBDIR)/llib-l,libsource/llib-,libname.ln) +#endif + + +/* + * UnsharedLibReferences - variables for unshared libraries + */ +#ifndef UnsharedLibReferences +#define UnsharedLibReferences(varname,libname,libsource) @@\ +ProjectUnsharedLibReferences(varname,libname,libsource,$(BUILDLIBDIR)) +#endif + +/* + * ProjectUnsharedLibReferences - variables for unshared libraries + */ +#ifndef ProjectUnsharedLibReferences +#define ProjectUnsharedLibReferences(varname,libname,libsource,buildlibdir) @@\ +Concat3(DEP,varname,LIB) = _UseCat($(USRLIBDIR)/,buildlibdir/,LibraryTargetName(libname)) @@\ +Concat(varname,LIB) = LoaderLibPrefix Concat(-l,libname) @@\ +LintLibReferences(varname,libname,libsource) +#endif + +/* + * SharedLibDependencies - shared library dependencies + */ +#ifndef SharedLibDependencies +#define SharedLibDependencies(libname,libsource,revname) /**/ +#endif + +/* + * SharedDSLibDependencies - shared library dependencies with data separation + */ +#ifndef SharedDSLibDependencies +#define SharedDSLibDependencies(libname,libsource,revname) /**/ +#endif + +/* + * SharedLibReferences - variables for shared libraries + */ +#ifndef SharedLibReferences +#define SharedLibReferences(varname,libname,libsource,revname,rev) @@\ +revname = rev @@\ +Concat3(DEP,varname,LIB) = SharedLibDependencies(libname,libsource,revname) @@\ +Concat(varname,LIB) = LoaderLibPrefix Concat(-l,libname) @@\ +LintLibReferences(varname,libname,libsource) +#endif + +/* + * SharedDSLibReferences - variables for shared libraries with data separation + */ +#ifndef SharedDSLibReferences +#define SharedDSLibReferences(varname,libname,libsource,revname,rev) @@\ +revname = rev @@\ +Concat3(DEP,varname,LIB) = SharedDSLibDependencies(libname,libsource,revname) @@\ +Concat(varname,LIB) = LoaderLibPrefix Concat(-l,libname) @@\ +LintLibReferences(varname,libname,libsource) +#endif + +/* + * CPPOnlyCompile - run C compiler's preprocessor only + */ +#ifndef CPPOnlyCompile +#define CPPOnlyCompile(src,options) RemoveFile($@) @@\ + ClearmakeOSName \ + $(CC) -E $(CFLAGS) options src > $@ +#endif + +/* + * ObjectCompile - compile fragment for a normal object file + */ +#ifndef ObjectCompile +#define ObjectCompile(options) RemoveFile($@) @@\ + ClearmakeOSName \ + $(CC) -c $(CFLAGS) options $*.c +#endif + +/* + * CompileCToAsm - compile C file to assembler + */ +#ifndef CompileCToAsm +#define CompileCToAsm(options) RemoveFile($@) @@\ + ClearmakeOSName \ + $(CC) -S $(CFLAGS) options $*.c +#endif + + +/* + * CompileCplusplusToAsm - compile C++ file to assembler + */ +#ifndef CompileCplusplusToAsm +#define CompileCplusplusToAsm(options) RemoveFile($@) @@\ + ClearmakeOSName \ + $(CC) -S $(CFLAGS) options $*.cc +#endif + + +#ifndef ObjectCplusplusCompile +#define ObjectCplusplusCompile(options) RemoveFile($@) @@\ + ClearmakeOSName \ + $(CXX) -c $(CXXFLAGS) options $*.CCsuf +#endif + +/* + * NormalLibObjCompile - compile fragment for a normal library object file + */ +#ifndef NormalLibObjCompile +#define NormalLibObjCompile(options) ObjectCompile(options) +#endif + +#ifndef NormalRelocLibObjCompile +# if !StaticNeedsPicForShared +# define NormalRelocLibObjCompile(options) NormalLibObjCompile(options) +# else +# define NormalRelocLibObjCompile(options) NormalLibObjCompile(options $(PICFLAGS)) +# endif +#endif + +#ifndef NormalLibObjCplusplusCompile +#define NormalLibObjCplusplusCompile(options) ObjectCplusplusCompile(options) +#endif + +/* + * NormalSharedLibObjCompile - compile fragment for shared objects + */ +#ifndef NormalSharedLibObjCompile +#define NormalSharedLibObjCompile(options) NormalLibObjCompile(options $(SHLIBDEF) $(SHAREDCODEDEF) $(PICFLAGS)) +#endif + +#ifndef NormalSharedLibObjCplusplusCompile +#define NormalSharedLibObjCplusplusCompile(options) NormalLibObjCplusplusCompile(options $(SHLIBDEF) $(SHAREDCODEDEF) $(CXXPICFLAGS)) +#endif + +/* + * LibObjCompile - compile fragment for unshared/profiled/debugged objects + */ +#ifndef LibObjCompile +#if HasGcc || HasGcc2 +#define LibObjCompile(dir,options) RemoveFiles($@ dir/$@) @@\ + ClearmakeOSName \ + $(CC) -c $(CCOPTIONS) $(THREADS_CFLAGS) $(ALLDEFINES) \ + options $*.c -o dir/$@ +#else +#define LibObjCompile(dir,options) RemoveFiles($@ dir/$@) @@\ + ClearmakeOSName \ + $(CC) -c $(CCOPTIONS) $(THREADS_CFLAGS) $(ALLDEFINES) \ + options $*.c @@\ + $(MV) $@ dir/$@ +#endif +#endif + +#ifndef LibObjCplusplusCompile +#if HasGcc || HasGcc2 +#define LibObjCplusplusCompile(dir,options) RemoveFiles($@ dir/$@) @@\ + ClearmakeOSName \ + $(CXX) -c $(CXXOPTIONS) $(THREADS_CXXFLAGS) $(CXXDEFINES) \ + options $*.CCsuf -o dir/$@ +#else +#define LibObjCplusplusCompile(dir,options) RemoveFiles($@ dir/$@) @@\ + ClearmakeOSName \ + $(CXX) -c $(CXXOPTIONS) $(THREADS_CXXFLAGS) $(CXXDEFINES) \ + options $*.CCsuf @@\ + $(MV) $@ dir/$@ +#endif +#endif + +/* + * DebuggedLibObjCompile - compile fragment for debugged objects + */ +#ifndef DebuggedLibObjCompile +#define DebuggedLibObjCompile(options) LibObjCompile(debugger,DebuggableCDebugFlags options) +#endif + +#ifndef DebuggedLibObjCplusplusCompile +#define DebuggedLibObjCplusplusCompile(options) LibObjCplusplusCompile(debugger,DebuggableCplusplusDebugFlags options) +#endif + +/* + * ProfiledLibObjCompile - compile fragment for profiled objects + */ +#ifndef ProfiledLibObjCompile +#define ProfiledLibObjCompile(options) LibObjCompile(profiled,ProfiledCDebugFlags options) +#endif + +#ifndef ProfiledLibObjCplusplusCompile +#define ProfiledLibObjCplusplusCompile(options) LibObjCplusplusCompile(profiled,ProfiledCplusplusDebugFlags options) +#endif + +/* + * UnsharedLibObjCompile - compile fragment for unshared objects + */ +#ifndef UnsharedLibObjCompile +#define UnsharedLibObjCompile(options) LibObjCompile(unshared,$(CDEBUGFLAGS) $(CLIBDEBUGFLAGS) options) +#endif + +#ifndef UnsharedLibObjCplusplusCompile +#define UnsharedLibObjCplusplusCompile(options) LibObjCplusplusCompile(unshared,$(CXXDEBUGFLAGS) $(CXXLIBDEBUGFLAGS) options) +#endif + +/* + * SharedLibObjCompile - compile fragment for shared objects + */ +#ifndef SharedLibObjCompile +#define SharedLibObjCompile(options) LibObjCompile(shared,options $(SHLIBDEF) $(SHAREDCODEDEF) $(PICFLAGS) $(CDEBUGFLAGS) $(CLIBDEBUGFLAGS)) +#endif + +/* + * NormalLibraryObjectRule - for simple libraries + */ +#ifndef NormalLibraryObjectRule +#define NormalLibraryObjectRule() @@\ +.c.Osuf: @@\ + NormalLibObjCompile($(_NOOP_)) +#endif /* NormalLibraryObjectRule */ + +#ifndef NormalCplusplusObjectRule +#define NormalCplusplusObjectRule() @@\ +.CCsuf.Osuf: @@\ + NormalLibObjCplusplusCompile($(_NOOP_)) +#endif + +#ifndef NormalFortranObjectRule +#define NormalFortranObjectRule() @@\ +.f.Osuf: @@\ + RemoveFile($@) @@\ + ClearmakeOSName \ + $(FC) -c $(FCFLAGS) $*.f +#endif + +/* + * SpecialObjectRule - generate rules to compile a file with special flags. + */ +#ifndef SpecialObjectRule +#define SpecialObjectRule(objs,depends,options) @@\ +objs: depends @@\ + ObjectCompile(options) +#endif /* SpecialObjectRule */ + +#ifndef SpecialCplusplusObjectRule +#define SpecialCplusplusObjectRule(baseobj,basedep,options) @@\ +baseobj.Osuf: basedep.CCsuf @@\ + ObjectCplusplusCompile(options) +#endif /* SpecialCplusplusObjectRule */ + +/* + * SpecialCObjectRule - generate rules to compile a C file with special flags. + * also handles CodeCenter rules + */ +#ifndef SpecialCObjectRule +#define SpecialCObjectRule(basename,depends,options) @@\ +SpecialObjectRule(basename.Osuf,basename.c depends,options) @@\ + @@\ +basename.i: basename.c depends @@\ + CPPOnlyCompile(basename.c,options) @@\ + @@\ +basename.s: basename.c depends @@\ + CompileCToAsm(options) @@\ + @@\ +CenterLoadTarget(debug_src,basename.c,NullParameter,$(ALLDEFINES) options) +#endif /* SpecialCObjectRule */ + + +#ifndef ObjectFromSpecialSource +#define ObjectFromSpecialSource(dst,src,flags) @@\ +NoConfigRec(dst.c) @@\ + @@\ +dst.c: src.c @@\ + RemoveFile($@) @@\ + $(LN) $? $@ @@\ + @@\ +SpecialCObjectRule(dst,NullParameter,flags) @@\ + @@\ +includes:: dst.c @@\ + @@\ +depend:: dst.c @@\ + @@\ +clean:: @@\ + RemoveFile(dst.c) +#endif /* ObjectFromSpecialSource */ + +#ifndef CPPOnlyAsm +#define CPPOnlyAsm(basename,options) RemoveFile(basename.i) @@\ + $(CPP) AsmDefines $(DEFINES) $(INCLUDES) options basename.S | \ @@\ + grep -v '^\#' > basename.i +#endif + +#ifndef AssembleObject +#define AssembleObject(basename,flags) CPPOnlyAsm(basename,flags) @@\ + RemoveFile(basename.o) @@\ + $(AS) -o basename.o basename.i @@\ + RemoveFile(basename.i) +#endif + +#ifndef NormalAsmObjectRule +#define NormalAsmObjectRule() @@\ +.S.o: @@\ + AssembleObject($*,$(_NOOP_)) @@\ + @@\ +.S.i: @@\ + CPPOnlyAsm($*,$(_NOOP_)) +#endif + +#ifndef ObjectFromSpecialAsmSource +#define ObjectFromSpecialAsmSource(dst,src,flags) @@\ +dst.S: src.S @@\ + RemoveFile($@) @@\ + $(LN) $? $@ @@\ + @@\ +dst.o: dst.S @@\ + AssembleObject(dst,flags) @@\ + @@\ +dst.i: dst.S @@\ + CPPOnlyAsm(dst,flags) @@\ + @@\ +depend:: dst.S @@\ + @@\ +clean:: @@\ + RemoveFile(dst.S) +#endif + +#ifndef ObjectFromAsmSource +#define ObjectFromAsmSource(src,flags) @@\ + @@\ +src.o: src.S @@\ + AssembleObject(src,flags) @@\ + @@\ +src.i: src.S @@\ + CPPOnlyAsm(src,flags) @@\ + @@\ +depend:: src.S +#endif + +#ifndef SwitchYYPrefix +#define SwitchYYPrefix(in,out,prefix) \ + sed 's/yy/prefix/g' in | sed 's/__REALLY_YY__/yy/' > out && RemoveFile(in) +#endif + +#ifndef LexFilePrefix +#define LexFilePrefix(file,prefix) @@\ +file.c: file.l @@\ + ClearmakeOSName \ + $(LEX) $(LFLAGS) file.l @@\ + SwitchYYPrefix(lex.yy.c,file.c,prefix) @@\ + @@\ +depend:: file.c @@\ + @@\ +clean:: @@\ + RemoveFiles(lex.yy.c file.c) +#endif + +#ifndef LexFileExplicit +#if HasClearmake /* provide a place to hang ClearmakeOSName */ +#define LexFileExplicit(file) @@\ +file.c: file.l @@\ + ClearmakeOSName \ + $(LEX) $(LFLAGS) file.l @@\ + $(MV) lex.yy.c file.c +#else +#define LexFileExplicit(file) /* the default rule is fine */ +#endif +#endif + +#ifndef LexFile +#define LexFile(file) @@\ +LexFileExplicit(file) @@\ + @@\ +depend:: file.c @@\ + @@\ +clean:: @@\ + RemoveFiles(lex.yy.c file.c) +#endif /* LexFile */ + + +#ifndef M4File +#define M4File(file,includes) @@\ +file: file.m4 includes @@\ + RemoveFile(file) @@\ + $(M4) $(M4FLAGS) file.m4 >file @@\ + @@\ +depend:: file @@\ + @@\ +clean:: @@\ + RemoveFile(file) +#endif /* M4File */ + +#ifndef YaccFilePrefix +#if HasGnuMake +#define YaccFilePrefix(file,flags,prefix) @@\ +depend:: file.c @@\ + @@\ +file.h: file.c @@\ + @@\ +file.c: file.y @@\ + ClearmakeOSName \ + $(YACC) flags file.y @@\ + SwitchYYPrefix(y.tab.c,file.c,prefix) @@\ + @if [ -f y.tab.h ]; then set -x; SwitchYYPrefix(y.tab.h,file.h,prefix); \@@\ + else exit 0; fi @@\ + @@\ +clean:: @@\ + RemoveFiles(y.tab.c y.tab.h file.h file.c) +#else +#define YaccFilePrefix(file,flags,prefix) @@\ +depend:: file.c @@\ + @@\ +file.h file.c: file.y @@\ + ClearmakeOSName \ + $(YACC) flags file.y @@\ + SwitchYYPrefix(y.tab.c,file.c,prefix) @@\ + @if [ -f y.tab.h ]; then set -x; SwitchYYPrefix(y.tab.h,file.h,prefix); \ @@\ + else exit 0; fi @@\ + @@\ +clean:: @@\ + RemoveFiles(y.tab.c y.tab.h file.h file.c) +#endif +#endif /* YaccFile */ + +#ifndef YaccFile +#if HasGnuMake +#define YaccFile(file,flags) @@\ +depend:: file.c @@\ + @@\ +file.h: file.c @@\ + @@\ +file.c: file.y @@\ + ClearmakeOSName \ + $(YACC) flags file.y @@\ + $(MV) y.tab.c file.c @@\ + @if [ -f y.tab.h ]; then set -x; $(MV) y.tab.h file.h; \ @@\ + else exit 0; fi @@\ + @@\ +clean:: @@\ + RemoveFiles(y.tab.c y.tab.h file.h file.c) +#else +#define YaccFile(file,flags) @@\ +depend:: file.c @@\ + @@\ +file.h file.c: file.y @@\ + ClearmakeOSName \ + $(YACC) flags file.y @@\ + $(MV) y.tab.c file.c @@\ + @if [ -f y.tab.h ]; then set -x; $(MV) y.tab.h file.h; \ @@\ + else exit 0; fi @@\ + @@\ +clean:: @@\ + RemoveFiles(y.tab.c y.tab.h file.h file.c) +#endif +#endif /* YaccFile */ + +#ifndef YaccFileNoFlags +#define YaccFileNoFlags(file) @@\ +depend:: file.c @@\ + @@\ +file.c: file.y @@\ + ClearmakeOSName \ + $(YACC) file.y @@\ + $(MV) y.tab.c file.c @@\ + @@\ +clean:: @@\ + RemoveFiles(y.tab.c file.c) +#endif /* YaccFileNoFlags */ + + +#ifndef MakeLibrary +#define MakeLibrary(libname,objlist) $(AR) libname objlist +#endif + +#ifndef LinkBuildLibrary +#ifdef UseInstalled +#define LinkBuildLibrary(lib) $(_NULLCMD_) +#else +#define LinkBuildLibrary(lib) MakeDir($(BUILDLIBDIR)) @@\ + RemoveFile($(BUILDLIBDIR)/lib) @@\ + cd $(BUILDLIBDIR) && $(LN) $(BUILDLIBTOP)/$(CURRENT_DIR)/lib . +#endif +#endif /* LinkBuildLibrary */ + +#ifndef LinkBuildLibraryMaybe +#ifdef UseInstalled +#define LinkBuildLibraryMaybe(lib,doit) $(_NULLCMD_) +#else +#define LinkBuildLibraryMaybe(lib,doit) MakeDir($(BUILDLIBDIR)) @@\ + @if doit; then (set -x; \ @@\ + RemoveFile($(BUILDLIBDIR)/lib); \ @@\ + cd $(BUILDLIBDIR) && $(LN) $(BUILDLIBTOP)/$(CURRENT_DIR)/lib .); fi +#endif +#endif /* LinkBuildLibraryMaybe */ + +#ifndef _LinkBuildLibrary /* will get redefined elsewhere */ +#define _LinkBuildLibrary(lib) $(_NULLCMD_) +#endif /* _LinkBuildLibrary */ + +#ifndef LinkBuildSonameLibrary +#ifdef UseInstalled +#define LinkBuildSonameLibrary(lib) true +#else +#define LinkBuildSonameLibrary(lib) MakeDirInline($(BUILDLIBDIR));\ @@\ + (set -x; RemoveFile($(BUILDLIBDIR)/lib);\ @@\ + (cd $(BUILDLIBDIR) && $(LN) $(BUILDLIBTOP)/$(CURRENT_DIR)/lib .)) +#endif +#endif /* LinkBuildSonameLibrary */ + +#ifndef LinkBuildLibraryInline +#define LinkBuildLibraryInline(lib) LinkBuildSonameLibrary(lib) +#endif /* LinkBuildLibraryInline */ + +/* + * NormalLibraryTarget - generate rules to create a library. + */ +#ifndef NormalLibraryTarget +#define NormalLibraryTarget(libname,objlist) @@\ +AllTarget(LibraryTargetName(libname)) @@\ + @@\ +LibraryTargetName(libname): objlist $(EXTRALIBRARYDEPS) @@\ + RemoveFile($@) @@\ + MakeLibrary($@,objlist) @@\ + RanLibrary($@) @@\ + _LinkBuildLibrary($@) +#endif /* NormalLibraryTarget */ + + +/* + * NormalLibraryTarget2 - generate rules to create a library in two steps. + * This is used to create libraries with large numbers of files. + */ +#ifndef NormalLibraryTarget2 +#define NormalLibraryTarget2(libname,objlist1,objlist2) @@\ +AllTarget(LibraryTargetName(libname)) @@\ + @@\ +LibraryTargetName(libname): objlist1 objlist2 $(EXTRALIBRARYDEPS) @@\ + RemoveFile($@) @@\ + MakeLibrary($@,objlist1) @@\ + MakeLibrary($@,objlist2) @@\ + RanLibrary($@) @@\ + _LinkBuildLibrary($@) +#endif /* NormalLibraryTarget2 */ + + +/* + * NormalLibraryTarget3 - generate rules to create a library in three steps. + * This is used to create libraries with very large numbers of files. + */ +#ifndef NormalLibraryTarget3 +#define NormalLibraryTarget3(libname,objlist1,objlist2,objlist3) @@\ +AllTarget(LibraryTargetName(libname)) @@\ + @@\ +LibraryTargetName(libname): objlist1 objlist2 objlist3 $(EXTRALIBRARYDEPS) @@\ + RemoveFile($@) @@\ + MakeLibrary($@,objlist1) @@\ + MakeLibrary($@,objlist2) @@\ + MakeLibrary($@,objlist3) @@\ + RanLibrary($@) @@\ + _LinkBuildLibrary($@) +#endif /* NormalLibraryTarget3 */ + + +/* + * NormalDepLibraryTarget - generate rules to create a library. + */ +#ifndef NormalDepLibraryTarget +#define NormalDepLibraryTarget(libname,deplist,objlist) @@\ +AllTarget(LibraryTargetName(libname)) @@\ + @@\ +LibraryTargetName(libname): deplist $(EXTRALIBRARYDEPS) @@\ + RemoveFile($@) @@\ + MakeLibrary($@,objlist) @@\ + RanLibrary($@) @@\ + _LinkBuildLibrary($@) +#endif /* NormalDepLibraryTarget */ + + +/* + * UnsharedLibraryTarget - generate rules to create a library. + */ +#ifndef UnsharedLibraryTarget +#define UnsharedLibraryTarget(libname,objlist,down,up) @@\ +AllTarget(LibraryTargetName(libname)) @@\ + @@\ +LibraryTargetName(libname): objlist $(EXTRALIBRARYDEPS) @@\ + RemoveFile($@) @@\ + @(set -x; cd down && MakeLibrary(up/$@,objlist)) || exit 1; @@\ + RanLibrary($@) @@\ + _LinkBuildLibrary($@) +#endif /* UnsharedLibraryTarget */ + + +/* + * UnsharedLibraryTarget3 - generate rules to create a library in three steps. + * This is used to create libraries with very large numbers of files. + */ +#ifndef UnsharedLibraryTarget3 +#define UnsharedLibraryTarget3(libname,objlist1,objlist2,objlist3,down,up) @@\ +AllTarget(LibraryTargetName(libname)) @@\ + @@\ +LibraryTargetName(libname): objlist1 objlist2 objlist3 $(EXTRALIBRARYDEPS) @@\ + RemoveFile($@) @@\ + (cd down && MakeLibrary(up/$@,objlist1)) @@\ + (cd down && MakeLibrary(up/$@,objlist2)) @@\ + (cd down && MakeLibrary(up/$@,objlist3)) @@\ + RanLibrary($@) @@\ + _LinkBuildLibrary($@) +#endif /* UnsharedLibraryTarget3 */ + + +/* + * SubdirLibraryRule - + */ +#ifndef SubdirLibraryRule +#define SubdirLibraryRule(objlist) @@\ +all:: DONE @@\ + @@\ +DONE: objlist @@\ + RemoveFile($@) @@\ + touch $@ @@\ + @@\ +clean:: @@\ + RemoveFile(DONE) +#endif /* SubdirLibraryRule */ + + +/* + * ProfiledLibraryTarget - generate rules to create a profiled library. + */ +#ifndef ProfiledLibraryTarget +#define ProfiledLibraryTarget(libname,objlist) @@\ +AllTarget(LibraryTargetNameSuffix(libname,_p)) @@\ + @@\ +LibraryTargetNameSuffix(libname,_p): objlist $(EXTRALIBRARYDEPS) @@\ + RemoveFile($@) @@\ + cd profiled && MakeLibrary(../$@,objlist) @@\ + RanLibrary($@) + +#endif /* ProfiledLibraryTarget */ + + +/* + * ProfiledDepLibraryTarget - generate rules to create a profiled library. + */ +#ifndef ProfiledDepLibraryTarget +#define ProfiledDepLibraryTarget(libname,deplist,objlist) @@\ +AllTarget(LibraryTargetNameSuffix(libname,_p)) @@\ + @@\ +LibraryTargetNameSuffix(libname,_p): deplist $(EXTRALIBRARYDEPS) @@\ + RemoveFile($@) @@\ + MakeLibrary($@,objlist) @@\ + RanLibrary($@) + +#endif /* ProfiledDepLibraryTarget */ + + +/* + * DebuggedLibraryTarget - generate rules to create a debuggable library. + */ +#ifndef DebuggedLibraryTarget +#define DebuggedLibraryTarget(libname,objlist) @@\ +AllTarget(LibraryTargetNameSuffix(libname,_d)) @@\ + @@\ +LibraryTargetNameSuffix(libname,_d): objlist $(EXTRALIBRARYDEPS) @@\ + RemoveFile($@) @@\ + cd debugger && MakeLibrary(../$@,objlist) @@\ + RanLibrary($@) + +#endif /* DebuggedLibraryTarget */ + + +/* + * DebuggedDepLibraryTarget - generate rules to create a debuggable library. + */ +#ifndef DebuggedDepLibraryTarget +#define DebuggedDepLibraryTarget(libname,deplist,objlist) @@\ +AllTarget(LibraryTargetNameSuffix(libname,_d)) @@\ + @@\ +LibraryTargetNameSuffix(libname,_d): deplist $(EXTRALIBRARYDEPS) @@\ + RemoveFile($@) @@\ + MakeLibrary($@,objlist) @@\ + RanLibrary($@) + +#endif /* DebuggedDepLibraryTarget */ + + +/* + * AliasedLibraryTarget - generate rules to link one library to another. + */ +#ifndef AliasedLibraryTarget +#define AliasedLibraryTarget(libname,alias) @@\ +AllTarget(LibraryTargetName(alias)) @@\ + @@\ +LibraryTargetName(alias): LibraryTargetName(libname) @@\ + RemoveFile($@) @@\ + $(LN) LibraryTargetName(libname) $@ @@\ + @@\ +clean:: @@\ + RemoveFile(LibraryTargetName(alias)) +#endif /* AliasedLibraryTarget */ + + +/* + * NormalRelocatableTarget - generate rules to produce a relocatable object + * file instead of a library. + */ +#ifndef NormalRelocatableTarget +#define NormalRelocatableTarget(objname,objlist) @@\ +AllTarget(objname.Osuf) @@\ + @@\ +objname.Osuf: objlist $(EXTRALIBRARYDEPS) @@\ + RemoveFile($@) @@\ + $(LD) $(LDCOMBINEFLAGS) objlist -o $@ +#endif /* NormalRelocatableTarget */ + + +/* + * NormalDepRelocatableTarget - generate rules to produce a relocatable object + * file instead of a library. + */ +#ifndef NormalDepRelocatableTarget +#define NormalDepRelocatableTarget(objname,deplist,objlist) @@\ +AllTarget(objname.Osuf) @@\ + @@\ +objname.Osuf: deplist $(EXTRALIBRARYDEPS) @@\ + RemoveFile($@) @@\ + $(LD) $(LDCOMBINEFLAGS) objlist -o $@ +#endif /* NormalDepRelocatableTarget */ + + +/* + * ProfiledRelocatableTarget - generate rules to produce a profiled relocatable + * object file instead of a library. + */ +#ifndef ProfiledRelocatableTarget +#define ProfiledRelocatableTarget(objname,objlist) @@\ +AllTarget(Concat(objname,_p.Osuf)) @@\ + @@\ +Concat(objname,_p.Osuf): objlist $(EXTRALIBRARYDEPS) @@\ + RemoveFile($@) @@\ + $(LD) -X -r objlist -o $@ + +#endif /* ProfiledRelocatableTarget */ + + +/* + * DebuggedRelocatableTarget - generate rules to produce a debuggable + * relocatable object file instead of a library. + */ +#ifndef DebuggedRelocatableTarget +#define DebuggedRelocatableTarget(objname,objlist) @@\ +AllTarget(Concat(objname,_d.Osuf)) @@\ + @@\ +Concat(objname,_d.Osuf): objlist $(EXTRALIBRARYDEPS) @@\ + RemoveFile($@) @@\ + $(LD) -X -r objlist -o $@ + +#endif /* DebuggedRelocatableTarget */ + + +/* + * LintLibraryTarget - generate rules to create a lint library. Note that the + * lint library is always forced to be newer than the library itself. + */ +#ifndef LintLibraryTarget +#define LintLibraryTarget(libname,srclist) @@\ +lintlib:: Concat(llib-l,libname.ln) @@\ + @@\ +Concat(llib-l,libname.ln): srclist $(EXTRALIBRARYDEPS) @@\ + RemoveFile($@) @@\ + $(LINT) Concat($(LINTLIBFLAG),libname) $(LINTFLAGS) srclist +#endif /* LintLibraryTarget */ + + +/* + * NormalLintTarget - generate rules to lint a set of sources. + */ +#ifndef NormalLintTarget +#define NormalLintTarget(srclist) @@\ +lint: @@\ + $(LINT) $(LINTFLAGS) srclist $(LINTLIBS) @@\ +lint1: @@\ + $(LINT) $(LINTFLAGS) $(FILE) $(LINTLIBS) +#endif /* NormalLintTarget */ + + +/* + * LintTarget - generate rules to lint $(SRCS) + */ +#ifndef LintTarget +#define LintTarget() @@\ +NormalLintTarget($(SRCS)) +#endif + + +/* + * LinkSourceFile - snag source file from some other directory + */ +#ifndef LinkSourceFile +#define LinkSourceFile(src,dir) @@\ +src: dir/src @@\ + RemoveFile($@) @@\ + $(LN) $? $@ @@\ + @@\ +NoConfigRec(src) @@\ + @@\ +includes:: src @@\ + @@\ +depend:: src @@\ + @@\ +clean:: @@\ + RemoveFile(src) +#endif + + +/* + * LinkFile - link a file + */ +#ifndef LinkFile +#define LinkFile(tofile,fromfile) @@\ +tofile:: fromfile @@\ + RemoveFile($@) @@\ + $(LN) $? $@ @@\ + @@\ +NoConfigRec(tofile) @@\ + @@\ +includes:: tofile @@\ + @@\ +depend:: tofile @@\ + @@\ +clean:: @@\ + RemoveFile(tofile) +#endif + + +#ifndef MakeSubincludesForBuild +#define MakeSubincludesForBuild(step,dir,srclist) @@\ +step:: dir srclist @@\ + @-(list=`echo srclist | sed -e 's/[^ ]*\///g'`; \ @@\ + set -x; cd dir && RemoveFiles($$list)) @@\ + @for i in srclist; do \ @@\ + (set -x; cd dir && $(LN) ../$$i .); \ @@\ + done @@\ + @@\ +dir:: @@\ + $(MKDIRHIER) dir @@\ + @@\ +clean:: @@\ + @-(if [ -d dir ]; then \ @@\ + list=`echo srclist | sed -e 's/[^ ]*\///g'`; \ @@\ + set -x; cd dir && RemoveFile($$list); else exit 0; fi) +#endif + + +/* + * LangNamedTargetSubdirs - recursively make a series of steps + */ +#ifndef LangNamedTargetSubdirs +#define LangNamedTargetSubdirs(lang,name,dirs,verb,flags,subname) @@\ +name:: @@\ + @MakeFlagsToShellFlags(ik,set +e); \ @@\ + for i in dirs ;\ @@\ + do \ @@\ + echo verb "in $(CURRENT_DIR)/$$i..."; \ @@\ + (cd $$i && LANG=lang $(MAKE) $(MFLAGS) flags subname);\ @@\ + done +#endif + + +/* + * NamedMakeSubdirs - generate rules to do makes in the given subdirectories. + * If you want CDEBUGFLAGS passed along to subdirectories, provide a line like + * the following in the appropriate Imakefile + * + * #define PassCDebugFlags 'CDEBUGFLAGS=$(CDEBUGFLAGS)' + */ +#ifndef LangNamedMakeSubdirs +#define LangNamedMakeSubdirs(lang,name,dirs) \ +LangNamedTargetSubdirs(lang,name,dirs,"making" name,PassCDebugFlags,all) +#endif /* LangNamedMakeSubdirs */ + +#ifndef LangMakeSubdirs +#define LangMakeSubdirs(lang,dirs) @@\ +LangNamedMakeSubdirs(lang,all,dirs) +#endif /* LangMakeSubdirs */ + + + +/* + * NamedTargetSubdirs - recursively make a series of steps + */ +#ifndef NamedTargetSubdirs +#define NamedTargetSubdirs(name,dirs,verb,flags,subname) @@\ +name:: @@\ + @MakeFlagsToShellFlags(ik,set +e); \ @@\ + for i in dirs ;\ @@\ + do \ @@\ + echo verb "in $(CURRENT_DIR)/$$i..."; \ @@\ + MakeNamedTargetSubdir($$i,flags,subname); \ @@\ + done +#endif + + +/* + * NamedMakeSubdirs - generate rules to do makes in the given subdirectories. + * If you want CDEBUGFLAGS passed along to subdirectories, provide a line like + * the following in the appropriate Imakefile + * + * #define PassCDebugFlags 'CDEBUGFLAGS=$(CDEBUGFLAGS)' + */ +#ifndef NamedMakeSubdirs +#define NamedMakeSubdirs(name,dirs) \ +NamedTargetSubdirs(name,dirs,"making" name,PassCDebugFlags,all) +#endif /* NamedMakeSubdirs */ + +#ifndef MakeSubdirs +#define MakeSubdirs(dirs) @@\ +NamedMakeSubdirs(all,dirs) +#endif /* MakeSubdirs */ + + +/* + * DependSubdirs - generate rules to recursively compute dependencies as + * part of the make depend step. + */ +#ifndef DependSubdirs +#define DependSubdirs(dirs) \ +NamedTargetSubdirs(depend,dirs,"depending",NullParameter,depend) +#endif /* DependSubdirs */ + + +/* + * ForceSubdirs - force make to build subdirectories + */ +#ifndef ForceSubdirs +#if !HasBsdMake +#define ForceSubdirs(dirs) @@\ +dirs: FRC @@\ + @echo "making all in $(CURRENT_DIR)/$@..." @@\ + @MakeNamedTargetSubdir($@,PassCDebugFlags,all) @@\ + @@\ +FRC: +#else +/* For BSD 4.4 make */ +#define ForceSubdirs(dirs) @@\ +dirs: .EXEC @@\ + @cd $@ ; echo "making all in $(CURRENT_DIR)/$@..."; \ @@\ + $(MAKE) $(MFLAGS) PassCDebugFlags all @@\ + @@\ +.EXEC: +#endif + +#endif /* ForceSubdirs */ + +/* + * InstallSubdirs - generate rules to recursively install programs and files. + */ +#ifndef InstallSubdirs +#define InstallSubdirs(dirs) \ +NamedTargetSubdirs(install,dirs,"installing",DESTDIR=$(DESTDIR),install) +#endif /* InstallSubdirs */ + + +/* + * InstallManSubdirs - generate rules to recursively install manual pages. + */ +#ifndef InstallManSubdirs +#define InstallManSubdirs(dirs) \ +NamedTargetSubdirs(install.man,dirs,"installing man pages",DESTDIR=$(DESTDIR),install.man) +#endif /* InstallManSubdirs */ + + +/* + * IncludesSubdirs - generate rules to recursively put include files in build + */ +#ifndef IncludesSubdirs +#define IncludesSubdirs(dirs) \ +NamedTargetSubdirs(includes,dirs,including,NullParameter,includes) +#endif + + +/* + * InstallDriverSDKSubdirs - generate rules to recursively install Driver + * SDK (only used for XFree86). This is a no-op + * rule so that Imakefiles on non-XFree86 systems + * continue to build Makefiles correctly. + */ +#ifndef InstallDriverSDKSubdirs +#define InstallDriverSDKSubdirs(dirs) +#endif + +/* + * InstallDriverSDKObjectModule - generate rules to recursively install Driver + * SDK (only used for XFree86). This is a no-op + * rule so that Imakefiles on non-XFree86 systems + * continue to build Makefiles correctly. + */ +#ifndef InstallDriverSDKObjectModule +#define InstallDriverSDKObjectModule(module,dest,subdir) +#endif +#ifndef InstallDriverSDKObjectSubModule +#define InstallDriverSDKObjectSubModule(module,dest,subdir) +#endif + + + +/* + * CleanSubdirs - generate rules to recursively clean out garbage files. + */ +#define BootstrapCleanSubdirs /**/ /* used at top-level */ +#ifndef NamedCleanSubdirs +#define NamedCleanSubdirs(name,dirs) \ +NamedTargetSubdirs(name,dirs,"cleaning",BootstrapCleanSubdirs,clean) +#endif /* NamedCleanSubdirs */ + +#ifndef CleanSubdirs +#define CleanSubdirs(dirs) \ +NamedCleanSubdirs(clean,dirs) +#endif + + +/* + * TagSubdirs - generate rules to recursively create tags files. + */ +#ifndef NamedTagSubdirs +#define NamedTagSubdirs(name,dirs) \ +NamedTargetSubdirs(name,dirs,"tagging",TAGS='$(TAGS)',tags) +#endif /* TagSubdirs */ + +#ifndef TagSubdirs +#define TagSubdirs(dirs) \ +NamedTagSubdirs(tags,dirs) +#endif + +/* + * MakeLintSubdirs - generate rules to recursively lint directories as part + * of the named step. + */ +#ifndef MakeLintSubdirs +#define MakeLintSubdirs(dirs,target,subtarget) \ +NamedTargetSubdirs(target,dirs,"linting" for target and subtarget,DESTDIR=$(DESTDIR) LINTOPTS='$(LINTOPTS)',subtarget) +#endif /* MakeLintSubdirs */ + + +/* + * LintSubdirs - generate rules to recursively lint directories as part of + * the make lint step. + */ +#ifndef LintSubdirs +#define LintSubdirs(dirs) @@\ +MakeLintSubdirs(dirs,lint,lint) +#endif /* LintSubdirs */ + + +/* + * MakeLintLibSubdirs - generate rules to recursively create lint libraries. + */ +#ifndef MakeLintLibSubdirs +#define MakeLintLibSubdirs(dirs) @@\ +MakeLintSubdirs(dirs,lintlib,lintlib) +#endif /* MakeLintLibSubdirs */ + + +/* + * MakeMakeSubdirs - generate rules to recursively recreate Makefiles as part + * of the specified step in the build. If $(TOP) is set to an absolute path, + * do not prepend the ../ prefix. This makes running things outside of the + * source tree much easier. + * $(ONESUBDIR)/Makefile exists as a separate, explicit target so that + * clearmake will know what its goal is and do wink-in. + */ +#ifndef MakeMakeSubdirs +#define MakeMakeSubdirs(dirs,target) @@\ +$(ONESUBDIR)/Makefile: @@\ + @MakeFlagsToShellFlags(n,executeit="no"); \ @@\ + cd $(ONESUBDIR) && \ @@\ + if [ "$$executeit" != "no" ]; then \ @@\ + ImakeSubCmdHelper -DTOPDIR=$(IMAKETOP) -DCURDIR=$(ONECURDIR)$(ONESUBDIR); \ @@\ + fi; @@\ + @@\ +target:: @@\ + -@MakeFlagsToShellFlags(ik,set +e); \ @@\ + MakeFlagsToShellFlags(n,executeit="no"); \ @@\ + for i in dirs ;\ @@\ + do \ @@\ + case "$(CURRENT_DIR)" in \ @@\ + .) curdir= ;; \ @@\ + *) curdir=$(CURRENT_DIR)/ ;; \ @@\ + esac; \ @@\ + echo "making Makefiles in $$curdir$$i..."; \ @@\ + itmp=`echo $$i | sed -e 's;^\./;;g' -e 's;/\./;/;g'`; \ @@\ + curtmp="$(CURRENT_DIR)" \ @@\ + toptmp=""; \ @@\ + case "$$itmp" in \ @@\ + ../?*) \ @@\ + while echo "$$itmp" | grep '^\.\./' > /dev/null;\ @@\ + do \ @@\ + toptmp="/`basename $$curtmp`$$toptmp"; \ @@\ + curtmp="`dirname $$curtmp`"; \ @@\ + itmp="`echo $$itmp | sed 's;\.\./;;'`"; \ @@\ + done \ @@\ + ;; \ @@\ + esac; \ @@\ + case "$$itmp" in \ @@\ + */?*/?*/?*/?*) newtop=../../../../..;; \ @@\ + */?*/?*/?*) newtop=../../../..;; \ @@\ + */?*/?*) newtop=../../..;; \ @@\ + */?*) newtop=../..;; \ @@\ + *) newtop=..;; \ @@\ + esac; \ @@\ + newtop="$$newtop$$toptmp"; \ @@\ + case "$(TOP)" in \ @@\ + /?*) imaketop=$(TOP) \ @@\ + imakeprefix= ;; \ @@\ + .) imaketop=$$newtop \ @@\ + imakeprefix=$$newtop/ ;; \ @@\ + *) imaketop=$$newtop/$(TOP) \ @@\ + imakeprefix=$$newtop/ ;; \ @@\ + esac; \ @@\ + RemoveFile($$i/Makefile.bak); \ @@\ + if [ -f $$i/Makefile ]; then \ @@\ + echo " $(MV) Makefile Makefile.bak"; \ @@\ + if [ "$$executeit" != "no" ]; then \ @@\ + $(MV) $$i/Makefile $$i/Makefile.bak; \ @@\ + fi; \ @@\ + fi; \ @@\ + $(MAKE) $(MFLAGS) $(MAKE_OPTS) ONESUBDIR=$$i ONECURDIR=$$curdir IMAKETOP=$$imaketop IMAKEPREFIX=$$imakeprefix $$i/Makefile; \ @@\ + if [ -d $$i ] ; then \ @@\ + cd $$i; \ @@\ + $(MAKE) $(MFLAGS) Makefiles; \ @@\ + cd $$newtop; \ @@\ + else \ @@\ + exit 1; \ @@\ + fi; \ @@\ + done + +#define ImakeSubCmdHelper $(IMAKE_CMD) -I$(IMAKEPREFIX)$(IRULESRC) \ + $(IMAKE_DEFINES) $(IMAKE_WARNINGS) + +#endif /* MakeMakeSubdirs */ + + +/* + * MakefileSubdirs - generate rules to create Makefiles. + */ +#ifndef MakefileSubdirs +#define MakefileSubdirs(dirs) @@\ +MakeMakeSubdirs(dirs,Makefiles) +#endif /* MakefileSubdirs */ + +/* + * Translate XCOMM into pound sign with sed, rather than passing -DXCOMM=XCOMM + * to cpp, because that trick does not work on all ANSI C preprocessors. + * Delete line numbers from the cpp output (-P is not portable, I guess). + * Allow XCOMM to be preceded by whitespace and provide a means of generating + * output lines with trailing backslashes. + * Allow XHASH to always be substituted, even in cases where XCOMM isn't. + */ +#ifndef CppSedMagic +#define CppSedMagic sed -e '/^# *[0-9][0-9]* *.*$$/d' \ + -e '/^#line *[0-9][0-9]* *.*$$/d' \ + -e '/^[ ]*XCOMM$$/s/XCOMM/#/' \ + -e '/^[ ]*XCOMM[^a-zA-Z0-9_]/s/XCOMM/#/' \ + -e '/^[ ]*XHASH/s/XHASH/#/' \ + -e '/\@\@$$/s/\@\@$$/\\/' +#endif /* CppSedMagic */ + +#ifndef CppFileTarget +#define CppFileTarget(dst,src,defs,deplist) @@\ +dst:: src deplist @@\ + RemoveFile($@) @@\ + ClearmakeOSName \ + $(CPP) CppNoLineInfoOption defs <src | CppSedMagic >$@ @@\ + @@\ +clean:: @@\ + RemoveFiles(dst) +#endif /* CppFileTarget */ + +/* + * CppScriptTarget - generate rules to create a shell script by running the + * input through cpp. If the ExecableScripts configuration parameter is not + * set, then make sure that the first line begins with a colon. + */ +#ifndef CppScriptTarget +#if ExecableScripts /* can use #! instead of colon */ +#define CppScriptTarget(dst,src,defs,deplist) @@\ +dst:: src deplist @@\ + RemoveFile($@) @@\ + ClearmakeOSName \ + $(CPP) CppNoLineInfoOption defs <src | CppSedMagic >$@ @@\ + chmod a+x $@ @@\ + @@\ +clean:: @@\ + RemoveFiles(dst) +#else +#define CppScriptTarget(dst,src,defs,deplist) @@\ +dst:: src deplist @@\ + RemoveFile($@) @@\ + ClearmakeOSName \ + echo \: >$@ @@\ + sed '1d' src | $(CPP) CppNoLineInfoOption defs | CppSedMagic >>$@ @@\ + chmod a+x $@ @@\ + @@\ +clean:: @@\ + RemoveFile(dst) +#endif /* ExecableScripts */ +#endif /* CppScriptTarget */ + + +/* + * MakeScriptFromCpp - generate rules to create a script from a file with a + * .cpp suffix. + */ +#ifndef MakeScriptFromCpp +#define MakeScriptFromCpp(name,defs) @@\ +CppScriptTarget(name,name.cpp,defs,NullParameter) +#endif /* MakeScriptFromCpp */ + +#ifndef CppSourceFile +#define CppSourceFile(dst,src,defs,deplist) @@\ +CppFileTarget(dst,src,defs,deplist) @@\ + @@\ +includes:: dst @@\ + @@\ +depend:: dst +#endif /* CppSourceFile */ + +/* Like CppFileTarget, but don't add any default defines */ +#ifndef CppRawFileTarget +#define CppRawFileTarget(dst,src,defs,deplist) @@\ +dst:: src deplist @@\ + RemoveFile($@) @@\ + ClearmakeOSName \ + $(RAWCPP) CppNoLineInfoOption defs <src | CppSedMagic >$@ @@\ + @@\ +clean:: @@\ + RemoveFiles(dst) +#endif /* CppFileTarget */ + +/* + * CppManTarget - preprocess man pages. OS-specific man sections are replaced. + */ +#ifndef CppManTarget +#define CppManTarget(name,defs) @@\ +AllTarget(name.$(MANNEWSUFFIX)) @@\ + @@\ +name.$(MANNEWSUFFIX): name.$(MANSRCSUFFIX) @@\ + RemoveFile($@) @@\ + if test -z "$(PREPROCESSMANPAGES)" ; then \ @@\ + cd `dirname name` && \ @@\ + $(LN) `basename name.$(MANSRCSUFFIX)` `basename $@`; \ @@\ + else \ @@\ + ClearmakeOSName \ + $(RAWCPP) CppNoLineInfoOption $(MANDEFS) defs \ @@\ + < name.$(MANSRCSUFFIX) | CppSedMagic >$@; \ @@\ + fi @@\ + @@\ +clean:: @@\ + RemoveFile(name.$(MANNEWSUFFIX)) +#endif /* CppManTarget */ + +/* + * MakeDirectories - generate rules to create a hierarchy of directories. + */ +#ifndef MakeDirectories +#define MakeDirectories(step,dirs) @@\ +step:: @@\ + DirFailPrefix@MakeFlagsToShellFlags(i,set +e); \ @@\ + for i in dirs; do if [ -d $(DESTDIR)$$i ]; then \ @@\ + set +x; else (set -x; $(MKDIRHIER) $(DESTDIR)$$i); fi; \ @@\ + done +#endif /* MakeDirectories */ + + +/* + * AllTarget - generate rules to build necessary things during make all. + */ +#ifndef AllTarget +#define AllTarget(depends) @@\ +all:: depends +#endif /* AllTarget */ + +#ifdef DefineOldLibraryRules +#include <oldlib.rules> +#endif + +#ifndef StaticLibrary +#define StaticLibrary(libpath,libname) Concat3(libpath,/,LibraryTargetName(libname)) +#endif + +/* + * MakeMutex - generate mutex rules for parallel make + */ +#ifndef MakeMutex +#ifdef MutexDirective +#define MakeMutex(targets) @@\ +MutexDirective: targets +#endif /* MutexDirective */ +#endif /* MakeMutex */ + +/* + * Rules for dynamic modules. These are primarily used by XFree86 + */ + +#ifndef LinkBuildModule +#ifdef UseInstalled +#define LinkBuildModule(module,subdir) $(_NULLCMD_) +#else +#define LinkBuildModule(module,subdir)\ + MakeDir($(BUILDMODULEDIR)/subdir) @@\ + RemoveFile($(BUILDMODULEDIR)/subdir/module) @@\ + @(UP="`$(REVPATH) subdir`"; set -x; \ @@\ + cd $(BUILDMODULEDIR)/subdir && \ @@\ + $(LN) $(BUILDMODULETOP)/$${UP}$(CURRENT_DIR)/module .) +#endif +#endif /* LinkBuildModule */ + +#ifndef LinkBuildNamedModule +#ifdef UseInstalled +#define LinkBuildNamedModule(module,name,subdir) $(_NULLCMD_) +#else +#define LinkBuildNamedModule(module,name,subdir)\ + MakeDir($(BUILDMODULEDIR)/subdir) @@\ + RemoveFile($(BUILDMODULEDIR)/subdir/name) @@\ + @(UP="`$(REVPATH) subdir`"; set -x; \ @@\ + cd $(BUILDMODULEDIR)/subdir && \ @@\ + $(LN) $(BUILDMODULETOP)/$${UP}$(CURRENT_DIR)/module name) +#endif +#endif /* LinkBuildNamedModule */ + +/* + * ModuleObjectRule + */ +#ifndef ModuleObjectRule +#define ModuleObjectRule() NormalLibraryObjectRule() +#endif + +/* + * ObjectModuleTarget - build a module as a single object file + */ +#ifndef ObjectModuleTarget +#define ObjectModuleTarget(module,objects) @@\ +NormalRelocatableTarget(Concat(module,_drv), objects) +#endif + +/* + * LibraryModuleTarget + */ +#ifndef LibraryModuleTarget +#define LibraryModuleTarget(module, objects) @@\ +NormalLibraryTarget(module, objects) +#endif + +/* + * DepLibraryModuleTarget + */ +#ifndef DepLibraryModuleTarget +#define DepLibraryModuleTarget(module,deplist,objects) @@\ +NormalDepLibraryTarget(module, deplist, objects) +#endif + +/* + * DynamicModuleTarget - build a module to be dynamically loaded + */ +#ifndef DynamicModuleTarget +#define DynamicModuleTarget(module,modlist) @@\ +AllTarget(module) @@\ + @@\ +module: modlist @@\ + RemoveFile($@) @@\ + $(CC) -o $@ $(SHLIBLDFLAGS) $(NOSTDLIB) modlist $(POSTNOSTDLIB) @@\ + @@\ +clean:: @@\ + RemoveFile(module) +#endif /* DynamicModuleTarget */ + +/* + * DepDynamicModuleTarget - build a module to be dynamically loaded + */ +#ifndef DepDynamicModuleTarget +#define DepDynamicModuleTarget(module,deplist,modlist) @@\ +AllTarget(module) @@\ + @@\ +module: deplist @@\ + RemoveFile($@) @@\ + $(CC) -o $@ $(SHLIBLDFLAGS) $(NOSTDLIB) modlist $(POSTNOSTDLIB) @@\ + @@\ +clean:: @@\ + RemoveFile(module) +#endif /* DepDynamicModuleTarget */ + +/* + * InstallDynamicModule - install a dynamic module + */ +#ifndef InstallDynamicModule +#define InstallDynamicModule(module,dest,subdir) @@\ +AllTarget(module) @@\ + LinkBuildModule(module,subdir) @@\ + @@\ +install:: module @@\ + MakeDir($(DESTDIR)dest/subdir) @@\ + $(INSTALL) -c $(INSTDATFLAGS) module $(DESTDIR)dest/subdir +#endif + +#ifndef InstallDynamicNamedModule +#define InstallDynamicNamedModule(module,instname,dest,subdir) @@\ +AllTarget(module) @@\ + LinkBuildNamedModule(module,instname,subdir) @@\ + @@\ +install:: module @@\ + MakeDir($(DESTDIR)dest/subdir) @@\ + $(INSTALL) -c $(INSTDATFLAGS) module $(DESTDIR)dest/subdir/instname +#endif + +/* Shortcuts for installing driver module, one per class */ +#ifndef InstallVideoObjectModule +#define InstallVideoObjectModule(module,dest) @@\ +InstallObjectModule(module,dest,drivers) +#endif +#ifndef InstallInputObjectModule +#define InstallInputObjectModule(module,dest) @@\ +InstallObjectModule(module,dest,input) +#endif +#ifndef InstallExtensionsObjectModule +#define InstallExtensionsObjectModule(module,dest) @@\ +InstallObjectModule(module,dest,extensions) +#endif +#ifndef InstallFontsObjectModule +#define InstallFontsObjectModule(module,dest) @@\ +InstallObjectModule(module,dest,fonts) +#endif +#ifndef InstallMultimediaObjectModule +#define InstallMultimediaObjectModule(module,dest) @@\ +InstallObjectModule(module,dest,multimedia) +#endif + +#ifndef InstallObjectModule +#define InstallObjectModule(module,dest,subdir) /**/ +#endif + +#ifndef InstallLibraryModule +#define InstallLibraryModule(module,dest,subdir) /**/ +#endif + +#ifndef InstallModuleManPage +#define InstallModuleManPage(module) @@\ +InstallGenManPage(module,$(DRIVERMANDIR),$(DRIVERMANSUFFIX)) +#endif + +#ifndef BuildObjectFromLibraryWithPath +#define BuildObjectFromLibraryWithPath(libpath,libname,objname) @@\ +AllTarget(objname.Osuf) @@\ + @@\ +objname.Osuf: Concat3(libpath,/lib,libname.a) @@\ + @$(MKDIRHIER) tmp @@\ + @$(CP) Concat3(libpath,/lib,libname.a) tmp @@\ + @(cd tmp; set -x; ArExtCmd Concat(lib,libname.a); \ @@\ + $(LD) $(LDCOMBINEFLAGS) *.Osuf -o ../$@; \ @@\ + RemoveFiles(*.Osuf)) @@\ + @$(RM) -r tmp @@\ + @@\ +clean:: @@\ + RemoveFile(objname.Osuf) +#endif + +#ifndef BuildObjectFromLibrary +#define BuildObjectFromLibrary(libname,objname) BuildObjectFromLibraryWithPath(.,libname,objname) +#endif + +/* + * LinkerRuntimeLibraryPathFlag - defined here to be a no-op for systems that + * don't need it. Overridden in system-specific config files for systems that + * need it, usually with something like "Concat(-R,path)" + */ +#ifndef LinkerRuntimeLibraryPathFlag +# define LinkerRuntimeLibraryPathFlag(path) /* */ +#endif + +/* Phony targets - GNU make has a feature to mark a target as phony, + * which means that it wont consider that target to be the name of a + * file. In general this speeds up make, since it doesn't have to + * look for those files when it sets out to create a phony target. + * However, on cygwin, this is actually required for correct + * operation, since the Win32 filesystems are case insensitive and the + * install target conflicts with the INSTALL file present in some + * (autotooled) directories. + * + * We probably don't need the #ifdef protection, since other make + * implementations would just consider this a normal rule. Better + * safe than sorry, though. + */ +#if HasGnuMake +.PHONY: all interfaces install install.man install.lib install.sdk \ + depend includes clean +#endif diff --git a/nx-X11/config/cf/Imake.tmpl b/nx-X11/config/cf/Imake.tmpl new file mode 100644 index 000000000..15e3a9ad3 --- /dev/null +++ b/nx-X11/config/cf/Imake.tmpl @@ -0,0 +1,2219 @@ +XCOMM ---------------------------------------------------------------------- +XCOMM Makefile generated from IMAKE_TEMPLATE and INCLUDE_IMAKEFILE +XCOMM ---------------------------------------------------------------------- + +/* + * generic imake template + */ + +/* + * Modify Imake.cf when adding a new architecture, do not modify this file. + * Platform-specific parameters may be set in the appropriate <vendor>.cf + * configuration files. Site-specific parameters should be set in the file + * site.def. Full rebuilds are recommended if any parameters are changed. + * If your C preprocessor does not define any unique symbols, you will need + * to set BOOTSTRAPCFLAGS when rebuilding imake (usually when doing + * "make World" the first time). + */ + +#define ImakeConfigRelease 6 + +#define YES 1 +#define NO 0 + +/* Ensure that "all" is the default target in the Makefile. */ +all:: + +.SUFFIXES: .i + +/* Intercept clean rules for current directory */ +#undef clean +#define clean cleandir + +#include <Imake.cf> + +XCOMM ----------------------------------------------------------------------- +XCOMM site-specific configuration parameters that need to come before +XCOMM the platform-specific parameters - edit site.def to change +#define BeforeVendorCF +#include <site.def> +#undef BeforeVendorCF + +#if defined(HasGcc3) && !defined(HasGcc2) +# define HasGcc2 HasGcc3 +#endif +#if defined(HasGcc2) && !defined(HasGcc) +# define HasGcc HasGcc2 +#endif + +#ifndef HasCenterLineC +#define HasCenterLineC NO +#endif +#ifndef HasCenterLineCplusplus +#define HasCenterLineCplusplus NO +#endif + +#ifndef HasClearmake +# define HasClearmake NO +#endif + +#ifndef ProPoliceSupport +#define ProPoliceSupport NO +#endif + +/* + * ClearmakeOSName - insert the current OS type into the clearmake + * build script, so .o files from different platforms cannot be winked in. + * If clearmake finds the build script for two .o files is the same, it + * will share the .o, even across different architectures. Inserting the + * O/S name into the build script in a comment prevents unwanted sharing. + * Note the trailing double-@ in the macro: end a line using this macro + * with backslash without the double-@ usually used. + * Like this: + * + * #define SomeRule() @@\ + * something or other @@\ + * ClearmakeOSName \ + * something else @@\ + * and more + */ +#ifndef ClearmakeOSName +# if HasClearmake +# define ClearmakeOSName @ XCOMM $(OSNAME) @@ +# else +# define ClearmakeOSName /**/ +# endif +#endif + +#if HasClearmake +# ifndef MakeCmd +# define MakeCmd clearmake +# endif +#endif + +#if HasClearmake +XCOMM ---------------------------------------------------------------------- +.c.o: + ClearmakeOSName $(CC) -c $(CFLAGS) $*.c +#endif + +XCOMM ---------------------------------------------------------------------- +XCOMM platform-specific configuration parameters - edit MacroFile to change +#include MacroIncludeFile + +XCOMM ---------------------------------------------------------------------- +XCOMM site-specific configuration parameters that go after +XCOMM the platform-specific parameters - edit site.def to change +#define AfterVendorCF +#include <site.def> +#undef AfterVendorCF + +/* + * defaults for various generic parameters; set in site.def if needed + */ + +/* the following are needed before we can include Imake.rules */ + +#ifndef NothingOutsideProjectRoot +#define NothingOutsideProjectRoot NO +#endif + +#ifndef RemoveObsoleteFiles +#define RemoveObsoleteFiles YES +#endif + +#ifndef HasVarDirectory +#define HasVarDirectory YES +#endif +#ifndef UseEtcX11 +#define UseEtcX11 YES +#endif +#ifndef UseInstalledX11 +# define UseInstalledX11 NO +#endif +#ifdef UseInstalled +# undef UseInstalledX11 +# define UseInstalledX11 YES +#endif +#if NothingOutsideProjectRoot +#undef UseEtcX11 +#define UseEtcX11 NO +#endif +#ifndef UseSeparateConfDir +#define UseSeparateConfDir (UseEtcX11 || HasVarDirectory) +#endif +#if NothingOutsideProjectRoot +#undef UseSeparateConfDir +#define UseSeparateConfDir NO +#endif +#ifndef SystemV +#define SystemV NO /* SYSV (R3) */ +#endif +#ifndef SystemV4 +#define SystemV4 NO /* SVR4 */ +#endif +#ifndef HasCodeCenter +#define HasCodeCenter NO +#endif +#ifndef HasSentinel +#define HasSentinel NO +#endif +#ifndef HasPurify +#define HasPurify NO +#endif +#ifndef HasTestCenter +#define HasTestCenter NO +#endif +#ifndef HasGnuMake +#define HasGnuMake NO +#endif +/* + * The following fixes a glitch with GNU make -j + */ +#ifndef ForceServerRemake +#define ForceServerRemake HasGnuMake +#endif +#ifndef HasBsdMake +#define HasBsdMake NO +#endif +#ifndef HasParallelMake +#define HasParallelMake NO +#endif +#ifndef RemoveTargetProgramByMoving +#define RemoveTargetProgramByMoving NO +#endif +#ifndef DoRanlibCmd +#if SystemV || SystemV4 +#define DoRanlibCmd NO +#else +#define DoRanlibCmd YES +#endif +#endif +#ifndef ExecableScripts +#if SystemV +#define ExecableScripts NO +#else +#define ExecableScripts YES /* kernel exec() can handle #! */ +#endif +#endif + +#ifndef HasMakefileSafeInclude /* -include or sinclude in a Makefile */ +#if HasClearmake || HasBsdMake +#define HasMakefileSafeInclude YES +#else +#define HasMakefileSafeInclude NO /* see also vendor-specific .cf files */ +#endif +#endif + +#ifndef HasSymLinks +#define HasSymLinks YES +#endif + +#ifndef HasPerl +#define HasPerl YES +#endif + +#ifndef HasPerl5 +#define HasPerl5 HasPerl +#endif + +#ifndef PerlCmd +#define PerlCmd perl +#endif + +#ifndef PerlOptions +#define PerlOptions /**/ +#endif + +#ifndef PerlEnvSetup +#define PerlEnvSetup env LC_ALL=C +#endif + +#ifndef HasGperf +#define HasGperf NO +#endif + +#ifndef GperfCmd +#define GperfCmd gperf +#endif + +#ifndef RmanCmd +#endif + +#ifndef RmanOptions +#endif + +#ifndef BuildHtmlManPages +#ifdef RmanCmd +#define BuildHtmlManPages YES +#else +#define BuildHtmlManPages NO +#endif +#endif +/* Can't do this while bootstrapping imake */ +#ifdef BootStrap +#undef BuildHtmlManPages +#define BuildHtmlManPages NO +#endif + +#ifndef DontPreprocessManPages +#ifdef UseInstalled +#define DontPreprocessManPages YES +#else +#define DontPreprocessManPages NO +#endif +#endif + +#ifndef CompressManPages +#define CompressManPages NO +#endif + +#ifndef HasGroff +#define HasGroff NO +#endif +#ifndef HasGroffHtml +#define HasGroffHtml NO +#endif + +#ifndef HasCookieMaker +#define HasCookieMaker NO +#endif + +#ifndef StripInstalledPrograms +#define StripInstalledPrograms NO /* leave symbol table just in case */ +#endif +#ifndef StaticNeedsPicForShared +#define StaticNeedsPicForShared NO +#endif + +#include <Imake.rules> + +#ifndef HasSharedLibraries +#define HasSharedLibraries NO +#endif +#ifndef OSMajorVersion +#define OSMajorVersion 0 +#endif +#ifndef OSMinorVersion +#define OSMinorVersion 0 +#endif +#ifndef OSTeenyVersion +#define OSTeenyVersion 0 +#endif +#ifndef UnalignedReferencesAllowed +#define UnalignedReferencesAllowed NO /* if arbitrary deref is okay */ +#endif +#ifndef AvoidNullMakeCommand +#if !HasBsdMake +#define AvoidNullMakeCommand NO +#else +#define AvoidNullMakeCommand YES +#endif +#endif +#if AvoidNullMakeCommand +#ifndef NullMakeCommand +#define NullMakeCommand @ echo -n +#endif +/* + * An obscure bug in BSD4.3's original make causes it not to recognize a + * macro definition if the macro name starts with a non-alpha and in + * column one. + */ + _NULLCMD_ = NullMakeCommand +#endif + +#ifndef CrossCompiling +#define CrossCompiling NO +#undef CrossCompileDir +#endif +#ifndef BourneShell /* to force shell in makefile */ +#define BourneShell /bin/sh +#endif +#ifndef ConstructMFLAGS +#if SystemV +#define ConstructMFLAGS YES /* build MFLAGS from MAKEFLAGS */ +#else +#define ConstructMFLAGS NO /* build MFLAGS from MAKEFLAGS */ +#endif +#endif + +#ifndef ConstructMAKEFLAGS /* needed on old BSD-based? */ +#define ConstructMAKEFLAGS NO /* build MAKEFLAGS from MFLAGS */ +#endif + +#ifndef HasLargeTmp +#define HasLargeTmp NO /* be paranoid */ +#endif + +#ifndef HasMotif +#define HasMotif NO +#endif +#ifndef HasMotif2 +#define HasMotif2 NO /* only if system has working Motif2 or OpenMotif */ +#endif +#ifndef HasBSDAuth +#define HasBSDAuth NO +#endif + +#ifndef HasBSD44Sockets +#define HasBSD44Sockets NO +#endif +#ifndef HasSockets +#define HasSockets YES +#endif +#ifndef HasPoll +#if SystemV || SystemV4 +#define HasPoll YES +#else +#define HasPoll NO +#endif +#endif +#ifndef HasVFork +#if SystemV +#define HasVFork NO /* not yet... */ +#else +#define HasVFork YES +#endif +#endif +#ifndef HasSetProcTitle +#define HasSetProcTitle NO +#endif +#ifndef HasSetUserContext +#define HasSetUserContext NO +#endif +#ifndef HasLibCrypt +#define HasLibCrypt NO +#endif +#ifndef HasPutenv +#define HasPutenv NO /* assume not */ +#endif +/* setenv(3) and unsetenv(3) */ +#ifndef HasSetenv +#define HasSetenv YES /* assume yes */ +#endif +#ifndef HasVoidSignalReturn +#define HasVoidSignalReturn YES /* assume yes */ +#endif +#ifndef HasBsearch +#define HasBsearch YES /* assume yes */ +#endif +#ifndef HasSnprintf +#define HasSnprintf NO /* assume not */ +#endif +#ifndef HasStrlcat +#define HasStrlcat NO /* assume not */ +#endif +#ifndef HasReallocarray +#define HasReallocarray NO /* assume not */ +#endif +#ifndef HasDlopen +#define HasDlopen NO /* assume not */ +#endif +#ifndef HasWeakSymbols +#define HasWeakSymbols NO /* assume not */ +#endif +#ifndef HasIssetugid +#define HasIssetugid NO /* assume not */ +#endif +#ifndef HasGetresuid +#define HasGetresuid NO /* assume not */ +#endif +#ifndef HasMkstemp +#define HasMkstemp NO /* assume not */ +#endif +#ifndef HasUsableFileMmap +#define HasUsableFileMmap NO /* assume not */ +#endif +#ifndef HasGetIfAddrs +#define HasGetIfAddrs NO /* assume not */ +#endif +#ifndef HasStickyDirBit +#define HasStickyDirBit YES +#endif +#ifndef HasFchown +#define HasFchown YES +#endif +#ifndef HasPam +#define HasPam NO +#endif +#ifndef HasPamMisc +#define HasPamMisc NO +#endif +#ifndef HasGetpeereid +#define HasGetpeereid NO +#endif +#ifndef HasGetpeerucred +#define HasGetpeerucred NO +#endif +#ifndef NoStrstr +#define NoStrstr NO +#endif +#ifndef HasShadowPasswd +#define HasShadowPasswd NO +#endif +#ifndef HasBasename +#define HasBasename YES +#endif +#ifndef HasTimingsafeMemcmp +#define HasTimingsafeMemcmp NO /* assume not */ +#endif +#ifndef HasGetopt +# if !defined(Win32Architecture) +# define HasGetopt YES +# else +# define HasGetopt NO +# endif +#endif +#ifndef HasGetoptLong +# define HasGetoptLong NO +#endif +/* byte-order defaults */ +#ifndef ByteOrder +#if defined(VaxArchitecture) +#define ByteOrder X_LITTLE_ENDIAN +#elif defined(MipsArchitecture) && defined(MipselArchitecture) +#define ByteOrder X_LITTLE_ENDIAN +#elif defined(MipsArchitecture) +#define ByteOrder X_BIG_ENDIAN +#elif defined(i386Architecture) +#define ByteOrder X_LITTLE_ENDIAN +#elif defined(ia64Architecture) +#define ByteOrder X_LITTLE_ENDIAN +#elif defined(AMD64Architecture) +#define ByteOrder X_LITTLE_ENDIAN +#elif defined(SparcArchitecture) || defined(Sparc64Architecture) +#define ByteOrder X_BIG_ENDIAN +#elif defined(AlphaArchitecture) +#define ByteOrder X_LITTLE_ENDIAN +#elif defined(Mc68000Architecture) +#define ByteOrder X_BIG_ENDIAN +#elif defined(Mc68020Architecture) +#define ByteOrder X_BIG_ENDIAN +#elif defined(Mc88000Architecture) +#define ByteOrder X_BIG_ENDIAN +#elif defined(s390Architecture) +#define ByteOrder X_BIG_ENDIAN +#elif defined(s390xArchitecture) +#define ByteOrder X_BIG_ENDIAN +#elif defined(Arm32ebArchitecture) +#define ByteOrder X_BIG_ENDIAN +#elif defined(Arm32Architecture) +#define ByteOrder X_LITTLE_ENDIAN +#elif defined(Arm64ebArchitecture) +#define ByteOrder X_BIG_ENDIAN +#elif defined(Arm64Architecture) +#define ByteOrder X_LITTLE_ENDIAN +#elif defined(RsArchitecture) +#define ByteOrder X_BIG_ENDIAN +#elif defined(PpcArchitecture) || defined(Ppc64Architecture) +#define ByteOrder X_BIG_ENDIAN +#elif defined(SuperHArchitecture) +#define ByteOrder X_LITTLE_ENDIAN +#elif defined(SuperHebArchitecture) +#define ByteOrder X_BIG_ENDIAN +#endif +#endif /* ByteOrder */ +X_BYTE_ORDER = ByteOrder + +#ifndef HasFortran +#define HasFortran NO +#endif +#ifndef HasGcc2ForCplusplus +#define HasGcc2ForCplusplus NO +#endif +#ifndef HasCplusplus +#if HasGcc2ForCplusplus +#define HasCplusplus YES +#else +#define HasCplusplus NO +#endif +#endif +#ifndef HasMktemp +#define HasMktemp NO /* if you have the mktemp command */ +#endif +#ifndef HasSecureRPC +#define HasSecureRPC NO /* if you have Secure RPC */ +#endif +#ifndef HasLatex +#define HasLatex NO +#endif +#ifndef HasShm +#if SystemV || SystemV4 +#define HasShm YES +#else +#define HasShm NO +#endif +#endif +#ifndef HasCbrt +#define HasCbrt YES +#endif +#ifndef HasFfs +#define HasFfs YES +#endif +#ifndef HasXfont2 +#define HasXfont2 NO +#endif +#ifndef GzipLibrary /* if OS config didn't define it, assume it's -lz */ +#define GzipLibrary -lz +#endif +#ifndef UseGnuMalloc +#define UseGnuMalloc NO +#endif +#ifndef GnuMallocLibrary +#define GnuMallocLibrary -lgmalloc +#endif +#ifndef MallocLibraries +#if UseGnuMalloc +#define MallocLibraries GnuMallocLibrary +#else +#define MallocLibraries /**/ +#endif +#endif +#ifndef HasPosixRegex /* Most modern platforms have it */ +#define HasPosixRegex YES +#endif +#ifndef RegexLibrary +#if HasPosixRegex +#define RegexLibrary /**/ +#else +#define RegexLibrary -lregex +#endif +#endif +#ifndef HasNCurses +#define HasNCurses NO +#endif +#ifndef NCursesLibName +#if HasNCurses +#define NCursesLibName -lncurses +#else +#define NCursesLibName +#endif +#endif +#ifdef NCursesLibDir +NCURSESLIBDIR = NCursesLibDir +#endif +#ifdef NCursesIncDir +NCURSESINCDIR = NCursesIncDir +#endif +#ifndef HasTk +#define HasTk NO +#endif +#ifndef TkLibName +#if HasTk +#define TkLibName tk +#else +#define TkLibName +#endif +#endif +TKLIBNAME = TkLibName +#ifndef TkLibDir +#if HasTk +#define TkLibDir /usr/local/lib +#else +#define TkLibDir +#endif +#endif +TKLIBDIR = TkLibDir +#ifndef TkIncDir +#if HasTk +#define TkIncDir /usr/local/include +#else +#define TkIncDir +#endif +#endif +#ifndef TkLibrary +#ifdef HasTk +#define TkLibrary Concat(-L,$(TKLIBDIR)) Concat(-l,$(TKLIBNAME)) +#else +#define TkLibrary +#endif +#endif +#ifndef HasTcl +#define HasTcl NO +#endif +#ifndef TclLibName +#if HasTcl +#define TclLibName tcl +#else +#define TclLibName +#endif +#endif +TCLLIBNAME = TclLibName +#ifndef TclLibDir +#if HasTcl +#define TclLibDir /usr/local/lib +#else +#define TclLibDir +#endif +#endif +TCLIBDIR = TclLibDir +#ifndef TclIncDir +#if HasTcl +#define TclIncDir /usr/local/include +#else +#define TclIncDir +#endif +#endif +#ifndef TclLibrary +#ifdef HasTcl +#define TclLibrary Concat(-L,$(TCLLIBDIR)) Concat(-l,$(TCLLIBNAME)) +#else +#define TclLibrary +#endif +#endif +#ifndef HasTsLib +#define HasTsLib NO +#endif +/* + * Libtool has two different behaviours for version numbers. + * On platforms which support a minor number, the library + * version is (version - minor).minor, on those that don't, + * the version if version.0. Linux and Darwin support minor + * numbers; some BSDs do as well. Set this to YES if libtool + * uses minor numbers on your platform. + */ +#ifndef LibtoolMinorVersions +#define LibtoolMinorVersions NO +#endif +#ifndef NeedConstPrototypes +#define NeedConstPrototypes NO +#endif +#ifndef NeedVarargsPrototypes +#define NeedVarargsPrototypes NO +#endif +#ifndef NeedNestedPrototypes +#define NeedNestedPrototypes NO +#endif +#ifndef NeedFunctionPrototypes +#define NeedFunctionPrototypes (NeedVarargsPrototypes || NeedNestedPrototypes) +#endif +#ifndef NeedWidePrototypes +#define NeedWidePrototypes YES /* mix and match ANSI-C, non-ANSI */ +#endif + +#ifndef UseCCMakeDepend /* use slow cc -E script */ +#define UseCCMakeDepend NO +#endif +#ifndef UseGccMakeDepend /* use slowish but correct gcc -M */ +#define UseGccMakeDepend NO +#endif + +#ifndef CaseSensitiveFileSystem +#define CaseSensitiveFileSystem YES +#endif + +/* DefaultUsrBin is independent of ProjectRoot. + This is a directory where programs will be found even if PATH + is not set, for example when coming in remotely via rsh. */ +#ifndef DefaultUsrBin +#define DefaultUsrBin /usr/bin +#endif + +#ifndef LibDirName +# define LibDirName lib +#endif + +#ifndef UsrLibDir +#ifdef ProjectRoot +#define UsrLibDir Concat4(ProjectRoot,/,LibDirName,/nx/X11) +#ifndef AlternateUsrLibDir +#define AlternateUsrLibDir YES +#endif +#else +#define UsrLibDir Concat4(/usr/local,/,LibDirName,/nx/X11) +#ifndef AlternateUsrLibDir +#define AlternateUsrLibDir NO +#endif +#endif +#else +#ifndef AlternateUsrLibDir +#define AlternateUsrLibDir YES +#endif +#endif + +#ifndef UsrDataDir +#ifdef ProjectRoot +#define UsrDataDir Concat4(ProjectRoot,/,share,/nx) +#ifndef AlternateUsrDataDir +#define AlternateUsrDataDir YES +#endif +#else +#define UsrDataDir Concat4(/usr/local,/,share,/nx) +#ifndef AlternateUsrDataDir +#define AlternateUsrDataDir NO +#endif +#endif +#else +#ifndef AlternateUsrDataDir +#define AlternateUsrDataDir YES +#endif +#endif + +#ifndef VarDirectory +#ifdef ProjectVar +#define VarDirectory ProjectVar +#else +#define VarDirectory /var +#endif +#endif +#ifndef VarLibDir +#define VarLibDir $(VARDIR)/lib +#endif + +/* + * SystemUsrLibDir is independent of ProjectRoot. It is used primarily + * to allow links for shared libraries in /usr/lib for compliance to + * various standards (e.g., Linux/OpenGL). + */ +#ifndef SystemUsrLibDir +#define SystemUsrLibDir /usr/LibDirName +#endif +#ifndef SystemUsrIncDir +#define SystemUsrIncDir /usr/include +#endif + +#ifndef ShLibDir +#define ShLibDir UsrLibDir +#endif +#ifndef IncRoot +#ifdef ProjectRoot +#define IncRoot Concat(ProjectRoot,/include/nx) +#ifndef AlternateIncRoot +#define AlternateIncRoot YES +#endif +#else +#define IncRoot /usr/include +#ifndef AlternateIncRoot +#define AlternateIncRoot NO +#endif +#endif +#else +#ifndef AlternateIncRoot +#define AlternateIncRoot YES +#endif +#endif +#ifndef LintlibDir +#define LintlibDir $(USRLIBDIR)/lint +#endif +#ifndef SystemManDirectory +#if SystemV4 +#define SystemManDirectory /usr/share/man +#else +#define SystemManDirectory /usr/man +#endif +#endif +#ifndef ManDirectoryRoot +#ifdef ProjectRoot +#define ManDirectoryRoot Concat(ProjectRoot,/man) +#else +#define ManDirectoryRoot SystemManDirectory +#endif +#endif +#ifndef ManPath +#define ManPath ManDirectoryRoot +#endif +#ifndef ManSourcePath +#define ManSourcePath $(MANPATH)/man +#endif +#ifndef ManDir +#define ManDir $(MANSOURCEPATH)$(MANSUFFIX) +#endif +#ifndef LibmanDir +#define LibmanDir $(MANSOURCEPATH)$(LIBMANSUFFIX) +#endif +#ifndef FileManDir +#define FileManDir $(MANSOURCEPATH)$(FILEMANSUFFIX) +#endif +#ifndef MiscManDir +#define MiscManDir $(MANSOURCEPATH)$(MISCMANSUFFIX) +#endif +#ifndef DriverManDir +#define DriverManDir $(MANSOURCEPATH)$(DRIVERMANSUFFIX) +#endif +#ifndef AppLoadDefs +#define AppLoadDefs -D__apploaddir__=$(XAPPLOADDIR) +#endif +#ifndef AppManDefs +#define AppManDefs -D__appmansuffix__=$(MANSUFFIX) +#endif +#ifndef LibManDefs +#define LibManDefs -D__libmansuffix__=$(LIBMANSUFFIX) +#endif +#ifndef FileManDefs +#define FileManDefs -D__filemansuffix__=$(FILEMANSUFFIX) +#endif +#ifndef MiscManDefs +#define MiscManDefs -D__miscmansuffix__=$(MISCMANSUFFIX) +#endif +#ifndef DriverManDefs +#define DriverManDefs -D__drivermansuffix__=$(DRIVERMANSUFFIX) +#endif +#ifndef AdminManDefs +#define AdminManDefs -D__adminmansuffix__=$(ADMINMANSUFFIX) +#endif +#ifndef ProjectManDefs +#define ProjectManDefs -D__projectroot__=$(PROJECTROOT) +#endif +#ifndef XConfigFileManDefs +#define XConfigFileManDefs -D__xconfigfile__=$(XCONFIGFILE) +#endif +#ifndef XConfigDirManDefs +#define XConfigDirManDefs -D__xconfigdir__=$(XCONFIGDIR) +#endif +#ifndef XLogFileManDefs +#define XLogFileManDefs -D__xlogfile__=$(XLOGFILE) +#endif +#ifndef XServerManDefs +#define XServerManDefs -D__xservername__=$(XSERVERNAME) +#endif + +#ifndef CompressManCmd +#define CompressManCmd gzip -n +#endif + +#ifndef HtmlIndexCmd +#if BuildHtmlManPages +#define HtmlIndexCmd $(MKHTMLINDEX) +#endif +#endif + +#ifndef LogDirectory +#if HasVarDirectory +#define LogDirectory $(VARDIR)/log +#else +#define LogDirectory /usr/adm +#endif +#endif + +#ifndef HasVarRun +#define HasVarRun NO +#endif + +#ifndef VarRunDirectory +#if HasVarRun +#define VarRunDirectory $(VARDIR)/run +#endif +#endif + +#ifndef HasVarDb +#define HasVarDb NO +#endif + +#ifndef VarDbDirectory +#if HasVarDb +#define VarDbDirectory $(VARDIR)/db +#endif +#endif + +#ifndef ConfigSrc +#define ConfigSrc $(TOP)/config +#endif +#ifndef DependDir +#if UseCCMakeDepend || UseGccMakeDepend +#define DependDir $(CONFIGSRC)/util +#else +#define DependDir $(CONFIGSRC)/makedepend +#endif +#endif +#ifndef UNCOMPRESSPATH +#define UNCOMPRESSPATH /usr/ucb/uncompress /* obsolete */ +#endif +#ifndef OptimizedCDebugFlags +#define OptimizedCDebugFlags -O +#endif +#ifndef OptimizedCplusplusDebugFlags +#define OptimizedCplusplusDebugFlags OptimizedCDebugFlags +#endif +#ifndef DebuggableCDebugFlags +#define DebuggableCDebugFlags -g +#endif +#ifndef DebuggableCplusplusDebugFlags +#define DebuggableCplusplusDebugFlags DebuggableCDebugFlags +#endif +#ifndef ProfiledCDebugFlags +#define ProfiledCDebugFlags -pg +#endif +#ifndef ProfiledCplusplusDebugFlags +#define ProfiledCplusplusDebugFlags ProfiledCDebugFlags +#endif +#ifndef NoOpCDebugFlags +#define NoOpCDebugFlags /**/ +#endif +#ifndef DefaultCDebugFlags +#define DefaultCDebugFlags OptimizedCDebugFlags +#endif +#ifndef DefaultCplusplusDebugFlags +#define DefaultCplusplusDebugFlags OptimizedCplusplusDebugFlags +#endif +#ifndef DefaultCCOptions +#define DefaultCCOptions /* floating point, etc. */ +#endif +#ifndef DefaultCplusplusOptions +#define DefaultCplusplusOptions /* floating point, etc. */ +#endif +#ifndef HardCodeLibdirFlag +#define HardCodeLibdirFlag /**/ +#endif +#ifndef NoRConst +#define NoRConst NO /* YES if const for structs of funcs is bad */ +#endif +#ifndef InstPgmFlags +# if CrossCompiling +# define InstPgmFlags +# else +# define InstPgmFlags -s +# endif +#endif +#ifndef InstBinFlags +#define InstBinFlags -m 0755 +#endif +#ifndef InstUidFlags +#define InstUidFlags -m 4711 +#endif +#ifndef InstLibFlags +#define InstLibFlags -m 0644 +#endif +#ifndef InstIncFlags +#define InstIncFlags -m 0444 +#endif +#ifndef InstManFlags +#define InstManFlags -m 0444 +#endif +#ifndef InstDatFlags +#define InstDatFlags -m 0444 +#endif +#ifndef InstKmemFlags /* put -g kmem -m 2711 in site.def... */ +#define InstKmemFlags InstUidFlags +#endif +#ifndef ParallelMakeFlags +#define ParallelMakeFlags /**/ +#endif +#ifndef ArCmdBase +#define ArCmdBase ar +#endif +#ifndef ArCmd +#if HasLargeTmp || SystemV4 +#define ArCmd ArCmdBase cq +#else +#define ArCmd ArCmdBase clq +#endif +#endif +#ifndef ArAddCmd +#if HasLargeTmp || SystemV4 +#define ArAddCmd ArCmdBase ru +#else +#define ArAddCmd ArCmdBase rul +#endif +#endif +#ifndef ArExtCmd +#if HasLargeTmp || SystemV4 +#define ArExtCmd ArCmdBase x +#else +#define ArExtCmd ArCmdBase xl +#endif +#endif +#ifndef BootstrapCFlags +#define BootstrapCFlags /**/ +#endif +#ifndef HasGcc3 +#define HasGcc3 NO +#endif +#ifndef HasGcc2 +#define HasGcc2 HasGcc3 +#endif +#ifndef HasGcc +#define HasGcc HasGcc2 +#endif +#ifndef HasIntelC +#define HasIntelC NO +#endif +#ifndef HasSunC +#define HasSunC NO +#endif +#ifndef HasBrokenCCForLink +#define HasBrokenCCForLink NO +#endif +#ifndef CcCmd +#if HasGcc2 +#define CcCmd gcc -fpcc-struct-return +#else +#if HasGcc +#define CcCmd gcc -fstrength-reduce -fpcc-struct-return +#else +#if HasCenterLineC +#define CcCmd clcc +#else +#define CcCmd cc +#endif +#endif +#endif +#endif +#ifndef CplusplusCmd +#if HasGcc2ForCplusplus +#define CplusplusCmd g++ +#else +#define CplusplusCmd CC +#endif +#endif +#ifndef CplusplusFilt +# define CplusplusFilt c++filt +#endif +#ifndef CplusplusLibC +#if HasGcc2ForCplusplus +#define CplusplusLibC -lstdc++ +#else +#define CplusplusLibC /**/ +#endif +#endif +#ifndef CplusplusStandardDefines +#define CplusplusStandardDefines StandardDefines +#endif +#ifndef CplusplusExtraDefines +#define CplusplusExtraDefines /**/ +#endif +#ifndef CplusplusExtraIncludes +#define CplusplusExtraIncludes /**/ +#endif +#ifndef CplusplusDependIncludes +#define CplusplusDependIncludes /**/ +#endif +#ifndef CplusplusOptions +#define CplusplusOptions DefaultCplusplusOptions +#endif +#ifndef CplusplusSpecialOptions +#define CplusplusSpecialOptions /**/ +#endif +#if HasFortran +#ifndef FortranCmd +#define FortranCmd f77 +#endif +#ifndef FortranFlags +#define FortranFlags /**/ +#endif +#ifndef FortranDebugFlags /* for -O or -g */ +#define FortranDebugFlags /**/ +#endif +#endif +#ifndef AsCmd +#define AsCmd as +#endif +#ifndef AsmDefines +#define AsmDefines /**/ +#endif +#ifndef CompressCmd +#define CompressCmd compress +#endif +#ifndef GzipCmd +#define GzipCmd gzip +#endif +#ifndef CppCmd +#define CppCmd /LibDirName/cpp +#endif +#ifndef RawCppCmd +#define RawCppCmd CppCmd -undef +#endif +#ifndef CppNoLineInfoOption +#define CppNoLineInfoOption /**/ +#endif +#ifndef PreProcessCmd +#define PreProcessCmd CcCmd -E +#endif +#ifndef InstallCmd /* hack should be in project */ +#if SystemV || SystemV4 +#ifdef UseInstalled /* assume BINDIR in path */ +#define InstallCmd bsdinst +#else +#define InstallCmd $(SHELL) $(CONFIGSRC)/util/bsdinst.sh +#endif +#else +#define InstallCmd install +#endif +#endif +#ifndef InstallFlags +#define InstallFlags -c +#endif +#ifndef StripCmd +#define StripCmd strip +#endif +#ifndef LdCmd +#define LdCmd ld +#endif +#ifndef M4Cmd +#define M4Cmd m4 +#endif +#ifndef M4Flags +#define M4Flags /**/ +#endif +#ifndef LexCmd +#define LexCmd lex +#endif +#ifndef LexLib +#define LexLib -ll +#endif +#ifndef HasFlex +#define HasFlex NO +#endif +#ifndef YaccCmd +#define YaccCmd yacc +#endif +#ifndef CplusplusYaccCmd +#define CplusplusYaccCmd YaccCmd +#endif +#ifndef LintCmd +#define LintCmd lint +#endif +#ifndef LintLibFlag +#if SystemV || SystemV4 +#define LintLibFlag -o +#else +#define LintLibFlag -C +#endif +#endif +#ifndef LintOpts +#if SystemV || SystemV4 +#define LintOpts -bh +#else +#define LintOpts -axz +#endif +#endif +#ifndef CpCmd +#define CpCmd cp +#endif +#ifndef LnCmd /* can use cp instead of ln if necessary */ +#if HasSymLinks +#define LnCmd ln -s +#else +#define LnCmd ln +#endif +#endif +#ifndef MakeCmd +#define MakeCmd make +#endif +#ifndef MvCmd +#define MvCmd mv -f +#endif +#ifndef RanlibCmd +#define RanlibCmd ranlib +#endif +#ifndef RanlibInstFlags +#define RanlibInstFlags /**/ +#endif +#ifndef RmCmd +#define RmCmd rm -f +#endif + +/* + * Module cross-compile stuff. By default they are defined to be exactly the + * same as the non-module versions. + */ +#ifndef ModuleCcCmd +#define ModuleCcCmd CcCmd +#endif +#ifndef ModuleCppCmd +#define ModuleCppCmd CppCmd +#endif +#ifndef ModuleCFlags +#define ModuleCFlags $(CFLAGS) +#endif +#ifndef ModuleAsCmd +#define ModuleAsCmd AsCmd +#endif +#ifndef ModuleAsFlags +#define ModuleAsFlags /**/ +#endif +#ifndef ModuleLdCmd +#define ModuleLdCmd LdCmd +#endif +#ifndef ModuleLdFlags +#define ModuleLdFlags /**/ +#endif +#ifndef ModuleLdCombineFlags +#define ModuleLdCombineFlags LdCombineFlags +#endif +#ifndef ModuleArCmd +#define ModuleArCmd ArCmd +#endif +#ifndef NeedModuleRanlib +#define NeedModuleRanlib NO +#endif +#ifndef ModuleRanlibCmd +#define ModuleRanlibCmd RanlibCmd +#endif + +#ifndef HostCcCmd +#define HostCcCmd cc +#endif +#ifndef StandardIncludes /* for platform-specifics */ +#define StandardIncludes /**/ +#endif +#ifndef StandardDefines +#if SystemV +#define StandardDefines -DSYSV +#else +#if SystemV4 +#define StandardDefines -DSVR4 +#else +#define StandardDefines /**/ +#endif +#endif +#endif +#ifndef StandardCppOptions +#define StandardCppOptions /**/ +#endif +#ifndef StandardCppDefines +#define StandardCppDefines StandardCppOptions StandardDefines +#endif +#ifndef Malloc0ReturnsNull +#if UseGnuMalloc +#define Malloc0ReturnsNull YES +#else +#define Malloc0ReturnsNull NO +#endif +#endif +#if Malloc0ReturnsNull +#ifndef Malloc0ReturnsNullDefines +#define Malloc0ReturnsNullDefines -DMALLOC_0_RETURNS_NULL +#endif +#endif +#ifndef ToolkitStringsABIOptions +#define ToolkitStringsABIOptions /**/ +#endif +#ifndef HasSetitimer +#define HasSetitimer YES +#endif +#ifndef HasSetitimerDefines +#define HasSetitimerDefines -DHAVE_SETITIMER=1 +#endif +#ifndef HasLdRunPath +#define HasLdRunPath NO +#endif +#ifndef LdPreLib +# if !defined(UseInstalled) +# define LdPreLib -L$(BUILDLIBDIR) +# else +# if AlternateUsrLibDir +# define LdPreLib -L$(USRLIBDIR) +# else +# define LdPreLib /**/ +# endif +#endif +#endif +#ifndef LdPostLib +#if !defined(UseInstalled) && AlternateUsrLibDir && !HasLdRunPath && !defined(CrossCompileDir) +#define LdPostLib -L$(USRLIBDIR) +#else +#define LdPostLib /**/ +#endif +#endif +#ifndef MathLibrary +#define MathLibrary -lm +#endif +#ifndef DlLibrary +#define DlLibrary -ldl +#endif +#ifndef ExtraLibraries +#if SystemV4 +#if HasSockets +#define ExtraLibraries -lsocket -lnsl -lw +#else +#define ExtraLibraries -lnsl -lw +#endif +#else +#define ExtraLibraries /**/ +#endif +#endif +#ifndef ExtraLoadOptions +#define ExtraLoadOptions /**/ +#endif +#ifndef ExtraLoadFlags +#define ExtraLoadFlags /**/ +#endif +#ifndef LdCombineFlags +#if SystemV4 +#define LdCombineFlags -r +#else +#define LdCombineFlags -X -r +#endif +#endif +#ifndef LdStripFlags +#define LdStripFlags -x +#endif +#ifndef TagsCmd +#define TagsCmd ctags +#endif +#ifndef LoaderLibPrefix +#define LoaderLibPrefix /**/ +#endif +#ifndef ImakeCmd +#define ImakeCmd imake +#endif +#ifndef ImakeWarningFlags +#define ImakeWarningFlags /* Nothing */ +#endif +#ifndef DependCmd +#define DependCmd gccmakedep +#endif +#ifndef DependDefines +# if UseCCMakeDepend || UseGccMakeDepend +# define DependDefines /**/ +# else +# define DependDefines -DUSE_MAKEDEPEND +# endif +#endif +#ifndef DependFlags +#define DependFlags /**/ +#endif +#ifndef DependFileName +#if !HasBsdMake +#define DependFileName Makefile.dep +#else +#define DependFileName .depend +#endif +#endif +#ifndef ExportListCmd +# ifndef ExportListGenSource +# define ExportListCmd /**/ +# elif !defined(UseInstalled) +# define ExportListCmd $(CONFIGSRC)/util/exportlistgen +# else +# define ExportListCmd exportlistgen +# endif +#endif +#ifndef MkdirHierCmd +#ifdef UseInstalled /* assume BINDIR in path */ +#define MkdirHierCmd mkdirhier +#else +#define MkdirHierCmd $(SHELL) $(CONFIGSRC)/util/mkdirhier.sh +#endif +#endif +#ifndef RevPathCmd +#ifdef UseInstalled /* assume BINDIR in path */ +#define RevPathCmd revpath +#else +#define RevPathCmd $(CONFIGSRC)/util/revpath +#endif +#endif +#ifndef TroffCmd +#if HasGroff +#define TroffCmd groff -Tps +#else +#define TroffCmd troff -Tps +#endif +#endif +#ifndef NroffCmd +#define NroffCmd nroff +#endif +#ifndef HTMLroffCmd +#if HasGroff && HasGroffHtml +#define HTMLroffCmd groff -Thtml +#endif +#endif +#ifdef HTMLroffCmd +#ifndef DocFilesToClean +#define DocFilesToClean grohtml*.png *-auto-*.png +#endif +#endif +#ifndef MsMacros +#define MsMacros -ms +#endif +#ifndef ManMacros +#define ManMacros -man +#endif +#ifndef TblCmd +#define TblCmd tbl +#endif +#ifndef EqnCmd +#define EqnCmd eqn +#endif +#ifndef NeqnCmd +#define NeqnCmd neqn +#endif +#ifndef ColCmd +#define ColCmd col +#endif +#ifndef ColFlags +#define ColFlags -b +#endif +#ifndef DvipsCmd +#define DvipsCmd dvips +#endif +#ifndef LatexCmd +#define LatexCmd latex +#endif +#ifndef HasPdfLatex +#define HasPdfLatex NO +#endif +#ifndef PdfLatexCmd +#define PdfLatexCmd pdflatex +#endif +#ifndef GhostScriptCmd +#define GhostScriptCmd gs +#endif +#ifndef HasGhostPCL +#define HasGhostPCL NO +#endif +#ifndef HasGhostScript +#define HasGhostScript NO +#endif +#ifndef BuildPDFdocs +#define BuildPDFdocs (HasGhostScript) +#endif +#if BuildPDFdocs +#define PsToPdfCmd GhostScriptCmd -q -sOutputFile=- -sDEVICE=pdfwrite -dSAFER -dNOPAUSE - +#endif +#if HasSentinel +#ifndef SentinelCmd +#define SentinelCmd sentinel +#endif +#ifndef SentinelOptions +#define SentinelOptions /**/ +#endif +#endif +#if HasPurify +#ifndef PurifyCmd +#define PurifyCmd purify +#endif +#ifndef PurifyOptions +#define PurifyOptions /**/ +#endif +#endif +#if HasTestCenter +#ifndef ProofCmd +#define ProofCmd proof +#endif +#ifndef ProofOptions +#define ProofOptions /**/ +#endif +#endif +#ifndef PathSeparator +#define PathSeparator / +#endif +#ifndef Osuf +#define Osuf o +#endif +#ifndef CCsuf +#define CCsuf cc +#endif +#ifndef SHsuf +#define SHsuf sh +#endif +#ifndef ManSuffix +#define ManSuffix n /* use just one tab or cpp will die */ +#endif +#ifndef LibManSuffix +#define LibManSuffix 3 /* use just one tab or cpp will die */ +#endif +#ifndef FileManSuffix +#if SystemV || SystemV4 +#define FileManSuffix 4 /* use just one tab or cpp will die */ +#else +#define FileManSuffix 5 /* use just one tab or cpp will die */ +#endif +#endif +#ifndef MiscManSuffix +#if SystemV || SystemV4 +#define MiscManSuffix 5 /* use just one tab or cpp will die */ +#else +#define MiscManSuffix 7 /* use just one tab or cpp will die */ +#endif +#endif +#ifndef DriverManSuffix +#if SystemV || SystemV4 +#define DriverManSuffix 7 /* use just one tab or cpp will die */ +#else +#define DriverManSuffix 4 /* use just one tab or cpp will die */ +#endif +#endif +#ifndef AdminManSuffix +#if SystemV || SystemV4 +#define AdminManSuffix 1m /* use just one tab or cpp will die */ +#else +#define AdminManSuffix 8 /* use just one tab or cpp will die */ +#endif +#endif +#ifndef ExpandManNames +#if SystemV +#define ExpandManNames NO +#else +#define ExpandManNames YES +#endif +#endif +#ifndef ManSrcSuffix +#define ManSrcSuffix man +#endif +#ifndef ManNewSuffix +#define ManNewSuffix _man +#endif +#ifndef TOPDIR +#define TOPDIR . +#endif +#ifndef CURDIR +#define CURDIR . +#endif +#ifndef SiteIConfigFiles +#define SiteIConfigFiles /**/ +#endif +#ifndef OtherIConfigFiles +#define OtherIConfigFiles /**/ +#endif +#ifndef ExtraFilesToClean +#define ExtraFilesToClean /**/ +#endif +#ifndef DocFilesToClean +#define DocFilesToClean /**/ +#endif +#ifndef FilesToClean +#define FilesToClean *.CKP *.ln *.BAK *.bak *.Osuf core errs ,* *~ *.a .emacs_* tags TAGS make.log MakeOut +#endif + +#ifdef CrossCompileDir +# ifndef StripPath +# define StripPath(x) `echo x|sed "s%.*/%%"` +# endif +# ifndef CrossArCmd +# define CrossArCmd Concat3(CrossCompileDir,/,StripPath(ArCmd)) +# endif +# ifndef CrossCcCmd +# define CrossCcCmd Concat3(CrossCompileDir,/,StripPath(CcCmd)) +# endif +# ifndef CrossAsCmd +# define CrossAsCmd Concat3(CrossCompileDir,/,StripPath(AsCmd)) +# endif +# ifdef HasFortran +# ifndef CrossFortranCmd +# define CrossFortranCmd Concat3(CrossCompileDir,/,StripPath(FortranCmd)) +# endif +# endif +# ifndef CrossCplusplusCmd +# define CrossCplusplusCmd Concat3(CrossCompileDir,/,StripPath(CplusplusCmd)) +# endif +# ifndef CrossCppCmd +# define CrossCppCmd Concat3(CrossCompileDir,/,StripPath(CppCmd)) +# endif +# ifndef CrossRawCppCmdCmd +# define CrossRawCppCmd Concat3(CrossCompileDir,/,StripPath(RawCppCmd)) +# endif +# ifndef CrossPreProcessCmd +# define CrossPreProcessCmd Concat3(CrossCompileDir,/,StripPath(PreProcessCmd)) +# endif +# ifndef CrossAsCmd +# define CrossAsCmd Concat3(CrossCompileDir,/,StripPath(AsCmd)) +# endif +# ifndef CrossLdCmd +# define CrossLdCmd Concat3(CrossCompileDir,/,StripPath(LdCmd)) +# endif +# ifndef CrossModuleLdCmd +# define CrossModuleLdCmd CrossLdCmd +# endif +# ifndef CrossLintCmd +# define CrossLintCmd Concat3(CrossCompileDir,/,StripPath(LintCmd)) +# endif +# ifndef CrossRanlibCmd +# define CrossRanlibCmd Concat3(CrossCompileDir,/,StripPath(RanlibCmd)) +# endif +# ifndef CrossModuleCcCmd +# define CrossModuleCcCmd Concat3(CrossCompileDir,/,StripPath(ModuleCcCmd)) +# endif +# ifndef CrossAsCmd +# define CrossAsCmd Concat3(CrossCompileDir,/,StripPath(AsCmd)) +# endif +# ifndef CrossStripCmd +# define CrossStripCmd Concat3(CrossCompileDir,/,StripPath(StripCmd)) +# endif +#endif + + PATHSEP = PathSeparator + SHELL = BourneShell + + TOP = TOPDIR + CURRENT_DIR = CURDIR + + IMAKE = ImakeCmd + DEPEND = DependCmd + MKDIRHIER = MkdirHierCmd + REVPATH = RevPathCmd + EXPORTLISTGEN = ExportListCmd + RMAN = RmanCmd + RMANBASENAME = HostProgramTargetName(rman) + RMANOPTIONS = RmanOptions + CONFIGSRC = ConfigSrc + IMAKESRC = $(CONFIGSRC)/imake + DEPENDSRC = DependDir + + INCROOT = IncRoot /* base of where to put header files */ + USRLIBDIR = UsrLibDir /* nonshared libraries */ + USRDATADIR = UsrDataDir /* arch-indep files (XErrorDB, etc.) */ + VARDIR = VarDirectory /* usually /var */ + VARLIBDIR = VarLibDir /* xdm runtime files */ + SYSTEMUSRLIBDIR = SystemUsrLibDir /* system's "/usr/lib" */ + SYSTEMUSRINCDIR = SystemUsrIncDir /* system's "/usr/include" */ + SHLIBDIR = ShLibDir /* shared libraries */ + LINTLIBDIR = LintlibDir /* lint libraries */ + MANPATH = ManPath /* top of manual page tree */ + MANSOURCEPATH = ManSourcePath /* prefix for man page sources */ + MANDIR = ManDir /* man pages for commands */ + LIBMANDIR = LibmanDir /* man pages for library routines */ + FILEMANDIR = FileManDir /* man pages for config files */ + MISCMANDIR = MiscManDir /* man pages for miscellaneous files */ + DRIVERMANDIR = DriverManDir /* man pages for drivers */ + LOGDIRECTORY = LogDirectory /* OS location of log files */ +#ifdef VarRunDirectory + VARRUNDIR = VarRunDirectory /* OS location of PID files */ +#endif +#ifdef VarDbDirectory + VARDBDIR = VarDbDirectory /* OS location of db/state files */ +#endif +#ifdef CrossCompileDir + AR = CrossArCmd +#else + AR = ArCmd +#endif +XCOMM Nice try but useless: make will inherit BOOTSTRAPCFLAGS +XCOMM from top Makefile + BOOTSTRAPCFLAGS = BootstrapCFlags /* set if cpp does not have uniq sym */ +#ifdef CrossCompileDir + CC = CrossCcCmd + AS = CrossAsCmd +#else + CC = CcCmd + AS = AsCmd +#endif +#if HasFortran +# ifdef CrossCompileDir + FC = CrossFortranCmd +# else + FC = FortranCmd +# endif + FDEBUGFLAGS = FortranDebugFlags + FCFLAGS = FortranFlags $(FDEBUGFLAGS) +#endif +#if HasCplusplus + +.SUFFIXES: Concat(.,CCsuf) + +#ifdef CrossCompileDir + CXX = CrossCplusplusCmd +#else + CXX = CplusplusCmd +#endif + CXXFILT = CplusplusFilt +#ifdef CplusplusLibCDir + CXXLIBDIR = CplusplusLibCDir + CXXLIB = -L$(CXXLIBDIR) CplusplusLibC +#else + CXXLIB = CplusplusLibC +#endif + + CXXDEBUGFLAGS = DefaultCplusplusDebugFlags +CXXDEPENDINCLUDES = CplusplusDependIncludes + CXXEXTRA_DEFINES = CplusplusExtraDefines +CXXEXTRA_INCLUDES = CplusplusExtraIncludes + CXXSTD_DEFINES = CplusplusStandardDefines $(CXXPROJECT_DEFINES) + CXXOPTIONS = CplusplusOptions + CXXINCLUDES = $(INCLUDES) $(TOP_INCLUDES) $(CXXEXTRA_INCLUDES) + CXXDEFINES = $(CXXINCLUDES) $(CXXSTD_DEFINES) $(THREADS_CXXDEFINES) $(DEFINES) $(CXXEXTRA_DEFINES) + CXXFLAGS = $(CXXDEBUGFLAGS) $(CXXOPTIONS) $(THREADS_CXXFLAGS) $(CXXDEFINES) +#endif + COMPRESS = CompressCmd + GZIPCMD = GzipCmd +#ifdef CrossCompileDir + CPP = CrossCppCmd $(STD_CPP_DEFINES) + RAWCPP = CrossRawCppCmd $(STD_CPP_OPTIONS) + PREPROCESSCMD = CrossPreProcessCmd $(STD_CPP_DEFINES) +#else + CPP = CppCmd $(STD_CPP_DEFINES) /* simple filters */ + RAWCPP = RawCppCmd $(STD_CPP_OPTIONS) + PREPROCESSCMD = PreProcessCmd $(STD_CPP_DEFINES) /* prefered; mdep */ +#endif + INSTALL = InstallCmd + INSTALLFLAGS = InstallFlags +#ifdef CrossCompileDir + LD = CrossLdCmd +#else + LD = LdCmd +#endif + LEX = LexCmd + M4 = M4Cmd + M4FLAGS = M4Flags + LEXLIB = LexLib + YACC = YaccCmd + CCYACC = CplusplusYaccCmd +#ifdef CrossCompileDir + LINT = CrossLintCmd +#else + LINT = LintCmd +#endif + LINTLIBFLAG = LintLibFlag + LINTOPTS = LintOpts + LN = LnCmd + MAKE = MakeCmd + MV = MvCmd + CP = CpCmd +#if DoRanlibCmd +#ifdef CrossCompileDir + RANLIB = CrossCompileDir/RanlibCmd +#else + RANLIB = RanlibCmd +#endif + RANLIBINSTFLAGS = RanlibInstFlags +#endif + RM = RmCmd + PERL = PerlCmd + PERLOPTS = PerlOptions + PERLENVSETUP = PerlEnvSetup + MANSUFFIX = ManSuffix /* suffix for command man pages */ + LIBMANSUFFIX = LibManSuffix /* suffix for library man pages */ + FILEMANSUFFIX = FileManSuffix /* suffix for file format man pages */ + MISCMANSUFFIX = MiscManSuffix /* suffix for misc man pages */ + DRIVERMANSUFFIX = DriverManSuffix /* suffix for driver man pages */ + ADMINMANSUFFIX = AdminManSuffix /* suffix for admin command man pages */ + MANSRCSUFFIX = ManSrcSuffix /* suffix for man page source */ + MANNEWSUFFIX = ManNewSuffix /* suffix for preprocessed man source */ + MANDEFS = AppLoadDefs AppManDefs FileManDefs LibManDefs MiscManDefs DriverManDefs AdminManDefs ProjectManDefs XConfigFileManDefs XConfigDirManDefs XLogFileManDefs XServerManDefs $(XORGMANDEFS) $(VENDORMANDEFS) + + COMPRESSMANCMD = CompressManCmd + + TROFF = TroffCmd + NROFF = NroffCmd +#ifdef HTMLroffCmd + HTMLROFF = HTMLroffCmd +#endif +#ifdef PsToPdfCmd + PSTOPDFCMD = PsToPdfCmd +#endif + MSMACROS = MsMacros + MANMACROS = ManMacros + TBL = TblCmd + EQN = EqnCmd + NEQN = NeqnCmd + COL = ColCmd + COLFLAGS = ColFlags +#ifdef CrossCompileDir + MODCC = CrossModuleCcCmd +#else + MODCC = ModuleCcCmd +#endif + MODCPP = ModuleCppCmd + MODCFLAGS = ModuleCFlags + MODAS = ModuleAsCmd + MODASFLAGS = ModuleAsFlags +#ifdef CrossCompileDir + MODLD = CrossModuleLdCmd +#else + MODLD = ModuleLdCmd +#endif + MODLDFLAGS = ModuleLdFlags +MODLDCOMBINEFLAGS = ModuleLdCombineFlags + MODAR = ModuleArCmd +#ifdef CrossCompileDir + MODRANLIB = CrossCompileDir/ModuleRanlibCmd +#else + MODRANLIB = ModuleRanlibCmd +#endif +#if HasLatex + DVIPS = DvipsCmd + LATEX = LatexCmd +#endif +#if HasPdfLatex + PDFLATEXCMD = PdfLatexCmd +#endif +#if HasSentinel + SENTINEL = SentinelCmd + SENTINELOPTIONS = SentinelOptions +#endif +#if HasPurify + PURIFY = PurifyCmd + PURIFYOPTIONS = PurifyOptions +#endif +#if HasTestCenter + PROOF = ProofCmd + PROOFOPTIONS = ProofOptions +#endif +#if CrossCompiling + HOST_CC = HostCcCmd +#endif + STD_INCLUDES = StandardIncludes + STD_CPP_OPTIONS = StandardCppOptions + STD_CPP_DEFINES = StandardCppOptions StandardCppDefines $(PROJECT_DEFINES) + STD_DEFINES = StandardDefines $(PROJECT_DEFINES) +SETITIMER_DEFINES = HasSetitimerDefines + EXTRA_LOAD_FLAGS = ExtraLoadFlags + EXTRA_LDOPTIONS = ExtraLoadOptions + EXTRA_LIBRARIES = MallocLibraries ExtraLibraries + TAGS = TagsCmd +#if ConstructMFLAGS + MFLAGS = -$(MAKEFLAGS) +#endif +#if ConstructMAKEFLAGS + MAKEFLAGS = $(MFLAGS) +#endif + PARALLELMFLAGS = ParallelMakeFlags +#if HasSharedLibraries + SHAREDCODEDEF = SharedCodeDef + SHLIBDEF = SharedLibraryDef +#ifdef SharedLibraryLoadFlags + SHLIBLDFLAGS = SharedLibraryLoadFlags $(SHLIBGLOBALSFLAGS) +#if HasGcc + NOSTDLIB = -nostdlib + POSTNOSTDLIB = -Wl,-Bstatic -lgcc -Wl,-Bdynamic +#elif HasIntelC + NOSTDLIB = -nostdlib + POSTNOSTDLIB = +#elif HasSunC + NOSTDLIB = -xnolib + POSTNOSTDLIB = +#endif +#endif + +#if HasXfont2 +FONT_DEFINES = -DHAS_XFONT2 + XFONTLIB = -lXfont2 +#else +FONT_DEFINES = + XFONTLIB = -lXfont +#endif + +/* + * Here we set up flags needed to produce position-independent code + * when doing C and C++ compilation. The default if you specify C + * PIC flags without also specifying C++ PIC flags is to assume that + * the C flags work for both. If your C++ compiler requires different + * flags, specify them explicitly in PositionIndependentCplusplusFlags. + */ +#ifdef PositionIndependentCFlags + PICFLAGS = PositionIndependentCFlags +#endif +#ifdef PositionIndependentCplusplusFlags + CXXPICFLAGS = PositionIndependentCplusplusFlags +#else +#ifdef PositionIndependentCFlags + CXXPICFLAGS = PositionIndependentCFlags +#endif +#endif +#endif +#if !HasVoidSignalReturn + SIGNAL_DEFINES = -DSIGNALRETURNSINT +#endif +/* + * The following supports forcing of function prototypes + */ +#if NeedFunctionPrototypes && NeedVarargsPrototypes && NeedConstPrototypes && NeedNestedPrototypes +#define _funcprotodef -DFUNCPROTO=15 +#else +#if NeedFunctionPrototypes && NeedVarargsPrototypes && NeedNestedPrototypes +#define _funcprotodef -DFUNCPROTO=11 +#else +#if NeedFunctionPrototypes && NeedNestedPrototypes +#define _funcprotodef -DFUNCPROTO=9 +#else +#if NeedFunctionPrototypes && NeedVarargsPrototypes && NeedConstPrototypes +#define _funcprotodef -DFUNCPROTO=7 +#else +#if NeedFunctionPrototypes && NeedConstPrototypes +#define _funcprotodef -DFUNCPROTO=5 +#else +#if NeedFunctionPrototypes && NeedVarargsPrototypes +#define _funcprotodef -DFUNCPROTO=3 +#else +#if NeedFunctionPrototypes +#define _funcprotodef -DFUNCPROTO +#else +#define _funcprotodef /**/ +#endif +#endif +#endif +#endif +#endif +#endif +#endif +#if NeedWidePrototypes +#define _wideprotodef /**/ +#else +#define _wideprotodef -DNARROWPROTO +#endif + PROTO_DEFINES = _funcprotodef _wideprotodef +#undef _funcprotodef +#undef _wideprotodef + +#if StripInstalledPrograms + INSTPGMFLAGS = InstPgmFlags /* install flags for stripping */ +#else + INSTPGMFLAGS = +#endif + INSTBINFLAGS = InstBinFlags /* install flags for programs */ + INSTUIDFLAGS = InstUidFlags /* install flags for setuid programs */ + INSTLIBFLAGS = InstLibFlags /* install flags for libraries */ + INSTINCFLAGS = InstIncFlags /* install flags for headers */ + INSTMANFLAGS = InstManFlags /* install flags for man pages */ + INSTDATFLAGS = InstDatFlags /* install flags for data files */ + INSTKMEMFLAGS = InstKmemFlags /* install flags for /dev/kmem progs */ + +#ifdef ProjectRoot + PROJECTROOT = ProjectRoot +#endif +#ifdef UseInstalled +# if AlternateIncRoot +# define TopInclude -I$(INCROOT) +# else +# define TopInclude /**/ +# endif +#else +# define TopInclude -I$(TOP) +#endif + + CDEBUGFLAGS = DefaultCDebugFlags + CCOPTIONS = DefaultCCOptions /* to distinguish from param flags */ +/* + * STD_INCLUDES contains system-specific includes + * TOP_INCLUDES specifies how to get to /usr/include or its build substitute + * EXTRA_INCLUDES contains project-specific includes set in project incfiles + * INCLUDES contains client-specific includes set in Imakefile + * LOCAL_LDFLAGS contains client-specific ld flags flags set in Imakefile + */ + ALLINCLUDES = $(INCLUDES) $(EXTRA_INCLUDES) $(TOP_INCLUDES) $(INSTALLED_INCLUDES) $(STD_INCLUDES) + ALLDEFINES = $(ALLINCLUDES) $(STD_DEFINES) $(SETITIMER_DEFINES) $(FONT_DEFINES) $(PROTO_DEFINES) $(THREADS_DEFINES) $(MODULE_DEFINES) $(DEFINES) $(EXTRA_DEFINES) + CFLAGS = $(CDEBUGFLAGS) $(CCOPTIONS) $(THREADS_CFLAGS) $(MODULE_CFLAGS) $(ALLDEFINES) + LINTFLAGS = $(LINTOPTS) -DLINT $(ALLDEFINES) $(DEPEND_DEFINES) + LDPRELIB = LdPreLib $(INSTALLED_LIBS) + LDPOSTLIB = LdPostLib + LDOPTIONS = $(CDEBUGFLAGS) $(CCOPTIONS) $(EXTRA_LDOPTIONS) $(THREADS_LDFLAGS) $(LOCAL_LDFLAGS) $(LDPRELIBS) + CXXLDOPTIONS = $(CXXDEBUGFLAGS) $(CXXOPTIONS) $(EXTRA_LDOPTIONS) $(THREADS_CXXLDFLAGS) $(LOCAL_LDFLAGS) $(LDPRELIBS) + + LDLIBS = $(LDPOSTLIBS) $(THREADS_LIBS) $(SYS_LIBRARIES) $(EXTRA_LIBRARIES) +#if HasBrokenCCForLink + CCLINK = LdCmd +#else +#if AlternateUsrLibDir && HasLdRunPath + CCENVSETUP = LD_RUN_PATH=$(USRLIBDIRPATH) + CCLINK = $(CCENVSETUP) $(CC) +#else + CCLINK = $(CC) +#endif +#endif +#if AlternateUsrLibDir && HasLdRunPath + CXXENVSETUP = LD_RUN_PATH=$(USRLIBDIRPATH) + CXXLINK = $(CXXENVSETUP) $(CXX) +#else + CXXLINK = $(CXX) +#endif + LDSTRIPFLAGS = LdStripFlags + LDCOMBINEFLAGS = LdCombineFlags + DEPENDFLAGS = DependFlags + DEPEND_DEFINES = DependDefines + +XCOMM Not sure this belongs here + TKLIBDIR = TkLibDir + TKINCDIR = TkIncDir + TKLIBNAME = TkLibName + TKLIBRARY = TkLibrary + TCLLIBDIR = TclLibDir + TCLINCDIR = TclIncDir + TCLLIBNAME = TclLibName + TCLLIBRARY = TclLibrary + + MACROFILE = MacroFile + RM_CMD = $(RM) + + IMAKE_DEFINES = /* leave blank, for command line use only */ + IMAKE_WARNINGS = ImakeWarningFlags +#ifdef UseInstalled + IRULESRC = $(CONFIGDIR) /* used in rules file */ + IMAKE_CMD = $(IMAKE) -DUseInstalled -I$(IRULESRC) $(IMAKE_DEFINES) \ + $(IMAKE_WARNINGS) +#else + IRULESRC = $(CONFIGSRC)/cf + IMAKE_CMD = $(IMAKE) -I$(IRULESRC) $(IMAKE_DEFINES) $(IMAKE_WARNINGS) +#endif +#if !HasClearmake + /* clearmake records relevant defines and flags in the build script, + so it knows when they change and we don't need this coarser-level + dependency. We also don't want it, since it prevents sharing if + even one config file, say site.def or host.def, changes. */ + ICONFIGFILES = $(IRULESRC)/Imake.tmpl $(IRULESRC)/X11.tmpl \ + $(IRULESRC)/site.def $(IRULESRC)/$(MACROFILE) \ + OtherIConfigFiles SiteIConfigFiles $(EXTRA_ICONFIGFILES) +#endif + +#ifndef TopLevelProject +# define TopLevelProject X11 +#endif +#ifndef ProjectRulesFile +# define ProjectRulesFile Concat3(<,TopLevelProject,.rules>) +#endif +#include ProjectRulesFile +#ifndef LocalRulesFile +/* need this to make ANSI-style preprocessors happy */ +#define LocalRulesFile <noop.rules> +#endif +#include LocalRulesFile + +/* + * get project-specific configuration and rules + */ +#ifndef ProjectTmplFile +#define ProjectTmplFile Concat3(<,TopLevelProject,.tmpl>) +#endif +#include ProjectTmplFile +#ifndef LocalTmplFile +/* need this to make ANSI-style preprocessors happy */ +#define LocalTmplFile <noop.rules> +#endif +#include LocalTmplFile + +#if !BuildLibraries && AlternateIncRoot && !defined(CrossCompileDir) +INSTALLED_INCLUDES = -I$(INCROOT) +#endif + +#if !defined(UseInstalled) && !BuildLibraries && AlternateUsrLibDir && !defined(CrossCompileDir) +INSTALLED_LIBS = -L$(USRLIBDIR) +#endif + +#ifdef FixupLibReferences +FixupLibReferences() +#endif + +/* ConfigDir comes from X11.tmpl */ + CONFIGDIR = ConfigDir /* build configuration information */ +#if HasClearmake + OSNAME = OSName +#endif + USRLIBDIRPATH = UsrLibDirPath + LDPRELIBS = LdPreLibs $(INSTALLED_LIBS) + LDPOSTLIBS = LdPostLibs + TOP_INCLUDES = TopIncludes + PROJECT_DEFINES = ProjectDefines + VENDOR_DEFINES = VendorDefines +#if HasCplusplus +CXXPROJECT_DEFINES = CplusplusProjectDefines +#endif + +XCOMM ---------------------------------------------------------------------- +XCOMM start of Imakefile +#include INCLUDE_IMAKEFILE + +XCOMM ---------------------------------------------------------------------- +XCOMM common rules for all Makefiles - do not edit + +.c.i: + CPPOnlyCompile($*.c,$(_NOOP_)) + +.SUFFIXES: .ii + +.cc.ii: + CPPOnlyCompile($*.cc,$(_NOOP_)) + +.SUFFIXES: .s + +.c.s: + CompileCToAsm($(_NOOP_)) + +.cc.s: + CompileCplusplusToAsm($(_NOOP_)) + +/* + * These need to be here so that rules in Imakefile occur first; the blank + * emptyrule is to make sure that an empty Imakefile does not default to make + * clean. + */ +emptyrule:: + +CleanTarget() + +#ifndef IHaveSpecialMakefileTarget +MakefileTarget() +#endif + +#if BuildHtmlManPages +RmanDependency() +#endif + +TagsTarget() +#ifdef MakefileAdditions +MakefileAdditions() +#endif + +CenterLoadTarget(debug_src,$(SRCS),NullParameter,$(ALLDEFINES)) + +CenterLoadTarget(debug_obj,$(OBJS),NullParameter,$(ALLDEFINES)) + +ManKeywordsTarget($(MANPATH)) + +HtmlManIndex + +/* Generate the "real" clean rules */ +#undef clean + +clean:: cleandir + +distclean:: cleandir + +#ifdef IHaveSubdirs +XCOMM ---------------------------------------------------------------------- +XCOMM rules for building in SUBDIRS - do not edit + +InstallSubdirs($(SUBDIRS)) +InstallManSubdirs($(SUBDIRS)) +InstallDriverSDKSubdirs($(SUBDIRS)) +CleanSubdirs($(SUBDIRS)) +TagSubdirs($(SUBDIRS)) +MakefileSubdirs($(SUBDIRS)) +IncludesSubdirs($(SUBDIRS)) + +/* "distclean" subdirectories */ +#undef BootstrapCleanSubdirs +#define BootstrapCleanSubdirs /**/ +#define clean distclean +CleanSubdirs($(SUBDIRS)) +#undef clean + +#endif + +#if !DontPreprocessManPages || defined(PreprocessManPages) + PREPROCESSMANPAGES = true +#endif +/* must be after all install.man rules that install anything */ +#ifndef MakeManKeywords +#define MakeManKeywords NO +#endif +#if MakeManKeywords /* typically only at top level */ +install.man:: man_keywords +#endif + +/* must be after all install.man rules that install anything */ +#ifndef MakeHtmlManIndex +#define MakeHtmlManIndex NO +#endif +#if MakeHtmlManIndex /* typically only at top level */ +install.man:: html_index +#endif + +#ifndef IHaveSubdirs +XCOMM ---------------------------------------------------------------------- +XCOMM empty rules for directories that do not have SUBDIRS - do not edit + +install:: + @echo "install in $(CURRENT_DIR) done" + +install.man:: + @echo "install.man in $(CURRENT_DIR) done" + +install.sdk:: + @echo "install.sdk in $(CURRENT_DIR) done" + +Makefiles:: + +includes:: + +depend:: + +#endif /* if subdirectory rules are needed */ + +#ifndef IHaveSpecialMakefileTarget +/* "distclean" also removes the Makefile and the depend file */ +distclean:: + RemoveFiles(Makefile DependFileName) +#endif + +XCOMM ---------------------------------------------------------------------- +XCOMM dependencies generated by makedepend +IncludeMakefile(DependFileName) diff --git a/nx-X11/config/cf/Imakefile b/nx-X11/config/cf/Imakefile new file mode 100644 index 000000000..714a865c9 --- /dev/null +++ b/nx-X11/config/cf/Imakefile @@ -0,0 +1,74 @@ +XCOMM Some compilers generate fatal errors if an -L directory does +XCOMM not exist. Since BUILDLIBDIR may not exist yet suppress its use. + LDPRELIB = + LDPRELIBS = + +#ifdef LocalConfigFiles +LOCALFILES = LocalConfigFiles +#endif + +#ifndef InstallEmptyHostDef +HOSTDEFFILES = \ +host.def +#endif + +#if defined(XorgVersion) +VERSIONDEFFILES = +#endif + +DEFFILES = \ +xorgsite.def \ +$(VERSIONDEFFILES) \ +$(HOSTDEFFILES) \ +site.def \ +xorgversion.def \ +nxversion.def + +RULEFILES = \ +X11.rules \ +lnxLib.rules \ +noop.rules \ +xf86.rules + +TMPLFILES = \ +Library.tmpl \ +Server.tmpl \ +ServerLib.tmpl \ +Threads.tmpl \ +X11.tmpl \ +lnxLib.tmpl \ +xorg.tmpl + +CFFILES = \ +linux.cf \ +xorg.cf + +INSTFILES = $(RULEFILES) $(TMPLFILES) $(DEFFILES) $(CFFILES) $(LOCALFILES) + +all:: + +#if BuildLibraries +InstallMultipleDestFlags(install,$(INSTFILES),$(CONFIGDIR),$(INSTDATFLAGS)) +#endif + +InstallDriverSDKMultipleDestFlags($(INSTFILES),$(DRIVERSDKDIR)/config/cf,$(INSTDATFLAGS)) + +#ifdef InstallEmptyHostDef +install:: + @(TMP=/tmp/tmp.$$$$; \ + RemoveFile($${TMP}); \ + echo "" > $${TMP}; \ + $(INSTALL) $(INSTALLFLAGS) $(INSTDATFLAGS) $${TMP} \ + $(DESTDIR)$(CONFIGDIR)/host.def; \ + RemoveFile($${TMP})) + +#if defined(XorgVersion) +install.sdk:: + @(TMP=/tmp/tmp.$$$$; \ + RemoveFile($${TMP}); \ + echo "" > $${TMP}; \ + $(INSTALL) $(INSTALLFLAGS) $(INSTDATFLAGS) $${TMP} \ + $(DESTDIR)$(DRIVERSDKDIR)/config/cf/host.def; \ + RemoveFile($${TMP})) +#endif +#endif diff --git a/nx-X11/config/cf/Library.tmpl b/nx-X11/config/cf/Library.tmpl new file mode 100644 index 000000000..a5c9dc2a3 --- /dev/null +++ b/nx-X11/config/cf/Library.tmpl @@ -0,0 +1,575 @@ +/* + * Library imakefile info - this contains any special redefinitions, etc. + * that Imakefiles in the various library subtrees will need. + * + * Before including this, you must set the following boolean variables: + * DoNormalLib, DoSharedLib, DoDebugLib, DoProfileLib + * + * To get automatic generation of standard rules, also set the variables: + * LibName, SoRev, HasSharedData, and optionally HugeLibrary and IncSubdir. + * + * To suppress installation of the library define LibInstall NO. + * To suppress creating (and installing) the library define LibCreate NO. + * To suppress installing headers define LibHeaders NO. + * Define LargePICTable YES if large (32-bit) PIC tables are needed. + */ + +#ifndef DoNormalLib +#define DoNormalLib NO +#endif +#ifndef DoSharedLib +#define DoSharedLib NO +#endif +#ifndef DoDebugLib +#define DoDebugLib NO +#endif +#ifndef DoProfileLib +#define DoProfileLib NO +#endif +#ifndef DoExtraLib +#define DoExtraLib NO +#endif + +#ifndef HasSharedData +#define HasSharedData NO +#endif +#ifndef HugeLibrary +#define HugeLibrary NO +#endif + +#ifndef ShlibBindGlobals +#define ShlibBindGlobals NO +#endif + +#if ShlibBindGlobals && defined(ShlibGlobalsFlags) +SHLIBGLOBALSFLAGS = ShlibGlobalsFlags +#endif + +#ifndef LibraryCplusplusOptions +# if DoSharedLib && defined(SharedLibraryCplusplusOptions) +# define LibraryCplusplusOptions SharedLibraryCplusplusOptions +# else +# define LibraryCplusplusOptions DefaultCplusplusOptions +# endif +#endif +#ifndef LibraryDefines +# define LibraryDefines StandardDefines +#endif +#ifndef LibraryDebugOpt +# define LibraryDebugOpt /**/ +#endif +/* Note: Changing LibraryCDebugFlags has no effect because CDEBUGFLAGS is over- + ridden by PassCDebugFlags in the parent Makefile or toplevel xmakefile. */ +#ifndef LibraryCDebugFlags +# define LibraryCDebugFlags DefaultCDebugFlags +#endif +#ifndef LibraryCplusplusDebugFlags +# define LibraryCplusplusDebugFlags DefaultCplusplusDebugFlags +#endif +#ifndef SeparateSharedCompile +# define SeparateSharedCompile YES +#endif + +#ifdef CrossCompileDir +# ifndef StripPath +# define StripPath(x) `echo x|sed "s%.*/%%"` +# endif +#endif + +#ifndef CplusplusSource +# ifndef LibraryCcCmd +# if DoSharedLib && defined(SharedLibraryCcCmd) +# define LibraryCcCmd SharedLibraryCcCmd +# else +# define LibraryCcCmd CcCmd +# endif +# endif +# ifndef LibraryCCOptions +# if DoSharedLib && defined(SharedLibraryCCOptions) +# define LibraryCCOptions SharedLibraryCCOptions +# else +# define LibraryCCOptions DefaultCCOptions +# endif +# endif + +#ifdef CrossCompileDir +# ifndef CrossLibraryCcCmd +# define CrossLibraryCcCmd Concat3(CrossCompileDir,/,StripPath(LibraryCcCmd)) +# endif +#endif + +#ifdef CrossCompileDir + CC = CrossLibraryCcCmd +#else + CC = LibraryCcCmd +#endif + CCOPTIONS = LibraryCCOptions +STD_DEFINES = LibraryDefines $(PROJECT_DEFINES) +CDEBUGFLAGS = LibraryCDebugFlags +CLIBDEBUGFLAGS = LibraryDebugOpt + CFLAGS = $(CDEBUGFLAGS) $(CLIBDEBUGFLAGS) $(CCOPTIONS) $(THREADS_CFLAGS) $(ALLDEFINES) +# if defined(LargePICTable) && LargePICTable && defined(LargePositionIndependentCFlags) + PICFLAGS = LargePositionIndependentCFlags +# endif +#else +# ifndef CrossCompileDir +# ifndef LibraryCplusplusCmd +# if DoSharedLib && defined(SharedLibraryCplusplusCmd) +# define LibraryCplusplusCmd SharedLibraryCplusplusCmd +# else +# define LibraryCplusplusCmd CplusplusCmd +# endif +# endif +# else +# ifndef CrossLibraryCplusplusCmd +# if DoSharedLib && defined(SharedLibraryCplusplusCmd) +# define CrossLibraryCplusplusCmd Concat3(CrossCompileDir,/,StripPath(SharedLibraryCplusplusCmd)) +# else +# define CrossLibraryCplusplusCmd Concat3(CrossCompileDir,/,StripPath(CplusplusCmd)) +# endif +# endif +# endif + +# ifndef LibraryCplusplusOptions +# if DoSharedLib && defined(SharedLibraryCplusplusOptions) +# define LibraryCplusplusOptions SharedLibraryCplusplusOptions +# else +# define LibraryCplusplusOptions DefaultCplusplusOptions +# endif +# endif + +#ifdef CrossCompileDir + CXX = CrossLibraryCplusplusCmd +#else + CXX = LibraryCplusplusCmd +#endif + CXXOPTIONS = LibraryCplusplusOptions + STD_DEFINES = LibraryDefines $(PROJECT_DEFINES) +CXXDEBUGFLAGS = LibraryCplusplusDebugFlags +CXXLIBDEBUGFLAGS = LibraryDebugOpt + CXXFLAGS = $(CXXDEBUGFLAGS) $(CXXLIBDEBUGFLAGS) $(CXXOPTIONS) $(THREADS_CXXFLAGS) $(CXXDEFINES) +# if defined(LargePICTable) && LargePICTable +# ifdef LargePositionIndependentCplusplusFlags + CXXPICFLAGS = LargePositionIndependentCplusplusFlags +# elif defined(LargePositionIndependentCFlags) + CXXPICFLAGS = LargePositionIndependentCFlags +# endif +# endif +#endif + +#ifdef LibraryMTDefines +LIB_MT_DEFINES = LibraryMTDefines +#endif + +#if defined(IHaveSubdirs) && HasSymLinks && !defined(NoLibSubdirs) +#define _LibMkdir LibMkdirLinkSubdirs +#else +#define _LibMkdir LibMkdir +#endif + +#if DoDebugLib +# define _DebuggedLibMkdir() _LibMkdir(debugger) +# define _DebuggedObjCompile(options) DebuggedLibObjCompile(options) +# define _DebuggedObjCplusplusCompile(options) DebuggedLibObjCplusplusCompile(options) +# define _DebuggedCleanDir() LibCleanDir(debugger) +#else +# define _DebuggedLibMkdir() $(_NULLCMD_) +# define _DebuggedObjCompile(options) $(_NULLCMD_) +# define _DebuggedObjCplusplusCompile(options) $(_NULLCMD_) +# define _DebuggedCleanDir() $(_NULLCMD_) +#endif + +#if DoProfileLib +# define _ProfiledLibMkdir() _LibMkdir(profiled) +# define _ProfiledObjCompile(options) ProfiledLibObjCompile(options) +# define _ProfiledObjCplusplusCompile(options) ProfiledLibObjCplusplusCompile(options) +# define _ProfiledCleanDir() LibCleanDir(profiled) +#else +# define _ProfiledLibMkdir() $(_NULLCMD_) +# define _ProfiledObjCompile(options) $(_NULLCMD_) +# define _ProfiledObjCplusplusCompile(options) $(_NULLCMD_) +# define _ProfiledCleanDir() $(_NULLCMD_) +#endif + +#if !DoNormalLib +# define _NormalLibMkdir() $(_NULLCMD_) +# define _NormalObjCompile(options) $(_NULLCMD_) +# define _NormalObjCplusplusCompile(options) $(_NULLCMD_) +# define _NormalCleanDir() $(_NULLCMD_) +#else +# if DoSharedLib && SeparateSharedCompile +# define _NormalLibMkdir() _LibMkdir(unshared) +# define _NormalObjCompile(options) UnsharedLibObjCompile(options) +# define _NormalObjCplusplusCompile(options) UnsharedLibObjCplusplusCompile(options) +# define _NormalCleanDir() LibCleanDir(unshared) +# else +# define _NormalLibMkdir() $(_NULLCMD_) +# if !DoSharedLib && defined(IncludeSharedObjectInNormalLib) +# define _NormalObjCompile(options) NormalRelocLibObjCompile(options) +# else +# define _NormalObjCompile(options) NormalLibObjCompile(options) +# endif +# define _NormalObjCplusplusCompile(options) NormalLibObjCplusplusCompile(options) +# define _NormalCleanDir() $(_NULLCMD_) +# endif +#endif + +#if !DoSharedLib || (DoNormalLib && !SeparateSharedCompile) +# define _SharedObjCompile(options) $(_NULLCMD_) +# define _SharedObjCplusplusCompile(options) $(_NULLCMD_) +#else +# if SeparateSharedCompile +# define _SharedObjCompile(options) NormalSharedLibObjCompile(options) +# define _SharedObjCplusplusCompile(options) NormalSharedLibObjCplusplusCompile(options) +#else +# define _SharedObjCompile(options) NormalLibObjCompile(options) +# define _SharedObjCplusplusCompile(options) NormalLibObjCplusplusCompile(options) +#endif +#endif + +#ifndef LibInstallBuild +#define LibInstallBuild NO +#endif + +#if DoExtraLib && defined(ExtraLibRules) +# define _ExtraLibMkdir() ExtraLibMkdir() +# define _ExtraObjCompile(options) ExtraObjCompile(options) +# define _ExtraObjCplusplusCompile(options) ExtraObjCplusplusCompile(options) +# define _ExtraCleanDir() ExtraCleanDir() +#else +# define _ExtraLibMkdir() $(_NULLCMD_) +# define _ExtraObjCompile(options) $(_NULLCMD_) +# define _ExtraObjCplusplusCompile(options) $(_NULLCMD_) +# define _ExtraCleanDir() $(_NULLCMD_) +#endif + +#ifndef CplusplusSource +# define SRCsuf c +# define Isuf i +#else +# define SRCsuf CCsuf +# define Isuf ii +# ifdef SunArchitecture +.SUFFIXES: Concat(.,CCsuf) +# endif +#endif + +#define _CompileObj(target, options) @@\ +target @@\ + _DebuggedObjCompile(options) @@\ + _ProfiledObjCompile(options) @@\ + _NormalObjCompile(options) @@\ + _ExtraObjCompile(options) @@\ + _SharedObjCompile(options) + +#ifndef SeparateSharedCompile +# define _CompileObjSeparateOpts(target,staticopts,sharedopts) \ + _CompileObj(target,sharedopts) +#else +# define _CompileObjSeparateOpts(target,staticopts,sharedopts) @@\ +target @@\ + _DebuggedObjCompile(staticopts) @@\ + _ProfiledObjCompile(staticopts) @@\ + _NormalObjCompile(staticopts) @@\ + _ExtraObjCompile(staticopts) @@\ + _SharedObjCompile(sharedopts) +#endif + +#ifdef CplusplusSource +# define _CompileObjCplusplus(target, options) @@\ +target @@\ + _DebuggedObjCplusplusCompile(options) @@\ + _ProfiledObjCplusplusCompile(options) @@\ + _NormalObjCplusplusCompile(options) @@\ + _ExtraObjCplusplusCompile(options) @@\ + _SharedObjCplusplusCompile(options) +#else +# define _CompileObjCplusplus(target, options) +#endif + +#ifndef LibraryObjectRule +# define LibraryObjectRule() @@\ +all:: @@\ + _DebuggedLibMkdir() @@\ + _ProfiledLibMkdir() @@\ + _NormalLibMkdir() @@\ + _ExtraLibMkdir() @@\ + @@\ +includes:: @@\ + _DebuggedLibMkdir() @@\ + _ProfiledLibMkdir() @@\ + _NormalLibMkdir() @@\ + _ExtraLibMkdir() @@\ + @@\ +_CompileObj(.c.Osuf:,$(_NOOP_)) @@\ +_CompileObjCplusplus(.SRCsuf.Osuf:,$(_NOOP_)) @@\ + @@\ +clean:: @@\ + _DebuggedCleanDir() @@\ + _ProfiledCleanDir() @@\ + _NormalCleanDir() @@\ + _ExtraCleanDir() @@\ + +#endif /* LibraryObjectRule */ + +#ifndef SpecialLibObjectRule +# define SpecialLibObjectRule(objs,depends,options) @@\ +_CompileObj(objs: depends,options) +#endif /* SpecialLibObjectRule */ + +#ifndef SpecialCLibObjectRule +# define SpecialCLibObjectRule(basename,depends,options) @@\ +_CompileObj(basename.Osuf: basename.SRCsuf depends,options) @@\ + @@\ +basename.Isuf: basename.SRCsuf depends @@\ + CPPOnlyCompile(basename.SRCsuf,options) @@\ + @@\ +CenterLoadTarget(debug_src,basename.SRCsuf,NullParameter,$(ALLDEFINES) options) +#endif /* SpecialCLibObjectRule */ + +#ifndef SpecialCLibObjectRuleSeparateOpts +# define SpecialCLibObjectRuleSeparateOpts(basename,depends,staticopts,shopts) @@\ +_CompileObjSeparateOpts(basename.Osuf: basename.SRCsuf depends,staticopts,shopts) @@\ + @@\ +basename.Isuf: basename.SRCsuf depends @@\ + CPPOnlyCompile(basename.SRCsuf,sharedopts) @@\ + @@\ +CenterLoadTarget(debug_src,basename.SRCsuf,NullParameter,$(ALLDEFINES) options) +#endif /* SpecialCLibObjectRuleSepareateOpts */ + +#ifndef SpecialCplusplusLibObjectRule +# define SpecialCplusplusLibObjectRule(basename,depends,options) @@\ +_CompileObjCplusplus(basename.Osuf: basename.SRCsuf depends,options) @@\ + @@\ +CenterLoadTarget(debug_src,basename.SRCsuf,NullParameter,$(ALLDEFINES) options) +#endif /* SpecialCplusplusLibObjectRule */ + +/* + * ToolkitMakeStrings generates a string-table, i.e., a C source + * file and the matching header(s), e.g., Xt's StringDefs.c, StringDefs.h, + * and Shell.h files; or Motif's XmStrDefs.c and XmStrDefs.h files. + * + * The 'files' argument is the list of files that will be produced by + * this rule, e.g., for Xt they would be "Shell.h StringDefs.c StringDefs.h" + * and for Motif they would be "XmStrDefs.c XmStrDefs.h". + * + * The 'source' argument is the string-list file to be parsed, e.g., in + * Xt that would be "util/string.list". For Motif 2.0 it would be + * "../../tools/makestr/xmstring.list", and for Motif-CDE1 it would be + * "util/xmstring.list". + * + * The 'options' argument is passed by the library's Imakefile, see the + * Xt Imakefile for an example. Typically this would be nothing, -intelabi, + * or -sparcabi; there are other choices, but these are typical. + * + * The 'depends' argument names additional files the target files + * depend on. It should name the #ctmpl and #htmpl files from the + * 'source' file. + * + * The 'dest' argument is the C source output file. For Xt this should + * be "StringDefs.c", and for all versions of Motif it would be "XmStrDefs.c" + * + * Headers are generated and named according to data in the 'source' + * file. + */ +/* + * The NoCmpScript + * prevents clearmake from trying to remake makestrs if it exists. + * Including both $(MAKESTRS) and $(MAKESTRS).o as primary targets + * prevents clearmake from trying to recompile makestrs from here. + * We have includes, not files, depend on makestrs to try to get + * clearmake to wink in the files. Bug in clearmake 2.0.2? + */ + +#ifndef MakeStringsDependency +# ifndef UseInstalled +# define MakeStringsDependency @@\ +MAKESTRS = $(CONFIGSRC)/util/makestrs @@\ +NoCmpScript(HostProgramTargetName($(MAKESTRS)) $(MAKESTRS).Osuf) @@\ + @@\ +HostProgramTargetName($(MAKESTRS)) $(MAKESTRS).Osuf: @@\ + cd $(CONFIGSRC)/util && $(MAKE) HostProgramTargetName(makestrs) @@\ + @@\ +includes:: HostProgramTargetName($(MAKESTRS)) +# else +# define MakeStringsDependency /**/ +# endif +#endif + +#ifndef ToolkitMakeStrings +# if defined(LibTookitMakeStringsDependency) && LibTookitMakeStringsDependency +# define ToolkitMakeStrings(files,source,options,depends,dest) @@\ +files: source depends @@\ + RemoveFiles(files) @@\ + RunProgram(MAKESTRS,options < source > dest) @@\ + @@\ +AllTarget(files) @@\ + @@\ +includes:: files @@\ + @@\ +depend:: files @@\ + @@\ +clean:: @@\ + RemoveFiles(files) +# else +# define ToolkitMakeStrings(files,source,options,depends,dest) @@\ +MakeStringsDependency @@\ + @@\ +files: source depends @@\ + RemoveFiles(files) @@\ + RunProgram(MAKESTRS,options < source > dest) @@\ + @@\ +AllTarget(files) @@\ + @@\ +includes:: files @@\ + @@\ +depend:: files @@\ + @@\ +clean:: @@\ + RemoveFiles(files) +# endif +#endif /* ToolkitMakeStrings */ + +#ifdef LibName + +LIBNAME = LibName + +# if defined(LibTookitMakeStringsDependency) && LibTookitMakeStringsDependency +/* + * Do ToolkitMakeStrings() before BuildIncludes so makestrs is still + * built first, even if the generated header will be installed. + */ +MakeStringsDependency +# endif + +LibraryObjectRule() + +# undef _LinkBuildLibrary +# if !defined(LibInstall) || LibInstall || LibInstallBuild +# define _LinkBuildLibrary(lib) LinkBuildLibrary(lib) +# else +# define _LinkBuildLibrary(lib) $(_NULLCMD_) +# endif + +# if defined(LibBuild) && !LibBuild +# define LibCreate NO +# endif + +# if !defined(LibCreate) || LibCreate +# if DoSharedLib +# if HugeLibrary && defined(SharedLibraryTarget3) +SharedLibraryTarget3($(LIBNAME),$(SoRev),$(OBJS1),$(OBJS2),$(OBJS3) $(EXTRASHAREDOBJS),.,.) +# else +# if defined(SharedLibtoolRev) && defined(SharedLibtoolLibraryTarget) +SharedLibtoolLibraryTarget($(LIBNAME),SharedLibtoolRev,$(OBJS) $(EXTRASHAREDOBJS),.,.) +# else +SharedLibraryTarget($(LIBNAME),$(SoRev),$(OBJS) $(EXTRASHAREDOBJS),.,.) +# endif +# endif +# if !defined(LibInstall) || LibInstall +# if defined(SharedLibtoolRev) && defined(InstallSharedLibtoolLibrary) +InstallSharedLibtoolLibrary($(LIBNAME),SharedLibtoolRev,$(SHLIBDIR)) +# else +InstallSharedLibrary($(LIBNAME),$(SoRev),$(SHLIBDIR)) +# endif +# endif +# if HasSharedData +SharedLibraryDataTarget($(LIBNAME),$(SoRev),$(UNSHAREDOBJS)) +# if !defined(LibInstall) || LibInstall +InstallSharedLibraryData($(LIBNAME),$(SoRev),$(SHLIBDIR)) +# endif +# endif +# endif +# if DoNormalLib +# if HugeLibrary +# if DoSharedLib && SeparateSharedCompile +UnsharedLibraryTarget3($(LIBNAME),$(OBJS1),$(OBJS2),$(OBJS3) $(EXTRAUNSHAREDOBJS),unshared,..) +# else +NormalLibraryTarget3($(LIBNAME),$(OBJS1),$(OBJS2),$(OBJS3) $(EXTRAUNSHAREDOBJS)) +# endif +# else +# if DoSharedLib && SeparateSharedCompile +UnsharedLibraryTarget($(LIBNAME),$(OBJS) $(EXTRAUNSHAREDOBJS),unshared,..) +# else +NormalLibraryTarget($(LIBNAME),$(OBJS) $(EXTRAUNSHAREDOBJS)) +# endif +# endif +# if !defined(LibInstall) || LibInstall +InstallLibrary($(LIBNAME),$(USRLIBDIR)) +# endif +# endif +# if DoProfileLib +ProfiledLibraryTarget($(LIBNAME),$(OBJS) $(EXTRAUNSHAREDOBJS)) +# if !defined(LibInstall) || LibInstall +InstallLibrary($(LIBNAME)_p,$(USRLIBDIR)) +# endif +# endif +# if DoDebugLib +DebuggedLibraryTarget($(LIBNAME),$(OBJS) $(EXTRAUNSHAREDOBJS)) +# if !defined(LibInstall) || LibInstall +InstallLibrary($(LIBNAME)_d,$(USRLIBDIR)) +# endif +# endif +# if DoExtraLib && defined(ExtraLibRules) +ExtraLibraryTarget($(LIBNAME),$(SoRev),$(OBJS) $(EXTRAUNSHAREDOBJS)) +# if !defined(LibInstall) || LibInstall +ExtraInstallLibrary($(LIBNAME),$(SoRev)) +# endif +# endif + +LintLibraryTarget($(LIBNAME),$(SRCS)) +# if !defined(LibInstall) || LibInstall +InstallLintLibrary($(LIBNAME),$(LINTLIBDIR)) +# endif +# else /* not LibCreate */ +# if LibBuild +# if HugeLibrary +AllTarget($(OBJS1)) +AllTarget($(OBJS2)) +AllTarget($(OBJS3)) +# else +AllTarget($(OBJS)) +# endif +# if DoSharedLib +AllTarget($(EXTRASHAREDOBJS)) +# endif +# if DoNormalLib +AllTarget($(EXTRAUNSHAREDOBJS)) +# endif +# endif /* LibBuild */ +# endif /* LibCreate */ +# ifdef IncSubdir +# ifdef IncSubSubdir +# if !defined(LibHeaders) || LibHeaders +BuildIncludes($(HEADERS),IncSubdir/IncSubSubdir,../..) +# if BuildLibraries +InstallMultipleFlags($(HEADERS),$(INCDIR)/IncSubdir/IncSubSubdir,$(INSTINCFLAGS)) +# endif +# endif +# else +# if !defined(LibHeaders) || LibHeaders +BuildIncludes($(HEADERS),IncSubdir,..) +# if BuildLibraries +InstallMultipleFlags($(HEADERS),$(INCDIR)/IncSubdir,$(INSTINCFLAGS)) +# endif +# endif +# endif +# else +# ifndef CplusplusSource +# if !defined(LibHeaders) || LibHeaders +BuildIncludesTop($(HEADERS)) +# if BuildLibraries +InstallMultipleFlags($(HEADERS),$(INCDIR),$(INSTINCFLAGS)) +# endif +# endif +# endif +# endif + +NormalLintTarget($(SRCS)) +#endif /* defined(LibName) */ + +#ifdef NoSoSymlink +SOSYMLINK = false +#else +SOSYMLINK = true +#endif diff --git a/nx-X11/config/cf/README b/nx-X11/config/cf/README new file mode 100644 index 000000000..aca6b3933 --- /dev/null +++ b/nx-X11/config/cf/README @@ -0,0 +1,542 @@ +The easiest way to write an Imakefile is to find another one that does +something similar and copy/modify it! + +To change any of these variables, edit the site.def file. + +Imake.tmpl provides defaults for the following variables: + + AlternateIncRoot compiler needs -I to find project includes + AlternateUsrLibDir linker needs -L to find project libraries + ArCmd command used to create libraries + ArCmdBase program name part of ArCmd + ArAddCmd flags to have ArCmdBase add files to a library + ArExtCmd flags to have ArCmdBase extract files + AsCmd command used to run assembler + BootstrapCFlags missing cpp symbols needed to get started + BourneShell command used to run Bourne Shell + CCsuf suffix that C++ source files have + CURDIR current directory relative to top of sources + CcCmd command to run C compiler + CompressCmd command to run compress program + ConstructMFLAGS System V option to set MFLAGS make variable + CpCmd command to copy one file to another + CplusplusCmd command to run C++ compiler + CplusplusFilt command to run C++ name demangler + CplusplusYaccCmd command to produce C++ source from yacc source + CppCmd command to run C preprocessor + CrossCompiling cross compiling? (not fully supported) + DebuggableCDebugFlags C compiler -I's and -D's to turn on debug info + DefaultCCOptions default special C compiler options + DefaultCDebugFlags debug/optimize flags for programs + DefaultUsrBin program directory used even if PATH not set + DependFlags extra makedepend flags + DoRanlibCmd boolean for system uses ranlib + EqnCmd command used for eqn + ExecableScripts boolean for systems that can exec() #!/bin/sh + ExpandManNames boolean to expand man pages names to long form + ExtraFilesToClean extra files to remove on make clean + ExtraLibraries system-specific libraries need to link + ExtraLoadFlags system-specific loader flags + FileManSuffix man suffix for file format pages + FilesToClean files to delete in make clean + FortranCmd command to run Fortran compiler + FortranDebugFlags flags for Fortran debug info + FortranFlags Fortran compiler flags + GzipCmd command to run gzip program + HasBSD44Sockets boolean for system has BSD4.4 sockets + HasBsdMake use the 4.4BSD variant of the make program? + HasBsearch boolean for libc has bsearch() + HasBrokenCCForLink boolean for brain damaged cc driver + HasCenterLineC boolean for system has CenterLine C compiler + HasCenterLineCplusplus boolean for system has CenterLine C++ compiler + HasClearmake use Clearcase's clearmake make program? + HasCodeCenter boolean for system has CodeCenter + HasCookieMaker boolean for system has xauth cookie generator + HasCplusplus system has a C++ compiler? + HasFortran boolean for system has Fortran compiler + HasGcc boolean for system has GNU gcc compiler + HasGcc2 boolean for system has GNU gcc 2.x compiler + HasGcc2ForCplusplus use gcc 2 for C++ programs? + HasGnuMake use the GNU make program? + HasGhostPCL boolean for system has GhostPCL + HasGhostScript boolean for system has GhostScript + HasLargeTmp boolean for system has /tmp space + HasLatex system has LaTeX document preparation software + HasLibCrypt boolean for system has libcrypt + HasMotif boolean for system has Motif + HasMotif2 boolean for system has Motif2 or OpenMotif + HasPoll use poll() syscall? + HasPurify boolean for system has Purify + HasPutenv boolean for libc has putenv() + HasSecureRPC boolean for Sun Secure RPC + HasSetProcTitle boolean for setproctitle() + HasSetUserContext boolean for setusercontext() + HasSentinel boolean for system has Sentinel available + HasSharedLibraries boolean for system has shared libraries + HasShm boolean for System V shared memory + HasSockets boolean for system has BSD sockets + HasStrcasecmp boolean for system implements str[n]casecmp + HasSymLinks boolean for system has symbolic links + HasTestCenter boolean for system has TestCenter + HasVarDirectory boolean for system has /var + HasVFork boolean for system has vfork() + HasVoidSignalReturn boolean for POSIX signal() procs + IncludeSharedObjectInNormalLib define for static libs to include + -fPIC objects on relevant archs + IncRoot parent of X11 include directory + InstBinFlags install flags for binaries + InstDatFlags install flags for data files + InstIncFlags install flags for header files + InstKmemFlags install flags for xload to get at /dev/kmem + InstLibFlags install flags for libraries + InstManFlags install flags for manual pages + InstPgmFlags install flags for normal programs + InstUidFlags install flags for xterm to chown /dev/ptys + InstallCmd command to install files + LdCmd command to run loader + LdCombineFlags flags for incremental loading + LexCmd command to run lex + LexLib library for programs using lex output + LintCmd command to run lint + LintLibFlag flags to generate lint libraries + LintOpts lint options to control strictness + LnCmd command to link two files + LoaderLibPrefix loader flags before libraries + LocalRulesFile site-specific file with additional imake rules + LocalTmplFile file with additional imake variables + MacroFile name of machine-dependent config params file + MacroIncludeFile <MacroFile> + MakeCmd command to run make + Malloc0ReturnsNull boolean for malloc(0) == NULL + Malloc0ReturnsNullDefines -D's to build libX11/libXt + MathLibrary library for programs using C math functions + MkCookieCmd command to generate an xauth cookie + MsMacros macro flag for TroffCmd, normally "-ms" + MvCmd command to rename a file + NeedConstPrototoypes whether const is supported + NeedFunctionPrototypes whether or not to force function prototypes + NeedNestedPrototypes whether nested prototypes are supported + NeedVarargsPrototypes whether varargs prototypes are supported + NeedWidePrototypes whether or not to widen function prototypes + NoOpCDebugFlags C compiler flags to not debug or optimize + NoRConst YES if const for structs of funcs is bad + OSMajorVersion major version number of operating system + OSMinorVersion minor version number of operating system + OSName operating system name + OSTeenyVersion maintenance version number of operating system + OptimizedCDebugFlags C compiler flags to turn on optimization + XtPopdownConformance XtPopdown conformans to the specification + PreProcessCmd command to run /lib/cpp on scripts + RanlibCmd command to clean up libraries + RanlibInstFlags flags to ranlib after copying + ResourceConfigurationManagement boolean for Xt's Resource Configuration + Management + RmCmd command to delete files + ShLibDir directory in which to install shared libraries + StandardCppDefines -D's for running cpp + StandardDefines -D's for running C compiler + StandardIncludes -I's for running C compiler + StripInstalledPrograms boolean for sites that want to install -s + SystemV boolean for systems that are at least SVR2 + SystemV4 boolean for SVR4 systems + TOPDIR relative path to top of sources + TagsCmd command to run tags + TblCmd command to run tbl + TroffCmd command to run troff to get PostScript + UNCOMPRESSPATH command to run uncompress (obsolete) + UnalignedReferencesAllowed boolean for unaligned copies ok + UsrLibDir directory in which to install libraries + YaccCmd command to run yacc + +X11.tmpl provides defaults for the following variables: + + AdmDir directory containing system log files + AllocateLocalDefines -D's to turn on alloca() (should be in Imake.tmpl) + BDFTOSNFFILT command to run bdftosnf + BaseExtensionDefines universal extensions to use + BinDir directory in which to install programs + BuildDBE build DOUBLE-BUFFER extension + BuildDPMS build Display Power Management Signaling extension + BuildIncRoot relative path to location of headers in build + BuildIncTop path from build includes directory to top + BuildPlugin build xrx plug-in for web browsers + BuildRECORD Build RECORD extension + BuildServer build X server + BuildXCSecurity Build Security Extension + BuildXInputExt build X Input extension (requires ddx support, + which exists only in Xhp and XFree86) + BuildXKB build X Keyboard Extension? + BuildXKBlib build X Keyboard Extension into Xlib? + UseXKBInClients Use XKB functions in normal clients? + ConfigDir install directory for config files + ConnectionFlags -D's for supported transports + ContribDir location of user-contributed sources + DebugLibX11 build libX11_d.a + DefaultCursorTheme name of default cursor theme + DefaultFontPath default server font path + DefaultSystemPath default system xdm PATH environment variable + DefaultSystemShell default /bin/sh + DefaultUserPath default user xdm PATH environment variable + DependCmd command to run makedepend + DependDir build directory containing makedepend program + DriverManDir directory in which to install driver man pages + DriverManSuffix man suffix for driver pages + ExtensionDefines -D's for universal extensions + ExtensionOSDefines -D's for additional extensions + ForceNormalLib force building of .a in addition to shared lib + HasXdmAuth boolean for using XDM-AUTHORIZATION-1; + needs Wraphelp.c, see Release Notes + InstallLibManPages boolean for installing library man pages + InstallSecurityConfig install server security policy file over old? + LibDir directory in which to install X11 support files + LibManSuffix man suffix for library pages + LibmanDir directory in which to install library man pages + LintlibDir directory in which to install lint libs + ManDir directory in which to install program man pages + ManDirectoryRoot parent of man directories relative to root + ManPath full path of parent directory + ManSourcePath common prefix of man page directories + ManSuffix man suffix for programs + MiscManSuffix man suffix for miscellaneous pages + MiscManDir directory in which to install misc man pages + NeedDefaultDepLibs boolean for enabling default DEPLIBS + NlsDir directory in which to install nls files + NormalLibX11 build libX11.a + OsNameDefines If uname(2) unavailable, set to -DOS_NAME=OSName + PrimaryScreenResolution resolution of default server screen + ProfileLibX11 build libX11_p.a + ProjectX version indicating this is the X Window System + RemoveTargetProgramByMoving boolean for rm -f that doesn't + SHELLPATH -D for /bin/sh + ServerConfigDir directory for server security config files + ServerDefines complete -D's for server + ServerExtraDefines special -D's for server + ServerOSDefines OS -D's for server + ServerAssertDefines -DNDEBUG for no assertions, /**/ for assertions + SharedLibX11 boolean for making sharable libX11.so + ShmDefines MIT-SHM define + TwmDir directory in which to install twm config files + UseCCMakeDepend boolean for using alternate makedepend script + VarDirectory directory in /var for logs, etc., and config + VendorHasX11R6_3libXext don't need Security & AppGroup in xrx plug-in + XAppLoadDir directory in which to install app defaults + XFileSearchPathBase base file search path + XFileSearchPathDefault default path to search for app defaults files + XInputDefines XINPUT define + XMalloc0ReturnsNullDefines -D's specifically for libX11 + XdmConfigurationSubdirectory name of default xdm configuration + XdmDir directory in which to install xdm files + XinitDir directory in which to install xinit files + XmanLocalSearchPath non-standard path for man pages + XtErrorPrefix leading text in XtError() msg; eg. 'X Toolkit ' + XtWarningPrefix leading text in XtWarning()msg, same as above + XtMalloc0ReturnsNullDefines -D's specifically for libXt + ZBDFTOSNFFILT -D to run uncompress and bdftosnf (obsolete) + + +Library.tmpl provides defaults for the following variables: + + AvoidNullMakeCommand for makes that spout about $(_NULLCMD_) + LibraryCCOptions special C compiler options for libraries + LibraryCDebugFlags library debug/optimize flags to override defs + LibraryCcCmd command to run C compiler in libraries + LibraryCplusplusOptions special C++ options for libraries + LibraryCplusplusDebugFlags library debug/optimize flags for C++ + LibraryCplusplusCmd command to run C++ compiler in libraries + LibraryDefines -D's for libraries + SeparateSharedCompile shared and unshared libs use same binaries? + + +Server.tmpl provides defaults for the following variables: + + ServerCCOptions server C compiler options to override defaults + ServerCcCmd command to run C compiler in server + ServerCDebugFlags server debug/opt compiler flags + ServerDefines server standard -D's + InstallServerSetUID does this system need X server suid to root? + + +Threads.tmpl provides defaults for the following variables: + + LocalThreads whether to enable multi-threading support + LocalThreadsDefines -D flags needed in this directory + + +An <os>Lib.rules file provides defaults for the following variables: + + HasSharedLibraries boolean for using shared libraries + SharedDataSeparation boolean indicating separate data/code + SharedCodeDef -D's for compiling shared library files + SharedLibraryDef -D's for defining which kind of shared lib + ShLibIncludeFile location of the <os>Lib.tmpl file + SharedLibraryLoadFlags loader flags when making the library + UseExportLists boolean for using an export list + PositionIndependentCFlags PIC compiler flags for C + PositionIndependentCplusplusFlags PIC compiler flags for C++ + + Note: PositionIndependentCplusplusFlags is only required if the + C and C++ compilers use different flags to build PIC code. The + default configuration will try to use PositionIndependentCFlags + for both C and C++ compiles. + +An <os>Lib.tmpl file provides defaults for the following variables: + + SharedX11Reqs required libs for libX11.so + SharedX11Rev version number for libX11.so + +Vendor.cf files and/or site/host specific .def files may define the +following variables: + + ProjectRoot The directory under which the installation + will operate. This value will be hard coded + into some programs. As a result do not use it + to specify the installation directory for a + cross compiled system, use DESTDIR to + accomplish that task. + +The following variables are used by some part of the tree: + + AckToolset programs/Xserver/hw/xfree86 + BuildChooser build the xdm chooser program? + SharedLibXdmGreet use xdm shared dynamic greeter library? + LatexCmd command to run LaTeX on a document + DvipsCmd command to turn .dvi file into PostScript + MotifBC using Motif 1.1.1, 1.1.2, or 1.1.3? + GetValuesBC compat GetValues behavior for broken apps? + SvgaConfig default SVGA configuration + HasGetReturnAddress util/memleak + HasShadowPasswd system has getspnam() function + WebServer host:port of your Web server (see programs/xrx) + HtmlDir path used by Web server for HTML and RX docs + CgiBinDir path used by Web server for CGI programs + ProxyManager ICE network ID to contact a running proxymngr + + +Make Variables + +The following make variables are used by imake rules and may be set in +an individual Imakefile. + +DEFINES program-specific -D flags and other arguments + to pass to the C compiler, lint, and makedepend. +DEPEND_DEFINES program-specific flags in addition to + $(DEFINES) to pass to lint and makedepend. + This is usually used when there are special + compilation rules for individual files, and + the defines passed to those files affect + makedepend results. If they can be passed to + all files during the makedepend step without + affecting the results for other files, + DEPEND_DEFINES is used to do that. Example is + the Xlib Imakefile. +INCLUDES program-specific -I flags. +HEADERS .h files to install with "make includes" and + "make install". If this Imakefile includes + Library.tmpl there are no headers, include + this line instead of a HEADERS definition: + #define LibHeaders NO +REQUIREDLIBS when building a shared library, other libraries used + by this library that should be referenced at + link time. +LINTLIBS program-specific libraries for lint. +LOCAL_LDFLAGS program-specific flags for the linker. +LOCAL_LIBRARIES project libraries (usually specified + as -lname) needed by this program. + For example, "-lXt -lXext -lX11". + Used by SimpleProgramTarget and + ComplexProgramTarget* rules. + Do not include any system-specific libraries here. +SYS_LIBRARIES system libraries (usually specified + as -lname) needed by this program. + For example "MathLibrary". + Do not include any system-specific libraries + such as "-lnsl" here; they are automatically + added to the link command by the + vendor-specific .cf file. +SUBDIRS for an Imakefile in a directory containing + subdirectories, this names the subdirectories. + Such an Imakefile also needs to #define IHaveSubdirs + and call MakeSubdirs() and DependSubdirs(). +MANSUFFIX suffix used by InstallManPage* rules. + May be set to $(LIBMANSUFFIX), $(FILEMANSUFFIX), or + $(MISCMANSUFFIX) in directories for libraries or data + files. + + +Rule-specific variables that may be set in an individual Imakefile. +If you aren't using these rules, you may need variables with a similar +function, but you need not use these names. However, following these +conventions may make your Imakefile easier to read and maintain. + +DEPLIBS library dependencies for ComplexProgramTarget +SRCS source files used by ComplexProgramTarget and + DependTarget. +OBJS object files used by ComplexProgramTarget +PROGRAMS default target used with ComplexProgramTarget_(n) +SRCS1 source files used by ComplexProgramTarget_1 +OBJS1 object files used by ComplexProgramTarget_1 +DEPLIBS1 library dependencies for ComplexProgramTarget_1 +SRCS2 source files used by ComplexProgramTarget_2 +OBJS2 object files used by ComplexProgramTarget_2 +DEPLIBS2 library dependencies for ComplexProgramTarget_2 +SRCS3 source files used by ComplexProgramTarget_3 +OBJS3 object files used by ComplexProgramTarget_3 +DEPLIBS3 library dependencies for ComplexProgramTarget_3 + +Variables that can be set on the make command line: + +DESTDIR directory under which "make install" should + install instead of "/"; used only for testing + "make install" rules, binary package building, + and specifying alternative installation directories + for cross compiles. +FILE file for "lint1" target to run lint on. +CDEBUGFLAGS -g and/or -O flag to control C compiler optimization. +CXXDEBUGFLAGS -g and/or -O flag to control C++ optimization. +LDSTRIPFLAGS flag to have linker strip objects (typically -x). + Typically set to the empty string to prevent + the linker from stripping objects; use this + way when setting CDEBUGFLAGS to "-g". + +These variables are set in project-specific files such as X11.tmpl. +They should NOT be set in an Imakefile. These variables are sometimes +misused; they are included here to remind Imakefile writers NOT to use +them: + +EXTRA_DEFINES project-specific -D flags +EXTRA_INCLUDES project-specific -I flags +EXTRA_ICONFIGFILES Additional project-specific imake config files + to add to ICONFIGFILES. + This is a list of files that define variables + that might affect compilation of some files. + +Many other make variables are set up by the imake config files and can +be used in an Imakefile. The easiest way to discover them is to look +at the Makefile generated by an empty Imakefile. + + +Comments + +Use C comment syntax in an Imakefile for comments that should not +appear in the resulting Makefile. +Use "XCOMM" at the start of each +line to produce a comment that will appear in the Makefile. +(The "XCOMM" will +be translated into the Makefile comment character "#" by imake.) +Do NOT use "#" as a comment character in Imakefiles; it confuses the C +preprocessor used by imake on some systems. + + +Imake variables + +Don't abuse the variables in X11.tmpl that describe +particular pieces of X by using them to describe your own subsystems. +Instead, create new variables that are defaulted using +Imake.tmpl variables. + + +Examples + +Since the easiest way to write an Imakefile is to start with one that +works, here are some short, easy-to-read Imakefile examples in the X +distribution: + +with subdirs: config/Imakefile +library: lib/Xau/Imakefile +simple program: programs/xdpyinfo/Imakefile +complex progs: programs/xclipboard/Imakefile +complex prog: programs/xmodmap/Imakefile + +Common Rules + +Here are some of the common rules for building programs. How to use +them is described in Imake.rules and in the O'Reilly book "Software +Portability with imake." + +Basic program-building rules + +All of these except NormalProgramTarget also generate rules to install +the program and its manual page, and to generate dependencies. + +SimpleProgramTarget Use if there is only one program to be made + and it has only one source file. + +ComplexProgramTarget Use if there is only one program to be made + and it has multiple source files. Set SRCS to + the names of the source files, set OBJS to + the names of the object files, and set DEPLIBS + to the libraries that this program depends on. + +ComplexProgramTarget_1 Like ComplexProgramTarget, but uses SRCS1, + OBJS1, and DEPLIBS1 and can be used with + ComplexProgramTarget_2 and ComplexProgramTarget_3 + to build up to three programs in the same directory. + Set PROGRAMS to the programs built by all of + these rules. For more than 3 programs, use + NormalProgramTarget for each. +ComplexProgramTarget_2 Use after ComplexProgramTarget_1 for the + second program in a directory. Uses SRCS2, + OBJS2, and DEPLIBS2. +ComplexProgramTarget_3 Use after ComplexProgramTarget_2 for the + third program in a directory. Uses SRCS3, + OBJS3, and DEPLIBS3. + +NormalProgramTarget Build a program. Can be used multiple times + with different arguments in the same Imakefile. + +Lower level rules, often used with NormalProgramTarget + +InstallProgram install a program. + +InstallManPage install a manual page. + +InstallDirectory install a directory. + +DependTarget() include once at end of Imakefile with + NormalProgramTarget rules or that uses Library.tmpl. + Generates dependencies for files named in SRCS. + +Manual page rules, commonly used only in special documentation directories: + +InstallManPage +InstallManPageLong +InstallManPageAliases + +Other rules: + +SpecialCObjectRule Compile a C file with special flags. +AllTarget Declare additional targets to build. +InstallAppDefaults Install X application defaults file. + +Imakefile for directory with subdirectories + +XCOMM this is a sample Imakefile for a directory containing subdirectories +#define IHaveSubdirs +#define PassCDebugFlags CDEBUGFLAGS="$(CDEBUGFLAGS)" +SUBDIRS = list of subdirs ... +MakeSubdirs($(SUBDIRS)) +DependSubdirs($(SUBDIRS)) + + +Common Targets + +These targets are typically NOT defined explicitly by the Imakefile +writer; rather they are generated automatically by imake rules. +They are listed here for the convenience of people using the resulting +Makefile, not people writing the original Imakefile. + +all Default rule; builds whatever is in this directory. +Makefile Remake the Makefile (use after changing Imakefile). + Run "make depend" after. +Makefiles Remake all Makefiles in subdirectories. (Does + nothing if no subdirectories.) + Run "make depend" after. +includes Generate and install in the tree any necessary + header files. +depend Update dependencies in the Makefile calculated + by examining the source files. +install Install what "make all" built on the system. +install.man Install manual pages. +clean Remove built objects and other derived files. +lint Run lint. +tags Create a tags file. diff --git a/nx-X11/config/cf/Server.tmpl b/nx-X11/config/cf/Server.tmpl new file mode 100644 index 000000000..ffdca6811 --- /dev/null +++ b/nx-X11/config/cf/Server.tmpl @@ -0,0 +1,72 @@ +/* + * Server imakefile info - this contains any special redefinitions, etc. + * that Imakefiles in the server subtree will need. + */ + +#define PassCDebugFlags CDEBUGFLAGS="$(CDEBUGFLAGS)" LDSTRIPFLAGS="$(LDSTRIPFLAGS)" + +#ifndef ServerCcCmd +#define ServerCcCmd CcCmd +#endif +#ifndef ServerCCOptions +#define ServerCCOptions DefaultCCOptions +#endif +#ifndef ServerDefines +#define ServerDefines StandardDefines +#endif +/* Note: Changing ServerCDebugFlags has no effect because CDEBUGFLAGS is over- + ridden by PassCDebugFlags in the parent Makefile or toplevel xmakefile. */ +#ifndef ServerCDebugFlags +#define ServerCDebugFlags DefaultCDebugFlags +#endif +#ifndef DoThreadedServer +#define DoThreadedServer NO +#endif +#ifndef InstallServerSetUID +#define InstallServerSetUID NO +#endif + +#ifdef CrossCompileDir +# ifndef StripPath +# define StripPath(x) `echo x|sed "s%.*/%%"` +# endif +# ifndef CrossServerCcCmd +# define CrossServerCcCmd Concat3(CrossCompileDir,/,StripPath(ServerCcCmd)) +# endif +#endif + +/* + * SetUIDServerTarget - compile, link, and relink a setuid server + */ +#ifndef SetUIDServerTarget +#if InstallServerSetUID +#define SetUIDServerTarget(server,subdirs,objects,libs,syslibs) @@\ +ServerTargetWithFlags(server,subdirs,objects,libs,syslibs,$(INSTUIDFLAGS)) +#else +#define SetUIDServerTarget ServerTarget +#endif +#endif /* SetUIDServerTarget */ + +#ifdef CrossCompileDir + CC = CrossServerCcCmd +#else + CC = ServerCcCmd +#endif + CCOPTIONS = ServerCCOptions +#if DoThreadedServer +SERVER_THREAD_DEFINES = XThreadsDefines ThreadTypeDefines +#endif +STD_DEFINES = ServerDefines $(SERVER_THREAD_DEFINES) +CDEBUGFLAGS = ServerCDebugFlags +EXT_DEFINES = ExtensionDefines +OS_DEFINES = ServerOSDefines + +GLX_DEFINES = GlxDefines + +#ifndef GlxUseSGISI +#define GlxUseSGISI NO +#endif + +#ifdef XorgVersion +#include <xorg.tmpl> +#endif diff --git a/nx-X11/config/cf/ServerLib.tmpl b/nx-X11/config/cf/ServerLib.tmpl new file mode 100644 index 000000000..66c83b83d --- /dev/null +++ b/nx-X11/config/cf/ServerLib.tmpl @@ -0,0 +1,141 @@ +/* + * Server Library imakefile info - this contains any special + * redefinitions, etc. that Imakefiles in the various server library + * subtrees will need. + * + * Before including this, you must set the following boolean variables: + * DoSharedLib, DoNormalLib, DoDebugLib, DoProfileLib + * + */ + +#ifndef DoNormalLib +#define DoNormalLib YES +#endif + +#ifndef LibraryDefines +#define LibraryDefines StandardDefines +#endif +#ifndef LibraryCDebugFlags +#define LibraryCDebugFlags DefaultCDebugFlags +#endif +#ifndef SeparateSharedCompile +#define SeparateSharedCompile YES +#endif +#ifndef SharedServerLibraryDef +#define SharedServerLibraryDef $(__NOOP__) +#endif + +#ifndef LibraryCcCmd +#if DoSharedLib && defined(SharedLibraryCcCmd) +#define LibraryCcCmd SharedLibraryCcCmd +#else +#define LibraryCcCmd CcCmd +#endif +#endif +#ifndef LibraryCCOptions +#if DoSharedLib && defined(SharedLibraryCCOptions) +#define LibraryCCOptions SharedLibraryCCOptions +#else +#define LibraryCCOptions DefaultCCOptions +#endif +#endif + +#if DoDebugLib +#define _DebuggedLibMkdir() LibMkdir(debugger) +#define _DebuggedObjCompile(options) DebuggedLibObjCompile(options) +#define _DebuggedCleanDir() LibCleanDir(debugger) +#else +#define _DebuggedLibMkdir() $(_NULLCMD_) +#define _DebuggedObjCompile(options) $(_NULLCMD_) +#define _DebuggedCleanDir() $(_NULLCMD_) +#endif + +#if DoProfileLib +#define _ProfiledLibMkdir() LibMkdir(profiled) +#define _ProfiledObjCompile(options) ProfiledLibObjCompile(options) +#define _ProfiledCleanDir() LibCleanDir(profiled) +#else +#define _ProfiledLibMkdir() $(_NULLCMD_) +#define _ProfiledObjCompile(options) $(_NULLCMD_) +#define _ProfiledCleanDir() $(_NULLCMD_) +#endif + +#if !DoNormalLib +#define _NormalLibMkdir() $(_NULLCMD_) +#define _NormalObjCompile(options) $(_NULLCMD_) +#define _NormalCleanDir() $(_NULLCMD_) +#else +#if DoSharedLib && SeparateSharedCompile +#define _NormalLibMkdir() LibMkdir(unshared) +#define _NormalObjCompile(options) UnsharedLibObjCompile(options) +#define _NormalCleanDir() LibCleanDir(unshared) +#else +#define _NormalLibMkdir() $(_NULLCMD_) +#define _NormalObjCompile(options) NormalLibObjCompile(options) +#define _NormalCleanDir() $(_NULLCMD_) +#endif +#endif + +#if !DoSharedLib || (DoNormalLib && !SeparateSharedCompile) +#define _SharedObjCompile(options) $(_NULLCMD_) +#else +#if SeparateSharedCompile +#define _SharedObjCompile(options) NormalSharedLibObjCompile(options) +#else +#define _SharedObjCompile(options) NormalLibObjCompile(options) +#endif +#endif + +#define SRCsuf c +#define Isuf i + +#ifndef LibraryObjectRule +#define LibraryObjectRule() @@\ +all:: @@\ + _DebuggedLibMkdir() @@\ + _ProfiledLibMkdir() @@\ + _NormalLibMkdir() @@\ + @@\ +includes:: @@\ + _DebuggedLibMkdir() @@\ + _ProfiledLibMkdir() @@\ + _NormalLibMkdir() @@\ + @@\ +.SRCsuf.Osuf: @@\ + _DebuggedObjCompile($(_NOOP_)) @@\ + _ProfiledObjCompile($(_NOOP_)) @@\ + _NormalObjCompile($(_NOOP_)) @@\ + _SharedObjCompile(SharedServerLibraryDef) @@\ + @@\ +clean:: @@\ + _DebuggedCleanDir() @@\ + _ProfiledCleanDir() @@\ + _NormalCleanDir() @@\ + +#endif /* LibraryObjectRule */ + +#ifndef SpecialLibObjectRule +#define SpecialLibObjectRule(objs,depends,options) @@\ +objs: depends @@\ + _DebuggedObjCompile(options) @@\ + _ProfiledObjCompile(options) @@\ + _NormalObjCompile(options) @@\ + _SharedObjCompile(options) @@\ + +#endif /* SpecialLibObjectRule */ + +#ifndef SpecialCLibObjectRule +#define SpecialCLibObjectRule(basename,depends,options) @@\ +SpecialLibObjectRule(basename.Osuf,basename.SRCsuf depends,options) @@\ + @@\ +basename.Isuf: basename.SRCsuf depends @@\ + CPPOnlyCompile(basename.SRCsuf,options) @@\ + @@\ +CenterLoadTarget(debug_src,basename.SRCsuf,NullParameter,$(ALLDEFINES) options) +#endif /* SpecialCLibObjectRule */ + +#if DoSharedLib +LibraryObjectRule() +#else +NormalLibraryObjectRule() +#endif diff --git a/nx-X11/config/cf/Threads.tmpl b/nx-X11/config/cf/Threads.tmpl new file mode 100644 index 000000000..d2d6f6d1c --- /dev/null +++ b/nx-X11/config/cf/Threads.tmpl @@ -0,0 +1,99 @@ +/* + * For a multi-threaded application or library, + * Define LocalThreadsDefines in your Imakefile (unless you like the + * project default), then include this file. + * Everything else should be automatic. + */ + +#ifndef LocalThreadsDefines +#ifdef ProjectThreadsDefines +#define LocalThreadsDefines ProjectThreadsDefines +#else +#define LocalThreadsDefines /**/ +#endif +#endif + +#ifndef LocalThreads +#ifdef ThreadedProject +#define LocalThreads ThreadedProject +#else +#define LocalThreads YES +#endif +#endif + +#ifndef HasCThreads +#define HasCThreads NO +#endif + +#ifndef ThreadTypeDefines +#if HasCThreads +#define ThreadTypeDefines -DCTHREADS +#else +#define ThreadTypeDefines /**/ +#endif +#endif +#ifndef SystemMTDefines +#define SystemMTDefines /**/ +#endif +#ifndef LibraryMTDefines +#define LibraryMTDefines /**/ +#endif +#ifndef HasThreadSafeAPI /* does it have getpwnam_r, etc. */ +#define HasThreadSafeAPI YES +#endif +#ifndef MTSafeAPIDefines +#if HasThreadSafeAPI +#define MTSafeAPIDefines -DXUSE_MTSAFE_API +#else +#define MTSafeAPIDefines /**/ +#endif +#endif +#ifndef ThreadPreStdAPIDefines +#define ThreadPreStdAPIDefines /* nominally for POSIX P1003.4a (Draft 4) API */ +#endif +#ifndef CplusplusSystemMTDefines +# ifdef SystemMTDefines +# define CplusplusSystemMTDefines SystemMTDefines +# else +# define CplusplusSystemMTDefines /**/ +# endif +#endif +#ifndef ThreadsCompileFlags +#define ThreadsCompileFlags /**/ +#endif +#ifndef ThreadsCplusplusCompileFlags +# ifdef ThreadsCompileFlags +# define ThreadsCplusplusCompileFlags ThreadsCompileFlags +# else +# define ThreadsCplusplusCompileFlags /**/ +# endif +#endif + +#ifndef ThreadsLibraries +#define ThreadsLibraries /**/ +#endif +#ifndef ThreadsCplusplusLibraries +# ifdef ThreadsLibraries +# define ThreadsCplusplusLibraries ThreadsLibraries +# else +# define ThreadsCplusplusLibraries /**/ +# endif +#endif +#ifndef ThreadsLoadFlags +#define ThreadsLoadFlags ThreadsCompileFlags +#endif +#ifndef ThreadsCplusplusLoadFlags +#define ThreadsCplusplusLoadFlags ThreadsCplusplusCompileFlags +#endif + +#if LocalThreads + THREADS_CFLAGS = ThreadsCompileFlags + THREADS_DEFINES = LocalThreadsDefines ThreadTypeDefines SystemMTDefines MTSafeAPIDefines ThreadPreStdAPIDefines $(LIB_MT_DEFINES) + THREADS_LDFLAGS = ThreadsLoadFlags + THREADS_LIBS = ThreadsLibraries + + THREADS_CXXFLAGS = ThreadsCplusplusCompileFlags +THREADS_CXXDEFINES = LocalThreadsDefines ThreadTypeDefines CplusplusSystemMTDefines MTSafeAPIDefines ThreadPreStdAPIDefines $(LIB_MT_DEFINES) +THREADS_CXXLDFLAGS = ThreadsCplusplusLoadFlags + THREADS_CXXLIBS = ThreadsCplusplusLibraries +#endif diff --git a/nx-X11/config/cf/X11.rules b/nx-X11/config/cf/X11.rules new file mode 100644 index 000000000..af3473c3a --- /dev/null +++ b/nx-X11/config/cf/X11.rules @@ -0,0 +1,131 @@ +/* Note whether we are the top level project. */ +#ifndef SeenTopLevelProject +# define SeenTopLevelProject YES +# define X11IsTopLevelProject YES +#else +# define X11IsTopLevelProject NO +#endif + +/* + * If no clues are given assume X11 is in the tree, otherwise + * UseInstalled overrides UseImports. Do not do both. + */ +#ifndef UseInstalledX11 +# define UseInstalledX11 NO +#endif +#ifdef UseInstalled +# undef UseInstalledX11 +# define UseInstalledX11 YES +#endif + +#ifndef ImportX11 +# ifdef UseImports +# define ImportX11 YES +# else +# define ImportX11 NO +# endif +#endif +#if UseInstalledX11 +# undef ImportX11 +# define ImportX11 NO +#endif + +#if defined(X11ProjectRoot) +# define XBinDir $(XPROJECTROOT)/lib/nx/bin +#elif defined(ProjectRoot) +# define XBinDir $(PROJECTROOT)/lib/nx/bin +#else +# define XBinDir $(BINDIR) +#endif + +#ifdef X11ProjectRoot +# define XUsrLibDirPath $(USRLIBDIR):$(XPROJECTROOT) +#else +# define XUsrLibDirPath $(USRLIBDIR) +#endif +#ifdef UsrLibDirPath +# undef UsrLibDirPath +#endif +#ifdef ExtraLibDirPath +#define UsrLibDirPath XUsrLibDirPath:ExtraLibDirPath +#else +#define UsrLibDirPath XUsrLibDirPath +#endif + +#if ImportX11 +# define XLdPreLibs -L$(LIBSRC) +#elif defined(UseInstalledX11) && defined(X11ProjectRoot) +# define XLdPreLibs -L$(XPROJECTROOT) +#else +# define XLdPreLibs /**/ +#endif +#ifdef LdPreLibs +# undef LdPreLibs +#endif +#define LdPreLibs LdPreLib XLdPreLibs + +#ifdef X11ProjectRoot +# define XLdPostLibs -L$(XPROJECTROOT) +#else +# define XLdPostLibs /**/ +#endif +#ifdef LdPostLibs +# undef LdPostLibs +#endif +#define LdPostLibs LdPostLib XLdPostLibs + +#ifndef TopXInclude +# if ImportX11 +# define TopXInclude -I$(TOP)/imports/x11/include +# elif !UseInstalledX11 +# define TopXInclude -I$(TOP)/exports/include +#else +# ifdef X11ProjectRoot +# define TopXInclude -I$(XPROJECTROOT)/../../include/nx +# else +# define TopXInclude /**/ +# endif +# endif +#endif +#ifdef TopIncludes +# undef TopIncludes +#endif +#define TopIncludes TopInclude $(TOP_X_INCLUDES) + +#if UseInstalledX11 && defined(X11ProjectRoot) +# define X11BuildLibPath $(XPROJECTROOT) +#elif UseInstalledX11 +# define X11BuildLibPath $(USRLIBDIR) +#elif ImportX11 +# define X11BuildLibPath $(XTOP)/lib +#else +# define X11BuildLibPath $(TOP)/exports/lib +#endif + +#ifndef BuildLibPath +#ifdef SystemBuildLibPath +# define BuildLibPath $(XENVLIBDIR):$(SYSTEMENVLIBDIR) +#else +# define BuildLibPath $(XENVLIBDIR) +#endif +#endif + +#ifndef X11ProjectDefines +# define X11ProjectDefines /**/ +#endif +#define ProjectDefines X11ProjectDefines + +#ifndef X11CplusplusProjectDefines +# define X11CplusplusProjectDefines X11ProjectDefines +#endif +#define CplusplusProjectDefines X11CplusplusProjectDefines + +#ifndef XtransFailSoft +# define XtransFailSoft NO +#endif + +#if XtransFailSoft +# define XtransFailDefine /**/ +#else +# define XtransFailDefine -DFAIL_HARD +#endif diff --git a/nx-X11/config/cf/X11.tmpl b/nx-X11/config/cf/X11.tmpl new file mode 100644 index 000000000..ddd6e0bad --- /dev/null +++ b/nx-X11/config/cf/X11.tmpl @@ -0,0 +1,1561 @@ +XCOMM ---------------------------------------------------------------------- +XCOMM X Window System Build Parameters and Rules +XCOMM ---------------------------------------------------------------------- + +/*************************************************************************** + * * + * DEFAULT DEFINITIONS * + * * + * The following section contains defaults for things that can * + * overridden in the various *.cf and site.def files. DO NOT EDIT! * + * * + **************************************************************************/ + +#define ProjectX 604 /* do *not* change this line */ + +/* The following project-specific rules are defined at the end of this file: + * + * InstallAppDefaults (class) + */ + +/* X.Org release string */ +#ifndef XOrgReleaseString +# if defined XorgVersionString +# define XOrgReleaseString Release XorgVersionString +# else +# define XOrgReleaseString Release 6.9 +# endif +#endif + +#ifndef XOrgManNameString +#define XOrgManNameString X Version 11 +#endif +#ifndef XOrgNameString +# define XOrgNameString The X.Org Foundation +#endif +#ifndef XOrgNameStringShort +# define XOrgNameStringShort X.Org +#endif +#ifndef XOrgStdFilePrefix +# define XOrgStdFilePrefix xorg +#endif +#ifndef XOrgWebSupportAddress +# define XOrgWebSupportAddress http://wiki.X.Org +#endif + +XORGRELSTRING = XorgManVersionString + XORGMANNAME = XOrgManNameString + +#ifndef XOrgManDefs +#define XOrgManDefs -D__xorgversion__="\"$(XORGRELSTRING)\" \"$(XORGMANNAME)\"" +#endif + +#ifndef XVendorManNameString +#define XVendorManNameString XOrgManNameString +#endif +#ifndef XVendorManVersionString +#define XVendorManVersionString XOrgReleaseString +#endif +#ifndef XVendorNameString +# define XVendorNameString XOrgNameString +#endif +#ifndef XVendorNameStringShort +# define XVendorNameStringShort XOrgNameStringShort +#endif +#ifndef XVendorWebSupport +# define XVendorWebSupport XOrgWebSupportAddress +#endif +#ifndef XVendorStdFilePrefix +# define XVendorStdFilePrefix XOrgStdFilePrefix +#endif + +#ifndef VendorManDefs +#define VendorManDefs -D__vendorversion__="$(VENDORMANVERSION) $(VENDORMANNAME)" +#endif + +#ifndef VendorDefines +#define VendorDefines -DXVENDORNAME='"$(VENDORNAME)"' -DXVENDORNAMESHORT='"$(VENDORNAMESHORT)"' +#endif + +#ifndef VendorSupportDefines +# if defined XVendorWebSupport +# define VendorSupportDefines -D__VENDORDWEBSUPPORT__='"$(VENDORWEBSUPPORT)"' +# endif +#endif +/* + * X-specific things + */ +#if CrossCompiling && !defined(UseInstalledOnCrossCompile) +# if defined(UseInstalled) +# define UseInstalledOnCrossCompile YES +# else +# define UseInstalledOnCrossCompile NO +# endif +#else +# define UseInstalledOnCrossCompile NO +#endif + +#ifndef HasXServer +#define HasXServer YES +#endif +/* xorg.cf sets XorgServer to YES - to build Xorg you must include xorg.cf + * from the .cf file for your platform. + */ +#ifndef XorgServer +#define XorgServer NO +#endif +#ifndef BuildServer +#define BuildServer HasXServer +#endif +#ifndef BuildServersOnly +#define BuildServersOnly NO +#endif +#ifndef BuildClients +#define BuildClients !BuildServersOnly +#endif +#ifndef BuildDocs +#define BuildDocs !BuildServersOnly +#endif +#ifndef BuildLibraries +#define BuildLibraries (!BuildServersOnly || BuildClients) +#endif +#ifndef BuildLibrariesForXServers +#define BuildLibrariesForXServers BuildServer +#endif +#ifndef BuildX11Lib +#define BuildX11Lib BuildLibraries +#endif + +#ifndef InstallXcmsTxt +#define InstallXcmsTxt YES +#endif +/* + * This disables XLOCALEDIR. + */ +#ifndef DisableXLocaleDirEnv +#define DisableXLocaleDirEnv NO +#endif +#ifndef BuildLoadableXlibXcursor +#define BuildLoadableXlibXcursor (HasDlopen && SharedLibX11) +#endif +#ifndef BuildTestExt +#define BuildTestExt YES +#endif +#ifndef BuildSyncExt +#define BuildSyncExt YES +#endif +#ifndef BuildXCMiscExt +#define BuildXCMiscExt YES +#endif +#ifndef BuildShapeExt +#define BuildShapeExt YES +#endif +#ifndef BuildBigReqsExt +#define BuildBigReqsExt YES +#endif +#ifndef BuildXInputExt +#define BuildXInputExt NO +#endif +#ifndef BuildDBE +#define BuildDBE YES +#endif +#ifndef BuildDPMS +#define BuildDPMS YES +#endif +#ifndef BuildXKB +#define BuildXKB YES +#endif +#ifndef BuildXKBlib +#define BuildXKBlib (BuildXKB && !BuildServersOnly) +#endif + + /* + * WARNING: Setting UseXKBInClients to YES cause incompatibilities + * between many clients (such as xterm) and pre-XKB shared + * libraries. + */ +#ifndef UseXKBInClients +#define UseXKBInClients NO /* use XKB in "normal" clients? */ +#endif +#ifndef BuildRECORD +#define BuildRECORD YES +#endif +#ifndef BuildRECORDlib +#define BuildRECORDlib BuildRECORD +#endif +#ifndef BuildXinerama +#define BuildXinerama NO +#endif +#ifndef BuildXCSecurity +#define BuildXCSecurity YES +#endif +#ifndef HasPlugin +/* Browser plugins are shared libraries - only build them if the OS + * supports shared libs. + */ +#define HasPlugin HasSharedLibraries +#endif +#ifndef BuildPlugin +#define BuildPlugin HasPlugin +#endif + +#ifndef BuildScreenSaverExt +#define BuildScreenSaverExt NO +#endif +#ifndef BuildXF86BigfontExt +#define BuildXF86BigfontExt NO +#endif +#ifndef BuildXResExt +#define BuildXResExt NO +#endif +#ifndef BuildXvExt +#define BuildXvExt NO +#endif +#ifndef BuildXvMCExt +#define BuildXvMCExt NO +#endif +#ifndef BuildGlxExt +#define BuildGlxExt NO +#endif +#ifndef BuildOSMesaLib +#define BuildOSMesaLib BuildGlxExt +#endif +#ifndef BuildRender +#define BuildRender YES +#endif + +#ifndef BuildRandR +#define BuildRandR YES +#endif + +#ifndef BuildXfixes +#define BuildXfixes YES +#endif + +#ifndef BuildDamage +#define BuildDamage BuildXfixes +#endif + +#ifndef BuildComposite +#define BuildComposite (BuildXfixes && BuildDamage) +#endif +#ifndef BuildCompositeLibrary +#define BuildCompositeLibrary !BuildServersOnly && BuildXfixesLibrary +#endif + +#ifndef BuildRootless +#define BuildRootless NO +#endif + +#ifndef DefaultCursorTheme +#define DefaultCursorTheme core +#endif + +#ifndef BuildMiscDocs +#define BuildMiscDocs NO +#endif +#ifndef BuildSpecsDocs +#define BuildSpecsDocs NO +#endif +#ifndef BuildAllSpecsDocs +#define BuildAllSpecsDocs NO +#endif + +#ifndef InstallHardcopyDocs +#define InstallHardcopyDocs YES +#endif + +#ifndef InstallMiscManPages +#define InstallMiscManPages YES +#endif + +#ifndef FSUseSyslog +#define FSUseSyslog NO +#endif + +#ifndef InstallLibManPages +#define InstallLibManPages YES +#endif + +#ifndef UseConfDirForXkb +#define UseConfDirForXkb YES +#endif +#ifndef ThreadedX +#if HasPosixThreads || HasCThreads +#define ThreadedX YES /* multi-threaded libraries */ +#else +#define ThreadedX NO +#endif +#endif +#ifndef ThreadedProject +#define ThreadedProject ThreadedX +#endif +#ifndef NeedUIThrStubs +#define NeedUIThrStubs NO +#endif +#ifndef HasWChar32 +#define HasWChar32 SystemV4 +#endif +#ifndef HasXdmAuth +#define HasXdmAuth NO /* if you can not use XDM-AUTH* */ +#endif +#ifndef PrimaryScreenResolution +#define PrimaryScreenResolution 72 /* a common resolution */ +#endif +#ifndef DefaultFontPath +# if PrimaryScreenResolution < 88 /* (75 + 100) / 2 */ +# define DefaultFontPath $(FONTDIR)/misc/,$(FONTDIR)/TTF/,$(FONTDIR)/Type1/,$(FONTDIR)/CID/,$(FONTDIR)/75dpi/,$(FONTDIR)/100dpi/ +# else +# define DefaultFontPath $(FONTDIR)/misc/,$(FONTDIR)/TTF/,$(FONTDIR)/Type1/,$(FONTDIR)/CID/,$(FONTDIR)/100dpi/,$(FONTDIR)/75dpi/ +# endif +#endif +#ifndef DefaultFSFontPath +# define DefaultFSFontPath DefaultFontPath +#endif +#ifndef UseMemLeak +#define UseMemLeak NO +#endif +#ifndef ServerErrorDefines +#define ServerErrorDefines /**/ +#endif +/* + * NOTE: IPv6Flags could be tacked on to either ConnectionFlags or + * ExtraConnectionDefs. Here, we choose the later in order to + * maximise exposure of the IPv6 code (a number of <OS>.def files + * contain ConnectionFlags overrides). + */ +#ifndef BuildIPv6 /* If the OS also #define's AF_INET6 */ +#define BuildIPv6 YES +#endif +#ifndef IPv6Flags +#if BuildIPv6 +#define IPv6Flags -DIPv6 +#else +#define IPv6Flags /**/ +#endif +#endif +/* + * Assume by default that IPv6 sockets also listen for IPv4 connections. + * XDMCP support currently only works for both IPv4 and IPv6 when this is + * true. + */ +#ifndef IPv6SocketsAlsoIPv4 +#define IPv6SocketsAlsoIPv4 YES +#endif +#ifndef ConnectionFlags +#define ConnectionFlags -DTCPCONN -DUNIXCONN +#endif +#if HasStickyDirBit +STICKY_DEFINES = -DHAS_STICKY_DIR_BIT +#endif +#if HasFchown +FCHOWN_DEFINES = -DHAS_FCHOWN +#endif +#ifndef ExtraConnectionDefs +#define ExtraConnectionDefs $(STICKY_DEFINES) $(FCHOWN_DEFINES) IPv6Flags +#endif +#ifndef ProjectThreadsDefines +#define ProjectThreadsDefines -DXTHREADS +#endif +#if Malloc0ReturnsNull +#ifndef XMalloc0ReturnsNullDefines +#define XMalloc0ReturnsNullDefines Malloc0ReturnsNullDefines +#endif +#ifndef XtMalloc0ReturnsNullDefines +#define XtMalloc0ReturnsNullDefines Malloc0ReturnsNullDefines -DXTMALLOC_BC +#endif +#endif +#ifndef ExtensionOSDefines +#define ExtensionOSDefines /**/ +#endif + +#ifndef ExtensionDefines +#ifndef XTestDefines +#if BuildTestExt +#define XTestDefines -DXTEST +#else +#define XTestDefines /**/ +#endif +#endif +#ifndef XSyncDefines +#if BuildSyncExt +#define XSyncDefines -DXSYNC +#else +#define XSyncDefines /**/ +#endif +#endif +#ifndef XCMiscDefines +#if BuildXCMiscExt +#define XCMiscDefines -DXCMISC +#else +#define XCMiscDefines /**/ +#endif +#endif +#ifndef ShapeDefines +#if BuildShapeExt +#define ShapeDefines -DSHAPE +#else +#define ShapeDefines /**/ +#endif +#endif +#ifndef GlxDefines +#if BuildGlxExt +#ifdef GlxExtraDefines +#define GlxDefines -DGLXEXT GlxExtraDefines +#else +#define GlxDefines -DGLXEXT +#endif +#else +#define GlxDefines /**/ +#endif +#endif +#ifndef DRMSrcDir +#define DRMSrcDir $(TOP)/extras/drm +#endif +#ifndef MesaSrcDir +#define MesaSrcDir $(TOP)/extras/Mesa +#endif +#ifndef OglSampleSrcDir +#define OglSampleSrcDir $(TOP)/extras/ogl-sample +#endif +#ifndef ShmDefines +#if HasShm +#define ShmDefines -DMITSHM +#else +#define ShmDefines /**/ +#endif +#endif +#ifndef XInputDefines +#if BuildXInputExt +#define XInputDefines -DXINPUT +#else +#define XInputDefines /**/ +#endif +#endif +#ifndef XineramaDefines +#if BuildXinerama +#define XineramaDefines -DPANORAMIX +#else +#define XineramaDefines /**/ +#endif +#endif +#ifndef XkbDefines +#if BuildXKB +#define XkbDefines -DXKB +#else +#define XkbDefines /**/ +#endif +#endif +#ifndef XkbClientDefines +#if UseXKBInClients +#define XkbClientDefines -DXKB +#else +#define XkbClientDefines /**/ +#endif +#endif +#ifndef XkbServerDefines +#define XkbServerDefines /**/ +#endif +#ifndef XkbDefRulesDefines +#define XkbDefRulesDefines -D__XKBDEFRULES__='"$(XKBDEFRULES)"' +#endif +# ifndef XkbDefaultRulesFile +# define XkbDefaultRulesFile XVendorStdFilePrefix +#endif +#ifndef BigReqDefines +#if BuildBigReqsExt +#define BigReqDefines -DBIGREQS +#else +#define BigReqDefines /**/ +#endif +#endif + +#ifndef DBEDefines +#if BuildDBE +#define DBEDefines -DDBE +#else +#define DBEDefines /**/ +#endif +#endif + +#ifndef PervasiveDBEDefines +#define PervasiveDBEDefines /* -DNEED_DBE_BUF_BITS -DNEED_DBE_BUF_VALIDATE */ +#endif + +#ifndef ScreenSaverExtensionDefines +#if BuildScreenSaverExt +#define ScreenSaverExtensionDefines -DSCREENSAVER +#else +#define ScreenSaverExtensionDefines /**/ +#endif +#endif + +#ifndef XF86BigfontExtensionDefines +#if BuildXF86BigfontExt +#define XF86BigfontExtensionDefines -DXF86BIGFONT +#else +#define XF86BigfontExtensionDefines /**/ +#endif +#endif + +#ifndef XvExtensionDefines +#if BuildXvExt +#define XvExtensionDefines -DXV +#else +#define XvExtensionDefines /**/ +#endif +#endif + +#ifndef XvMCExtensionDefines +#if BuildXvMCExt +#define XvMCExtensionDefines -DXVMC +#else +#define XvMCExtensionDefines /**/ +#endif +#endif + +#ifndef XResExtensionDefines +#if BuildXResExt +#define XResExtensionDefines -DRES +#else +#define XResExtensionDefines /**/ +#endif +#endif + +#ifndef RECORDDefines +#if BuildRECORD +#define RECORDDefines -DXRECORD +#else +#define RECORDDefines /**/ +#endif +#endif + +#ifndef XCSecurityDefines +#if BuildXCSecurity +#define XCSecurityDefines -DXCSECURITY +#else +#define XCSecurityDefines /**/ +#endif +#endif + +#ifndef DPMSDefines +#if BuildDPMS +#define DPMSDefines -DDPMSExtension +#else +#define DPMSDefines /**/ +#endif +#endif + +#ifndef RenderDefines +#if BuildRender +#define RenderDefines -DRENDER +#else +#define RenderDefines /**/ +#endif +#endif + +#ifndef RandRDefines +#if BuildRandR +#define RandRDefines -DRANDR +#else +#define RandRDefines /**/ +#endif +#endif + +#ifndef XfixesDefines +#if BuildXfixes +#define XfixesDefines -DXFIXES +#else +#define XfixesDefines /**/ +#endif +#endif + +#ifndef XDamageDefines +#if BuildDamage +#define XDamageDefines -DDAMAGE +#else +#define XDamageDefines /**/ +#endif +#endif + +#ifndef CompositeDefines +#if BuildComposite +#define CompositeDefines -DCOMPOSITE +#else +#define CompositeDefines /**/ +#endif +#endif + +#ifndef RootlessDefines +#if BuildRootless +#define RootlessDefines -DROOTLESS +#else +#define RootlessDefines /**/ +#endif +#endif + +#ifndef SitePervasiveExtensionDefines +#define SitePervasiveExtensionDefines /**/ +#endif +#ifndef PervasiveExtensionDefines +#define PervasiveExtensionDefines \ + PervasiveDBEDefines \ + ShapeDefines \ + XInputDefines \ + XkbDefines \ + XCSecurityDefines \ + XF86BigfontExtensionDefines \ + DPMSDefines \ + SitePervasiveExtensionDefines \ + RenderDefines \ + RandRDefines \ + XineramaDefines \ + XfixesDefines \ + XDamageDefines \ + CompositeDefines \ + RootlessDefines +#endif +#ifndef SiteExtensionDefines +#define SiteExtensionDefines /**/ +#endif +#ifndef BaseExtensionDefines +#define BaseExtensionDefines \ + DBEDefines \ + XTestDefines \ + XSyncDefines \ + RECORDDefines \ + ShmDefines \ + BigReqDefines \ + DPMSDefines \ + ScreenSaverExtensionDefines \ + XvExtensionDefines \ + XvMCExtensionDefines \ + GlxDefines \ + SiteExtensionDefines \ + XResExtensionDefines +#endif +#define ExtensionDefines BaseExtensionDefines ExtensionOSDefines +#endif /* ExtensionDefines */ + +#ifndef HasStrcasecmp +#define HasStrcasecmp YES +#endif + +#ifndef StrcasecmpDefines +# if HasStrcasecmp +# define StrcasecmpDefines /**/ +# else +# define StrcasecmpDefines -DNEED_STRCASECMP +# endif +#endif + +#ifndef HasDevRandom +#define HasDevRandom NO +#endif + +#ifndef HasArc4Random +#define HasArc4Random NO +#endif + +#ifndef RandomDefines +# if HasDevRandom +# ifndef RandomDeviceFile +# define RandomDeviceFile /dev/random +# endif +# ifndef ExtraRandomDefines +# ifdef PollDevRandom /* Set if can poll() /dev/random to avoid blocking */ +# define ExtraRandomDefines -DPOLL_DEV_RANDOM +# else +# define ExtraRandomDefines /**/ +# endif +# endif +# define RandomDefines -DDEV_RANDOM=\"RandomDeviceFile\" ExtraRandomDefines +# elif HasArc4Random +# define RandomDefines -DARC4_RANDOM +# else +# define RandomDefines /**/ +# endif +#endif + +#ifndef PreferXdmcpIPv6 +#define PreferXdmcpIPv6 NO +#endif +#ifndef ServerXdmcpIPv6Defines +#if BuildIPv6 && !IPv6SocketsAlsoIPv4 && !PreferXdmcpIPv6 +#define ServerXdmcpIPv6Defines -DXDMCP_NO_IPV6 +#else +#define ServerXdmcpIPv6Defines /**/ +#endif +#endif + +#ifndef ServerXdmcpDefines +#define ServerXdmcpDefines -DXDMCP ServerXdmcpIPv6Defines +#endif +#ifndef ServerOSDefines +#define ServerOSDefines /**/ +#endif +#ifndef ServerExtraDefines +#define ServerExtraDefines /* -DPIXPRIV */ +#endif +#ifndef ServerAssertDefines +#define ServerAssertDefines -DNDEBUG +#endif +#ifndef ServerSnprintfDefines +#if !HasSnprintf +#define ServerSnprintfDefines -DNEED_SNPRINTF +#else +#define ServerSnprintfDefines /**/ +#endif +#endif +#ifndef ServerReallocarrayDefines +#if HasReallocarray +#define ServerReallocarrayDefines -DHAVE_REALLOCARRAY +#else +#define ServerReallocarrayDefines /**/ +#endif +#endif +#ifndef ServerDefines +#define ServerDefines StandardDefines PervasiveExtensionDefines ServerExtraDefines ServerAssertDefines ServerSnprintfDefines ServerReallocarrayDefines +#endif + +#ifndef MesaUseX86Asm +/* The current Mesa X86 ASM code doesn't work well with SVR4 shared libs. */ +# if HasX86Support && !SystemV4 +# define MesaUseX86Asm YES +# else +# define MesaUseX86Asm NO +# endif +#endif + +#ifndef MesaUseMMX +#ifdef HasMMXSupport +#define MesaUseMMX HasMMXSupport +#else +#define MesaUseMMX NO +#endif +#endif + +#ifndef MesaUse3DNow +#ifdef Has3DNowSupport +#define MesaUse3DNow Has3DNowSupport +#else +#define MesaUse3DNow NO +#endif +#endif + +#ifndef MesaUseSSE +#ifdef HasSSESupport +#define MesaUseSSE HasSSESupport +#else +#define MesaUseSSE NO +#endif +#endif + +/* For compatibility */ +#ifdef HasSSESupport +#undef HasKatmaiSupport +#define HasKatmaiSupport HasSSESupport +#endif +#undef MesaUseKatmai +#define MesaUseKatmai MesaUseSSE + +#ifndef UsbMouseSupport +# define UsbMouseSupport NO +#endif + +#ifndef DefaultFSConfigFile +#define DefaultFSConfigFile $(LIBDIR)/fs/config +#endif + +#ifndef BinDir +#ifdef ProjectRoot +#define BinDir Concat(ProjectRoot,/lib/nx/bin) +#else +#define BinDir /usr/bin/X11 +#endif +#endif +#ifndef BuildIncRoot +#define BuildIncRoot $(TOP)/exports +#endif +#ifndef BuildIncDir +#define BuildIncDir $(BUILDINCROOT)/include +#endif +#ifndef BuildIncTop +#define BuildIncTop ../.. /* relative to BuildIncDir */ +#endif +#ifndef XTop +# if ImportX11 +# define XTop $(TOP)/imports/x11 +# else +# define XTop $(TOP) +# endif +#endif +#ifndef XBuildIncRoot +# if ImportX11 +# define XBuildIncRoot $(XTOP) +# else +# define XBuildIncRoot $(XTOP)/exports +# endif +#endif +#ifndef XBuildIncDir +# define XBuildIncDir $(XBUILDINCROOT)/include/X11 +#endif +#ifndef XBuildIncTop +# define XBuildIncTop ../../.. +#endif +#ifndef XBuildBinDir +# define XBuildBinDir $(XBUILDINCROOT)/bin +#endif +#ifndef BuildBinDir +#define BuildBinDir $(TOP)/exports/bin +#endif +#ifndef BuildBinTop +#define BuildBinTop ../.. /* relative to BuildBinDir */ +#endif +#ifndef BuildLibDir +#define BuildLibDir $(TOP)/exports/lib +#endif +#ifndef BuildLibTop +#define BuildLibTop ../.. /* relative to BuildLibDir */ +#endif +#ifndef BuildModuleDir +#define BuildModuleDir $(BUILDLIBDIR)/modules +#endif +#ifndef BuildI18NDir +# define BuildI18NDir $(BUILDLIBDIR)/locale +#endif +#ifndef BuildModuleTop +#define BuildModuleTop $(BUILDLIBTOP)/.. +#endif +#ifndef LibDir +# ifdef ProjectRoot +# define LibDir Concat(ProjectRoot,/lib/nx/X11) +# else +# define LibDir /usr/lib/X11 +# endif +#endif +#ifndef ModuleDir +#define ModuleDir $(USRLIBDIR)/modules +#endif +#ifndef InstSrcDir +#define InstSrcDir Concat(ProjectRoot,/src) +#endif +#ifndef LibexecDir +#ifdef ProjectRoot +#define LibexecDir Concat(ProjectRoot,/libexec) +#else +#define LibexecDir /usr/X11/libexec +#endif +#endif +#ifndef ConfigDir +#define ConfigDir $(LIBDIR)/config +#endif +#ifndef DocDir +#define DocDir $(LIBDIR)/doc +#endif +#ifndef DocHtmlDir +#define DocHtmlDir $(DOCDIR)/html +#endif +#ifndef DocPsDir +#define DocPsDir $(DOCDIR)/PostScript +#endif +#ifndef DocPdfDir +#define DocPdfDir $(DOCDIR)/PDF +#endif +#ifndef FontDir +#define FontDir $(USRDATADIR)/fonts +#endif +#ifndef FontEncDir +#define FontEncDir $(USRDATADIR)/fonts/encodings +#endif +#ifndef AdmDir +#define AdmDir /usr/adm +#endif +#ifndef XinitDir +#define XinitDir $(LIBDIR)/xinit +#endif +#ifndef XdmDir +#define XdmDir $(LIBDIR)/xdm +#endif +#ifndef XdmVarDir +#define XdmVarDir $(VARLIBDIR)/xdm +#endif +#ifndef XdmAuthDir +#define XdmAuthDir $(LIBDIR)/xdm +#endif +#ifndef XdmConfigurationSubdirectory /* under xdm sources */ +#define XdmConfigurationSubdirectory config +#endif +#ifndef TwmDir +#define TwmDir $(LIBDIR)/twm +#endif +#ifndef XsmDir +#define XsmDir $(LIBDIR)/xsm +#endif +#ifndef NlsDir +#define NlsDir $(LIBDIR)/nls +#endif +#ifndef XLocaleDir +#define XLocaleDir $(LIBDIR)/locale +#endif +#ifndef ProxyManagerDir +#define ProxyManagerDir $(LIBDIR)/proxymngr +#endif +#ifndef ServerConfigDir +#define ServerConfigDir $(LIBDIR)/xserver +#endif +#ifndef EtcX11Directory +#define EtcX11Directory /etc/X11 +#endif +#ifndef InstallSecurityConfig +#define InstallSecurityConfig YES /* Install sample security policy */ +#endif +#ifndef XFileSearchPathBase +/* avoid SCCS keyword */ +#define XFileSearchPathBase Concat4($(LIBDIR)/%L/%T/%N%C,%S:$(LIBDIR)/%l/%T/%N%C,%S:$(LIBDIR)/%T/%N%C,%S:$(LIBDIR)/%L/%T/%N%S:$(LIBDIR)/%l/%T/%N%S:$(LIBDIR)/%T/%N%S) +#endif +#ifndef XFileSearchPathDefault +#ifdef XAppLoadDir +/* avoid SCCS keyword */ +#define XFileSearchPathDefault XAppLoadDir/Concat(%N%C,%S):XAppLoadDir/%N%S:XFileSearchPathBase +#else +#define XFileSearchPathDefault XFileSearchPathBase +#endif +#endif +#ifndef XAppLoadDir +#define XAppLoadDir $(LIBDIR)/app-defaults +#endif +#ifndef XtErrorPrefix +#define XtErrorPrefix /* as empty string */ +#endif +#ifndef XtExtraDefines +#define XtExtraDefines /* as empty string */ +#endif +#ifndef XtWarningPrefix +#define XtWarningPrefix /* as empty string */ +#endif +#ifndef OsNameDefines +#define OsNameDefines /* as nothing */ +#endif +#ifndef DefaultUserPath /* for xdm */ +#define DefaultUserPath :/bin:/usr/bin:$(BINDIR):/usr/ucb +#endif +#ifndef DefaultSystemPath /* for xdm */ +#define DefaultSystemPath /etc:/bin:/usr/bin:$(BINDIR):/usr/ucb +#endif +#ifndef DefaultSystemShell /* for xdm to set in SHELL */ +#define DefaultSystemShell BourneShell +#endif +#ifndef ContribDir +#define ContribDir $(XTOP)/../contrib /* contrib is outside core tree */ +#endif +#ifndef UnsupportedDir +#define UnsupportedDir $(XTOP)/unsupported +#endif +#ifndef AllocateLocalDefines +#define AllocateLocalDefines /**/ +#endif + +#ifndef ForceNormalLib +#define ForceNormalLib (HasGcc && !HasGcc2) +#endif + +#ifndef PsWrap +# ifndef UseInstalled +# define PsWrap $(PSWRAPSRC)/pswrap +# else +# define PsWrap pswrap +# endif +#endif + +#ifndef ResourceConfigurationManagement +#define ResourceConfigurationManagement YES +#endif + +#ifndef XtPopdownConformance +#define XtPopdownConformance YES +#endif + +XCOMM ----------------------------------------------------------------------- +XCOMM X Window System make variables; these need to be coordinated with rules + +/* + * This list must be reflected in the DIRS_TO_BUILD list in the top-level + * Makefile. + */ + XTOP = XTop + BINDIR = BinDir /* programs */ + BUILDINCROOT = BuildIncRoot /* base of build loc */ + BUILDINCDIR = BuildIncDir /* built headers */ + BUILDINCTOP = BuildIncTop /* top relative to BUILDINCDIR */ + BUILDLIBDIR = BuildLibDir /* built libraries */ + BUILDLIBTOP = BuildLibTop /* top relative to BUILDLIBDIR */ + BUILDBINDIR = BuildBinDir /* built binaries */ + BUILDBINTOP = BuildBinTop /* top relative to BUILDBINDIR */ + BUILDMODULEDIR = BuildModuleDir /* built server modules */ + BUILDI18NDIR = BuildI18NDir /* built i81n modules */ + BUILDMODULETOP = BuildModuleTop /* top relative to BUILDMODULEDIR */ + XBUILDINCROOT = XBuildIncRoot /* base of X build loc */ + XBUILDINCDIR = XBuildIncDir + XBUILDINCTOP = XBuildIncTop + XBUILDBINDIR = XBuildBinDir + INCDIR = $(INCROOT) /* header files */ + ADMDIR = AdmDir /* server log files */ + LIBDIR = LibDir /* rgb, XErrorDB, etc. */ + LIBEXECDIR = LibexecDir + MODULEDIR = ModuleDir + TOP_X_INCLUDES = TopXInclude + XBINDIR = XBinDir /* BINDIR for X11ProjectRoot */ + + INSTSRCDIR = InstSrcDir /* Installed source (kernel modules). */ + +#ifdef EtcX11Directory + ETCX11DIR = EtcX11Directory +#endif +#if UseEtcX11 + CONFDIR = $(ETCX11DIR) +#elif HasVarDirectory + CONFDIR = $(VARDIR) +#endif + DOCDIR = DocDir + DOCHTMLDIR = DocHtmlDir + DOCPSDIR = DocPsDir + DOCPDFDIR = DocPdfDir + FONTDIR = FontDir /* font directories */ + ENCODINGSDIR = FontEncDir /* font encodings directory */ + XINITDIR = XinitDir /* xinit config files */ + XDMDIR = XdmDir /* xdm config files */ + XDMVARDIR = XdmVarDir /* xdm config files */ + TWMDIR = TwmDir /* twm config files */ + XSMDIR = XsmDir /* xsm config files */ + NLSDIR = NlsDir /* nls files */ + XLOCALEDIR = XLocaleDir /* locale files */ + XLOCALELIBDIR = XlocaleDir /* FIXME: For now take XLOCALEDIR, unsure about the correct setting */ + PROXYMANAGERDIR = ProxyManagerDir /* proxy manager config files */ + XAPPLOADDIR = XAppLoadDir /* application default resource dir */ + + INSTAPPFLAGS = $(INSTDATFLAGS) /* XXX - this should go away - XXX */ + +#if UseInstalledX11 + RGB = $(XBINDIR)/rgb + MKHTMLINDEX = $(XBINDIR)/mkhtmlindex +#else + RGB = $(CLIENTENVSETUP) $(XBUILDBINDIR)/rgb +# if HasPerl + MKHTMLINDEX = RunPerlScript($(CONFIGSRC)/util/mkhtmlindex.pl,) +# else + MKHTMLINDEX = $(SHELL) $(CONFIGSRC)/util/mkhtmlindex.sh +# endif +#endif + HTMLINDEXCMD = HtmlIndexCmd + + DOCUTILSRC = $(XTOP)/doc/util + CLIENTSRC = $(TOP)/clients + DEMOSRC = $(TOP)/demos + XDOCMACROS = $(DOCUTILSRC)/macros.t + XIDXMACROS = $(DOCUTILSRC)/indexmacros.t + PROGRAMSRC = $(TOP)/programs + LIBSRC = $(XTOP)/lib + INCLUDESRC = BuildIncDir + XINCLUDESRC = $(INCLUDESRC)/nx-X11 + SERVERSRC = $(XTOP)/programs/Xserver + CONTRIBSRC = ContribDir + UNSUPPORTEDSRC = UnsupportedDir + DOCSRC = $(XTOP)/doc + RGBSRC = $(XTOP)/programs/rgb + EXTINCSRC = $(XTOP)/include/extensions + DRMSRCDIR = DRMSrcDir + MESASRCDIR = MesaSrcDir + OGLSAMPLESRCDIR = OglSampleSrcDir + PSWRAPSRC = $(XTOP)/config/pswrap + TRANSCOMMSRC = $(LIBSRC)/xtrans + TRANS_INCLUDES = -I$(TRANSCOMMSRC) + CONNECTION_FLAGS = ConnectionFlags ExtraConnectionDefs +XTRANS_FAILDEFINES = XtransFailDefine +#ifdef X11ProjectRoot + XPROJECTROOT = X11ProjectRoot +#endif + VENDORMANNAME = XVendorManNameString + VENDORMANVERSION = XVendorManVersionString + XORGMANDEFS = XOrgManDefs + VENDORMANDEFS = VendorManDefs + VENDORNAME = XVendorNameString + VENDORNAMESHORT = XVendorNameStringShort + +#if defined (XVendorWebSupport) + VENDORWEBSUPPORT = XVendorWebSupport +#endif +VENDORSUPPORTDEFS = VendorSupportDefines + + XKBDEFRULES = XkbDefaultRulesFile + XKBDEFRULESDEFS = XkbDefRulesDefines + + XCONFIGFILE = XConfigFile + XCONFIGDIR = XConfigDir + XLOGFILE = XLogFile + XSERVERNAME = XServerName + +#if HasSharedLibraries +#ifndef DontUseLibPathVar +#ifndef BuildLibPathVar +#define BuildLibPathVar LD_LIBRARY_PATH +#endif +#endif +#endif +#ifdef BuildLibPathVar +# ifdef SystemBuildLibPath + SYSTEMENVLIBDIR = SystemBuildLibPath +# endif +#define XlocaleClientSetup Concat3(XLOCALEDIR,=,BuildI18NDir) + Concat3(XLOCALELIBDIR,=,BuildI18NDir) + XENVLIBDIR = X11BuildLibPath + CLIENTENVSETUP = Concat3(BuildLibPathVar,=,BuildLibPath) XlocaleClientSetup +#else + CLIENTENVSETUP = +#endif + +#ifdef PreloadSetup + PRELOADSETUP = PreloadSetup +#endif + +#ifndef ShLibIncludeFile +/* need this to make ANSI-style preprocessors happy */ +#define ShLibIncludeFile <noop.rules> +#endif + +#include ShLibIncludeFile + +#ifndef XBuildLibDir +# define XBuildLibDir BuildLibDir +#endif + +#ifndef NeedLibInsideFlag +#define NeedLibInsideFlag NO +#endif + +#ifndef SharedLibX11 +#define SharedLibX11 HasSharedLibraries +#endif +#ifndef NormalLibX11 +#define NormalLibX11 (!SharedLibX11 | ForceNormalLib) +#endif +#ifndef DebugLibX11 +#define DebugLibX11 NO /* debugged X library */ +#endif +#ifndef ProfileLibX11 +#define ProfileLibX11 NO /* profiled X library */ +#endif + XLIBSRC = $(LIBSRC)/X11 +#if SharedLibX11 +#ifndef SharedX11Rev +#define SharedX11Rev 6.2 +#endif +SharedLibReferences(XONLY,NX_X11,$(XLIBSRC),SOXLIBREV,SharedX11Rev) +#else +ProjectUnsharedLibReferences(XONLY,NX_X11,$(XLIBSRC),XBuildLibDir) +#endif + /* Common alternate spellings */ + DEPXLIBONLY = $(DEPXONLYLIB) + XLIBONLY = $(XONLYLIB) + LINTXONLYLIB = $(LINTXONLY) + +#if HasMotif + +#ifndef MotifDir +#define MotifDir /usr/X11R6 +#endif +#ifndef MotifDirStandard +#define MotifDirStandard NO +#endif + +#ifndef MotifLibDir +# define MotifLibDir MotifDir/LibDirName +# if MotifDirStandard +# define MotifLibDirStandard YES +# endif +#endif +#ifndef MotifLibDirStandard +# define MotifLibDirStandard NO +#endif + +#ifndef MotifIncDir +# define MotifIncDir MotifDir/include +# if MotifDirStandard +# define MotifIncDirStandard YES +# endif +#endif +#ifndef MotifIncDirStandard +# define MotifIncDirStandard NO +#endif + +MOTIFDIR = MotifDir +MOTIFLIBDIR = MotifLibDir +MOTIFINCDIR = MotifIncDir + +#if MotifLibDirStandard +MOTIFLIB = -lXm +#else +MOTIFLIB = -L$(MOTIFLIBDIR) LinkerRuntimeLibraryPathFlag($(MOTIFLIBDIR)) -lXm +#endif + +#if MotifIncDirStandard +MOTIFINCLUDES = +#else +MOTIFINCLUDES = -I$(MOTIFINCDIR) +#endif + +#endif /* HasMotif */ + +#ifndef LdLibraryPath +#define LdLibraryPath LD_LIBRARY_PATH +#endif + +#if BuildXKBlib +# ifndef XkbClientDepLibs +# define XkbClientDepLibs /**/ +# endif +# ifndef XkbClientLibs +# define XkbClientLibs /**/ +# endif + +#else /* !BuildXKBlib */ +# ifndef XkbClientDepLibs +# define XkbClientDepLibs +# endif +# ifndef XkbClientLibs +# define XkbClientLibs +# endif +#endif /* BuildXKBlib */ + +#ifndef NeedDefaultDepLibs +#define NeedDefaultDepLibs YES +#endif + +#if NeedDefaultDepLibs +/* + * Individual libraries should override this + */ +#if HasSharedLibraries || defined(UseInstalled) + DEPLIBS = $(DEPXLIB) +#else + DEPLIBS = $(LOCAL_LIBRARIES) +#endif + DEPLIBS1 = $(DEPLIBS) + DEPLIBS2 = $(DEPLIBS) + DEPLIBS3 = $(DEPLIBS) + DEPLIBS4 = $(DEPLIBS) + DEPLIBS5 = $(DEPLIBS) + DEPLIBS6 = $(DEPLIBS) + DEPLIBS7 = $(DEPLIBS) + DEPLIBS8 = $(DEPLIBS) + DEPLIBS9 = $(DEPLIBS) + DEPLIBS10 = $(DEPLIBS) +#endif /* NeedDefaultDepLibs */ + + +/* + * InstallAppDefaults - simple rules to install application default file + */ +#ifndef InstallAppDefaults +#define InstallAppDefaults(class) InstallAppDefaultsLong(class,class) +#endif /* InstallAppDefaults */ + +/* + * PostProcessTroffPS - by default moves the working output into place, + * but can be a hook for more complicated post-processing. + */ +#ifndef PostProcessTroffPS +#define PostProcessTroffPS(temp,real) $(MV) temp real +#endif + +/* + * PostProcessTroffHTML - by default moves the working output into place, + * but can be a hook for more complicated post-processing. + */ +#ifndef PostProcessTroffHTML +#define PostProcessTroffHTML(temp,real) $(MV) temp real +#endif + +#ifdef HTMLroffCmd +#define HtmlTarget(file) file.html +#define HtmlClean(file) file.nhtml file.html file*.png +#else +#define HtmlTarget(file) /**/ +#define HtmlClean(file) /**/ +#endif + +#ifdef PsToPdfCmd +#define PdfTarget(file) file.pdf +#define PdfClean(file) file.pdf +#else +#define PdfTarget(file) /**/ +#define PdfClean(file) /**/ +#endif + +#ifndef ConvertPsToPdf +#ifdef PsToPdfCmd +#define ConvertPsToPdf(file) @@\ +file.pdf: file.ps @@\ + RemoveFile(file.pdf) @@\ + $(PSTOPDFCMD) < file.ps > file.pdf +#else +#define ConvertPsToPdf(file) /**/ +#endif +#endif + +#if HasPdfLatex +#define PdfLatexTarget(file) file.pdf +#define PdfLatexClean(file) file.pdf +#else +#define PdfLatexTarget(file) /**/ +#define PdfLatexClean(file) /**/ +#endif + +#ifndef LatexToPdf +#if HasPdfLatex && defined(PdfLatexCmd) +#define LatexToPdf(file) @@\ +file.pdf: file.tex @@\ + RemoveFile(file.pdf) @@\ + $(PDFLATEXCMD) file.tex +#else +#define LatexToPdf(file) /**/ +#endif +#endif + + +#ifndef MakeDepSimpleHtmlDoc +#ifdef HTMLroffCmd +#define MakeDepSimpleHtmlDoc(file,deps,srcs) @@\ +HtmlTarget(file): deps @@\ + $(HTMLROFF) $(MSMACROS) $(XDOCMACROS) Concat(-P-I,file) srcs \ @@\ + 2> index.raw > file.nhtml \ @@\ + && PostProcessTroffHTML(file.nhtml,$@) +#else +#define MakeDepSimpleHtmlDoc(file,deps,srcs) /**/ +#endif +#endif + +#ifndef MakeTblHtmlDoc +#ifdef HTMLroffCmd +#define MakeTblHtmlDoc(file,srcs) @@\ +file.html: srcs @@\ + $(TBL) $(XDOCMACROS) srcs | $(HTMLROFF) $(MSMACROS) Concat(-P-I,file) \ @@\ + 2> index.raw > file.nhtml \ @@\ + && PostProcessTroffHTML(file.nhtml,$@) +#else +#define MakeTblHtmlDoc(file,srcs) /**/ +#endif +#endif + +#ifndef MakeEqnHtmlDoc +#ifdef HTMLroffCmd +#define MakeEqnHtmlDoc(file,srcs) @@\ +file.html: srcs @@\ + $(TBL) $(XDOCMACROS) srcs | $(EQN) | $(HTMLROFF) $(MSMACROS) Concat(-P-I,file) \ @@\ + 2> index.raw > file.nhtml \ @@\ + && PostProcessTroffHTML(file.nhtml,$@) +#else +#define MakeEqnHtmlDoc(file,srcs) /**/ +#endif +#endif + + +#ifndef MakeDepSimpleDoc +#define MakeDepSimpleDoc(file,deps,srcs) @@\ +all:: file.ps file.txt HtmlTarget(file) PdfTarget(file) @@\ +.PRECIOUS: file.ps @@\ + @@\ +file.ps: deps @@\ + -$(TROFF) $(MSMACROS) $(XDOCMACROS) srcs \ @@\ + 2> index.raw > file.nps \ @@\ + && PostProcessTroffPS(file.nps,$@) @@\ + @if grep '^[^1-9.]' index.raw | grep -v warning; then exit 1; \ @@\ + else test $$? -le 1; fi @@\ + @@\ +file.txt: deps @@\ + $(NROFF) $(MSMACROS) $(XDOCMACROS) srcs 2> index.raw | \ @@\ + $(COL) $(COLFLAGS) > $@ @@\ + @@\ +MakeDepSimpleHtmlDoc(file,deps,srcs) @@\ + @@\ +ConvertPsToPdf(file) @@\ + @@\ +clean:: @@\ + $(RM) index.raw file.nps file.ps file.txt HtmlClean(file) PdfClean(file) +#endif + +#ifndef MakeSimpleDoc +#define MakeSimpleDoc(file,srcs) MakeDepSimpleDoc(file,srcs,srcs) +#endif + +#ifndef MakeTblDoc +#define MakeTblDoc(file,srcs) @@\ +all:: file.ps file.txt HtmlTarget(file) PdfTarget(file) @@\ +.PRECIOUS: file.ps @@\ + @@\ +file.ps: srcs @@\ + -$(TBL) $(XDOCMACROS) srcs | $(TROFF) $(MSMACROS) \ @@\ + 2> index.raw > file.nps \ @@\ + && PostProcessTroffPS(file.nps,$@) @@\ + @if grep '^[^1-9.]' index.raw | grep -v warning; then exit 1; \ @@\ + else test $$? -le 1; fi @@\ + @@\ +file.txt: srcs @@\ + $(TBL) $(XDOCMACROS) srcs | $(NROFF) $(MSMACROS) 2> index.raw \ @@\ + | $(COL) $(COLFLAGS) > $@ @@\ + @@\ +MakeTblHtmlDoc(file,srcs) @@\ + @@\ +ConvertPsToPdf(file) @@\ + @@\ +clean:: @@\ + $(RM) index.raw file.nps file.ps file.txt HtmlClean(file) PdfClean(file) +#endif + +#ifndef MakeEqnDoc +#define MakeEqnDoc(file,srcs) @@\ +all:: file.ps file.txt HtmlTarget(file) PdfTarget(file) @@\ +.PRECIOUS: file.ps @@\ + @@\ +file.ps: srcs @@\ + -$(TBL) $(XDOCMACROS) srcs | $(EQN) | $(TROFF) $(MSMACROS) \ @@\ + 2> index.raw > file.nps \ @@\ + && PostProcessTroffPS(file.nps,$@) @@\ + @if grep '^[^1-9.]' index.raw | grep -v warning; then exit 1; \ @@\ + else test $$? -le 1; fi @@\ + @@\ +file.txt: srcs @@\ + $(TBL) $(XDOCMACROS) srcs | $(NEQN) | $(NROFF) $(MSMACROS) \ @@\ + 2> index.raw | $(COL) $(COLFLAGS) > $@ @@\ + @@\ +MakeEqnHtmlDoc(file,srcs) @@\ + @@\ +ConvertPsToPdf(file) @@\ + @@\ +clean:: @@\ + $(RM) index.raw file.nps file.ps file.txt HtmlClean(file) PdfClean(file) +#endif + +#ifndef MakeDocIndex +#define MakeDocIndex(file,srcs) @@\ +all:: file.idx.ps @@\ + @@\ +file.idx.ps: srcs index.raw @@\ + sed -n '$$p' index.raw > index.pageno @@\ + grep '^[1-9]' index.raw | \ @@\ + (sort -f '-t:' -k2,2 -k1,1n 2>/dev/null || \ @@\ + sort -f '-t:' +1 -3 +0n -1n) | \ @@\ + awk -f $(DOCUTILSRC)/fixindex.awk | \ @@\ + awk -f $(DOCUTILSRC)/block.awk > index.troff @@\ + cat srcs $(XIDXMACROS) index.troff | \ @@\ + $(TROFF) -me > file.idx.nps && \ @@\ + $(MV) file.idx.nps $@ @@\ + $(RM) index.troff index.pageno @@\ + @@\ +clean:: @@\ + $(RM) index.troff index.pageno file.idx.nps file.idx.ps +#endif + +#ifndef MakeLatexDoc +#if HasLatex +#define MakeLatexDoc(file,src) @@\ +all:: file.ps PdfLatexTarget(file) @@\ + @@\ +file.dvi: src @@\ + $(LATEX) src @@\ + @@\ +file.ps: file.dvi @@\ + $(DVIPS) -o file.nps file && $(MV) file.nps $@ @@\ + @@\ +LatexToPdf(file) @@\ + @@\ +clean:: @@\ + RemoveFiles(file.nps file.ps file.dvi file.log) @@\ + RemoveFiles(file.aux file.toc file.lof file.lot) @@\ + $(RM) PdfLatexClean(file) +#else /* HasLatex */ +#define MakeLatexDoc(file,src) @@\ +all:: @@\ +file.ps: src @@\ + @echo "cannot make file.ps: no latex on this system"; exit 1 +#endif /* HasLatex (else) */ +#endif /* MakeLatexDoc */ + +#ifndef InstallDoc +#define InstallDoc(name,deps) @@\ +install:: deps @@\ + MakeDir($(DESTDIR)$(DOCPSDIR)) @@\ + @if [ -f name.ps -a X$(NOPS) = X ]; then set -x; \ @@\ + $(INSTALL) $(INSTALLFLAGS) $(INSTDATFLAGS) name.ps \ @@\ + $(DESTDIR)$(DOCPSDIR); \ @@\ + fi ; RemoveOldFile(name.ps,name.PS,$(DOCPSDIR)) @@\ + MakeDir($(DESTDIR)$(DOCDIR)) @@\ + @if [ -f name.txt -a X$(NOTXT) = X ]; then set -x; \ @@\ + $(INSTALL) $(INSTALLFLAGS) $(INSTDATFLAGS) name.txt \ @@\ + $(DESTDIR)$(DOCDIR); \ @@\ + fi ; RemoveOldFile(name.txt,name.TXT,$(DOCDIR)) @@\ + MakeDir($(DESTDIR)$(DOCHTMLDIR)) @@\ + @if [ -f name.html -a X$(NOHTML) = X ]; then (set -x; \ @@\ + $(INSTALL) $(INSTALLFLAGS) $(INSTDATFLAGS) name.html \ @@\ + $(DESTDIR)$(DOCHTMLDIR)); \ @@\ + for i in name*.png; do \ @@\ + if [ -f $$i ]; then (set -x; \ @@\ + $(INSTALL) $(INSTALLFLAGS) $(INSTDATFLAGS) $$i \ @@\ + $(DESTDIR)$(DOCHTMLDIR)); \ @@\ + fi; \ @@\ + done; \ @@\ + fi @@\ + MakeDir($(DESTDIR)$(DOCPDFDIR)) @@\ + @if [ -f name.pdf -a X$(NOPDF) = X ]; then set -x; \ @@\ + $(INSTALL) $(INSTALLFLAGS) $(INSTDATFLAGS) name.pdf \ @@\ + $(DESTDIR)$(DOCPDFDIR); \ @@\ + fi +#endif + +#ifndef InstallRoffDoc +#define InstallRoffDoc(name) InstallDoc(name,name.ps name.txt) +#endif + +#ifndef InstallLatexDoc +#if HasLatex +#define InstallLatexDoc(name) InstallDoc(name,name.ps) +#else +#define InstallLatexDoc(name) +#endif +#endif + +#ifndef LinkHardcopyPS +# if CaseSensitiveFileSystem +# define LinkHardcopyPS(name) \ + @if [ -f name.PS ]; then set -x; \ @@\ + RemoveFile(name.ps); \ @@\ + $(LN) name.PS name.ps; \ @@\ + fi +# else +# define LinkHardcopyPS(name) +# endif +#endif + + +#ifndef InstallHardcopyDoc +#define InstallHardcopyDoc(name,deps) @@\ +all:: name.ps PdfTarget(name) @@\ + @@\ +name.ps: deps @@\ + @if [ -f name.PS.gz ]; then set -x; \ @@\ + RemoveFile(name.ps); \ @@\ + gzip -d < name.PS.gz > name.ps; \ @@\ + fi @@\ + LinkHardcopyPS(name) @@\ + @@\ +ConvertPsToPdf(name) @@\ + @@\ +clean:: @@\ + $(RM) name.ps PdfClean(name) @@\ + @@\ +InstallDoc(name,deps) +#endif + + XRENDERPRELOADPATTERN = libXrender.so.? + XFONTPRELOADPATTERN = libXfont*.so.? + diff --git a/nx-X11/config/cf/cross.def b/nx-X11/config/cf/cross.def new file mode 100644 index 000000000..ee3767c4f --- /dev/null +++ b/nx-X11/config/cf/cross.def @@ -0,0 +1,44 @@ +/* + * This file contains redefinitions of some symbols to enable + * cross compilation: e.g. paths for include files and paths to + * compiler images. It will have to be edited to reflect these + * given your local configuration. + */ +#if 0 +#undef i386Architecture +#define Arm32Architecture + +#undef OptimizedCDebugFlags +#define OptimizedCDebugFlags -O2 +#define ServerCDebugFlags -O2 +#undef StandardDefines +#define StandardDefines -Dlinux -D__arm__ -D_POSIX_SOURCE \ + -D_DEFAULT_SOURCE -D_GNU_SOURCE -DX_LOCALE +#undef CcCmd +#define StdIncDir /opt/Embedix/tools/arm-linux/include +#define PreIncDir +#undef PostIncDir +#define PostIncDir /opt/Embedix/tools/lib/gcc-lib/arm-linux/2.95.2/include +#define CcCmd /opt/Embedix/tools/bin/arm-linux-gcc +#undef CplusplusCmd +#define HasCplusplus YES +#define CplusplusCmd /opt/Embedix/tools/bin/arm-linux-g++ +#define DoRanlibCmd YES +#define RanlibCmd /opt/Embedix/tools/bin/arm-linux-ranlib +#undef ExtraLoadFlags +#define ExtraLoadFlags +#define FbNoPixelAddrCode +#undef TermcapLibrary +#define TermcapLibrary -ltermcap + +#undef LdPostLib +#define LdPostLib -L/opt/Embedix/tools/arm-linux/lib + +#undef ExtensionOSDefines +#define ExtensionOSDefines + +#define ServerXdmcpDefines /**/ + +#define HostCcCmd cc +#endif +#include <cross.rules> diff --git a/nx-X11/config/cf/cross.rules b/nx-X11/config/cf/cross.rules new file mode 100644 index 000000000..fe8d119ab --- /dev/null +++ b/nx-X11/config/cf/cross.rules @@ -0,0 +1,145 @@ +#ifndef HostCcCmd +#define HostCcCmd cc +#endif + +#define HostLinkRule(target,flags,objs,libs) HostCcCmd -I$(BUILDINCDIR) -o target flags objs libs + +/* ComplexHostProgramTarget - Compile a program such that we can run + * it on this host, i.e., don't use the default cross compiler. + */ +#ifndef ComplexHostProgramTarget +#define ComplexHostProgramTarget(program) @@\ + CC=HostCcCmd @@\ + STD_INCLUDES= @@\ + CFLAGS=$(TOP_INCLUDES) $(INCLUDES) $(BOOTSTRAPCFLAGS)\ @@\ + $(CROSSCOMPILEDEFINES) $(CROSSCOMPILEBOOTSTRAPDEFINES) @@\ +EXTRA_LOAD_FLAGS= @@\ + PROGRAM = program @@\ + @@\ +AllTarget(HostProgramTargetName(program)) @@\ + @@\ +HostProgramTargetName(program): $(OBJS) $(DEPLIBS) @@\ + RemoveTargetProgram($@) @@\ + HostLinkRule($@,$(_NOOP_),$(OBJS),$(DEPLIBS) $(LOCAL_LIBRARIES)) @@\ + @@\ +DependTarget() @@\ + @@\ +LintTarget() @@\ + @@\ +clean:: @@\ + RemoveFile(HostProgramTargetName(program)) +#endif /* ComplexHostProgramTarget */ + + +#ifndef SimpleHostProgramTarget +#define SimpleHostProgramTarget(program) @@\ + SRCS = program.c @@\ + @@\ + CC=HostCcCmd @@\ + STD_INCLUDES= @@\ + CFLAGS=$(TOP_INCLUDES) $(INCLUDES) $(BOOTSTRAPCFLAGS)\ @@\ + $(CROSSCOMPILEDEFINES) $(CROSSCOMPILEBOOTSTRAPDEFINES) @@\ +EXTRA_LOAD_FLAGS= @@\ + PROGRAM = program @@\ + @@\ +AllTarget(HostProgramTargetName(program)) @@\ + @@\ +HostProgramTargetName(program): program.o $(DEPLIBS) @@\ + RemoveTargetProgram($@) @@\ + HostLinkRule($@,$(_NOOP_),program.o,$(DEPLIBS) $(LOCAL_LIBRARIES)) @@\ + @@\ +DependTarget() @@\ + @@\ +LintTarget() @@\ + @@\ +clean:: @@\ + RemoveFile(HostProgramTargetName(program)) +#endif /* SimpleHostProgramTarget */ + +#ifndef SimpleHostProgramTarget_1 +#define SimpleHostProgramTarget_1(program) @@\ + SRCS = program.c @@\ + @@\ + CC=HostCcCmd @@\ + STD_INCLUDES= @@\ + CFLAGS=$(TOP_INCLUDES) $(INCLUDES) $(BOOTSTRAPCFLAGS)\ @@\ + $(CROSSCOMPILEDEFINES) $(CROSSCOMPILEBOOTSTRAPDEFINES) @@\ +EXTRA_LOAD_FLAGS= @@\ + PROGRAM = program @@\ + @@\ +AllTarget(HostProgramTargetName(program)) @@\ + @@\ +HostProgramTargetName(program): program.o $(DEPLIBS) @@\ + RemoveTargetProgram($@) @@\ + HostLinkRule($@,$(_NOOP_),program.o,$(DEPLIBS) $(LOCAL_LIBRARIES)) @@\ + @@\ +DependTarget() @@\ +LintTarget() @@\ + @@\ +clean:: @@\ + RemoveFile(HostProgramTargetName(program)) +#endif /* SimpleHostProgramTarget_1 */ + + +#ifndef SimpleHostProgramTarget_2 +#define SimpleHostProgramTarget_2(program) @@\ + SRCS = program.c @@\ + @@\ + CC=HostCcCmd @@\ + STD_INCLUDES= @@\ + CFLAGS=$(TOP_INCLUDES) $(INCLUDES) $(BOOTSTRAPCFLAGS)\ @@\ + $(CROSSCOMPILEDEFINES) $(CROSSCOMPILEBOOTSTRAPDEFINES) @@\ +EXTRA_LOAD_FLAGS= @@\ + PROGRAM = program @@\ + @@\ +AllTarget(HostProgramTargetName(program)) @@\ + @@\ +HostProgramTargetName(program): program.o $(DEPLIBS) @@\ + RemoveTargetProgram($@) @@\ + HostLinkRule($@,$(_NOOP_),program.o,$(DEPLIBS) $(LOCAL_LIBRARIES)) @@\ + @@\ +clean:: @@\ + RemoveFile(HostProgramTargetName(program)) +#endif /* SimpleHostProgramTarget_2 */ + +#ifndef SimpleHostProgramTarget_3 +#define SimpleHostProgramTarget_3(program) @@\ + SRCS = program.c @@\ + @@\ + CC=HostCcCmd @@\ + STD_INCLUDES= @@\ + CFLAGS=$(TOP_INCLUDES) $(INCLUDES) $(BOOTSTRAPCFLAGS)\ @@\ + $(CROSSCOMPILEDEFINES) $(CROSSCOMPILEBOOTSTRAPDEFINES) @@\ +EXTRA_LOAD_FLAGS= @@\ + PROGRAM = program @@\ + @@\ +AllTarget(HostProgramTargetName(program)) @@\ + @@\ +HostProgramTargetName(program): program.o $(DEPLIBS) @@\ + RemoveTargetProgram($@) @@\ + HostLinkRule($@,$(_NOOP_),program.o,$(DEPLIBS) $(LOCAL_LIBRARIES)) @@\ + @@\ +clean:: @@\ + RemoveFile(HostProgramTargetName(program)) +#endif /* SimpleHostProgramTarget_3 */ + +#ifndef SimpleHostProgramTarget_4 +#define SimpleHostProgramTarget_4(program) @@\ + SRCS = program.c @@\ + @@\ + CC=HostCcCmd @@\ + STD_INCLUDES= @@\ + CFLAGS=$(TOP_INCLUDES) $(INCLUDES) $(BOOTSTRAPCFLAGS)\ @@\ + $(CROSSCOMPILEDEFINES) $(CROSSCOMPILEBOOTSTRAPDEFINES) @@\ +EXTRA_LOAD_FLAGS= @@\ + PROGRAM = program @@\ + @@\ +AllTarget(HostProgramTargetName(program)) @@\ + @@\ +HostProgramTargetName(program): program.o $(DEPLIBS) @@\ + RemoveTargetProgram($@) @@\ + HostLinkRule($@,$(_NOOP_),program.o,$(DEPLIBS) $(LOCAL_LIBRARIES)) @@\ + @@\ +clean:: @@\ + RemoveFile(HostProgramTargetName(program)) +#endif /* SimpleHostProgramTarget_4 */ diff --git a/nx-X11/config/cf/gnu.cf b/nx-X11/config/cf/gnu.cf new file mode 100644 index 000000000..c7dd071fe --- /dev/null +++ b/nx-X11/config/cf/gnu.cf @@ -0,0 +1,183 @@ +#ifndef OSName +#define OSName DefaultOSName +#endif + +#ifndef OSVendor +#define OSVendor /**/ +#endif +#ifndef OSMajorVersion +#define OSMajorVersion DefaultOSMajorVersion +#endif +#ifndef OSMinorVersion +#define OSMinorVersion DefaultOSMinorVersion +#endif +#ifndef OSTeenyVersion +#define OSTeenyVersion DefaultOSTeenyVersion +#endif +XCOMM operating system: OSName (OSMajorVersion./**/OSMinorVersion./**/OSTeenyVersion) + +#define GNUSourceDefines -D_POSIX_C_SOURCE=199309L \ + -D_POSIX_SOURCE -D_XOPEN_SOURCE \ + -D_DEFAULT_SOURCE + +XCOMM XXXMB: What about _GNU_SOURCE, see Linux/UseInstalled? + +#define XawI18nDefines -DHAS_WCHAR_H -DHAS_WCTYPE_H -DNO_WIDEC_H + +#define HasPosixThreads YES +#define ThreadedX YES +#define HasThreadSafeAPI YES +#define ThreadsLibraries -lpthread +#define SystemMTDefines -D_REENTRANT + +#ifndef HasLibCrypt +#define HasLibCrypt YES +#endif + +#ifndef BuildXF86RushExt +# define BuildXF86RushExt YES +#endif + +#define BuildLibPathVar LD_LIBRARY_PATH +#define GccUsesGas YES +#define UseGas YES +#define GnuCpp YES +#define HasDlopen YES +#ifndef HasShadowPasswd +# define HasShadowPasswd YES +#endif +#define HasPutenv YES + +XCOMM Not implemented and will always fail. +#ifndef HasShm +# define HasShm YES +#endif + +#define HasBSD44Sockets YES +#define HasSockets YES +#define HasSnprintf YES +#define HasMkstemp YES +#define HasUsableFileMmap YES +#ifndef HasNCurses +#define HasNCurses YES +#endif + +#define AvoidNullMakeCommand YES +#ifndef DebuggableLibraries +#define DebuggableLibraries NO +#endif +#define CompressAllFonts YES +#define Malloc0ReturnsNull YES +#define NeedConstPrototypes YES +#define NeedFunctionPrototypes YES +#define NeedNestedPrototypes YES +#define NeedVarargsPrototypes YES +#ifndef NeedWidePrototypes +#define NeedWidePrototypes NO +#endif +#define SetTtyGroup YES + +#ifndef UseStaticTermcapLib +#define UseStaticTermcapLib NO +#endif + +#define MkdirHierCmd mkdir -p +#ifndef CcCmd +#define CcCmd gcc +#endif +#ifndef AsCmd +#define AsCmd as +#endif +#ifndef LdCmd +#define LdCmd ld +#endif + +#define AsmDefines -D__ELF__ +#define CplusplusCmd c++ +#ifndef TermcapLibrary +#if UseStaticTermcapLib +#define TermcapLibrary StaticLibrary(/usr/lib,ncurses) +#else +#define TermcapLibrary -lncurses +#endif +#endif +#ifndef DoLoadableServer +#define DoLoadableServer YES +#endif +#ifndef CppCmd +#define CppCmd /lib/cpp +#endif +#define YaccCmd bison -y +#define LexCmd flex -l +#define HasFlex YES +#define LexLib -lfl +#define PreProcessCmd CcCmd -E +#define PostIncDir DefaultGccIncludeDir +#define LdCombineFlags -r +#ifndef LdPostLib +#define LdPostLib /* Never needed */ +#endif +#define HasWChar32 YES +#define StandardCppOptions -traditional +#define StandardCppDefines StandardDefines + +#define HasVarRun YES +#define VarDbDirectory $(VARDIR)/lib + +XCOMM i386Architecture +#define OptimizedCDebugFlags DefaultGcc2i386Opt +#define GNUMachineDefines -D__i386__ +#define ServerOSDefines XFree86ServerOSDefines -DDDXTIME +#define ServerExtraDefines -DGCCUSESGAS XFree86ServerDefines +#define HasPlugin YES +#define VendorHasX11R6_3libXext YES + +#ifndef StandardDefines +#define StandardDefines GNUMachineDefines GNUSourceDefines +#endif + +#define DlLibrary -rdynamic -ldl + +#define ServerExtraSysLibs /**/ + +#define ConnectionFlags -DUNIXCONN -DTCPCONN + +/* Some of these man page defaults are overriden in the above OS sections */ +#ifndef ManSuffix +# define ManSuffix 1x +#endif +#ifndef ManDir +# define ManDir $(MANSOURCEPATH)1 +#endif +#ifndef LibManSuffix +# define LibManSuffix 3x +#endif +#ifndef LibmanDir +# define LibmanDir $(MANSOURCEPATH)3 +#endif +#ifndef FileManSuffix +# define FileManSuffix 5x +#endif +#ifndef FileManDir +# define FileManDir $(MANSOURCEPATH)5 +#endif + +#ifndef StaticLibrary +#define StaticLibrary(libpath,libname) -Wl,-Bstatic Concat(-L,libpath) Concat(-l,libname) -Wl,-Bdynamic +#endif + +#define HasGnuMake YES + +#define MakeNamedTargetSubdir(dir,flags,subname)\ + $(MAKE) -C dir $(MFLAGS) $(PARALLELMFLAGS) flags subname + +#define ArchitectureDefines -DGNU_ARCHITECTURE + +#define XserverNeedsSetUID NO + +#include <gnuLib.rules> + +XCOMM XXX Might need this if they are not careful with slashes. +XCOMM #define DirFailPrefix - + +#include <xorg.cf> diff --git a/nx-X11/config/cf/gnuLib.rules b/nx-X11/config/cf/gnuLib.rules new file mode 100644 index 000000000..7b057c1d0 --- /dev/null +++ b/nx-X11/config/cf/gnuLib.rules @@ -0,0 +1,171 @@ +/* + * GNU/Hurd shared library rules + * + */ + +/* + * GNU/Hurd shared library rules + * Cloned from Linux (ELF) shared library rules + * + */ + +#ifndef HasSharedLibraries +#define HasSharedLibraries YES +#endif +#ifndef ForceNormalLib +#define ForceNormalLib NO +#endif + +XCOMM XXX To rpath or not to rpath... +#ifndef UseRpath +#define UseRpath YES +#endif + +#undef SpecialMalloc +#define SpecialMalloc NO + +#define BaseShLibReqs -lc + +#ifndef SharedDataSeparation +#define SharedDataSeparation NO +#endif +#ifndef SharedCodeDef +#define SharedCodeDef /**/ +#endif +#ifndef SharedLibraryDef +#define SharedLibraryDef /**/ +#endif +#ifndef ShLibIncludeFile +#define ShLibIncludeFile <gnuLib.tmpl> +#endif +#ifndef RpathLoadFlags +#if UseRpath +#define RpathLoadFlags -Wl,-rpath=$(USRLIBDIRPATH) +#else +#define RpathLoadFlags /**/ +#endif +#endif +#ifndef LibraryRpathLoadFlags +#define LibraryRpathLoadFlags RpathLoadFlags +#endif +#ifndef SharedLibraryLoadFlags +#define SharedLibraryLoadFlags -shared LibraryRpathLoadFlags +#endif +#ifndef PositionIndependentCFlags +#define PositionIndependentCFlags -fPIC +#endif +#ifndef PositionIndependentCplusplusFlags +#define PositionIndependentCplusplusFlags -fPIC +#endif +#ifndef ExtraLoadFlags +#ifdef UseInstalled +XCOMM XXX Maybe superfluous. +#define ExtraLoadFlags RpathLoadFlags -Wl,-rpath-link=$(USRLIBDIRPATH) +#else +#define ExtraLoadFlags RpathLoadFlags -Wl,-rpath-link=$(BUILDLIBDIR) +#endif +#endif + +/* + * InstallSharedLibrary - generate rules to install the shared library. + * NOTE: file must be executable, hence "INSTBINFLAGS" + */ +#ifndef InstallSharedLibrary +#define InstallSharedLibrary(libname,rev,dest) @@\ +install:: Concat(lib,libname.so.rev) @@\ + MakeDir($(DESTDIR)dest) @@\ + $(INSTALL) $(INSTALLFLAGS) $(INSTBINFLAGS) Concat(lib,libname.so.rev) $(DESTDIR)dest @@\ + @T=`echo Concat($(DESTDIR)dest/lib,libname.so.rev) | sed 's/\(lib[^\.]*\.so\.[0-9]*\)\(\.[0-9]*\)\{1,2\}/\1/'`;\ + set -x; $(RM) $$T && $(LN) Concat(lib,libname.so.rev) $$T @@\ + @if $(SOSYMLINK); then (set -x; \ + $(RM) Concat($(DESTDIR)dest/lib,libname.so); \ @@\ + $(LN) Concat(lib,libname.so.rev) Concat($(DESTDIR)dest/lib,libname.so)); fi +#endif /* InstallSharedLibrary */ + +/* + * InstallSharedLibraryData - generate rules to install the shared library data + */ +#ifndef InstallSharedLibraryData +#define InstallSharedLibraryData(libname,rev,dest) +#endif /* InstallSharedLibraryData */ + + +/* + * SharedLibraryTarget - generate rules to create a shared library; + * build it into a different name so that we do not hose people by having + * the library gone for long periods. + */ +#ifndef SharedLibraryTarget +#define SharedLibraryTarget(libname,rev,solist,down,up) @@\ +AllTarget(Concat(lib,libname.so.rev)) @@\ + @@\ +Concat(lib,libname.so.rev): solist $(EXTRALIBRARYDEPS) @@\ + $(RM) $@~ @@\ + @SONAME=`echo $@ | sed 's/\(lib[^\.]*\.so\.[0-9]*\)\(\.[0-9]*\)\{1,2\}/\1/'`; set -x; \ @@\ + (cd down; $(CC) -o up/$@~ $(SHLIBLDFLAGS) -Wl,-soname,$$SONAME solist $(REQUIREDLIBS) BaseShLibReqs); \ @@\ + $(RM) $$SONAME; $(LN) $@ $$SONAME; \ @@\ + LinkBuildSonameLibrary($$SONAME) @@\ + $(RM) $@ @@\ + $(MV) $@~ $@ @@\ + @if $(SOSYMLINK); then (set -x; \ @@\ + $(RM) Concat(lib,libname.so); \ @@\ + $(LN) $@ Concat(lib,libname.so)); fi @@\ + LinkBuildLibrary($@) @@\ + LinkBuildLibraryMaybe(Concat(lib,libname.so),$(SOSYMLINK)) @@\ + @@\ +clean:: @@\ + @MAJREV=`echo rev | sed 's/\([0-9]*\)\(\.[0-9]*\)\{1,2\}/\1/'`; \ @@\ + set -x; $(RM) Concat(lib,libname.so.$$MAJREV) @@\ + $(RM) Concat(lib,libname.so.rev) Concat(lib,libname.so) + +#endif /* SharedLibraryTarget */ + +/* + * SharedDepLibraryTarget - generate rules to create a shared library. + */ +#ifndef SharedDepLibraryTarget +#define SharedDepLibraryTarget(libname,rev,deplist,solist,down,up) @@\ +AllTarget(Concat(lib,libname.so.rev)) @@\ + @@\ +Concat(lib,libname.so.rev): deplist $(EXTRALIBRARYDEPS) @@\ + $(RM) $@~ @@\ + @SONAME=`echo $@ | sed 's/\(lib[^\.]*\.so\.[0-9]*\)\(\.[0-9]*\)\{1,2\}/\1/'`; set -x; \ @@\ + (cd down; $(CC) -o up/$@~ $(SHLIBLDFLAGS) -Wl,-soname,$$SONAME solist $(REQUIREDLIBS) BaseShLibReqs); \ @@\ + $(RM) $$SONAME; $(LN) $@ $$SONAME; \ @@\ + LinkBuildSonameLibrary($$SONAME) @@\ + $(RM) $@ @@\ + $(MV) $@~ $@ @@\ + @if $(SOSYMLINK); then (set -x; \ @@\ + $(RM) Concat(lib,libname.so); \ @@\ + $(LN) $@ Concat(lib,libname.so)); fi @@\ + LinkBuildLibrary($@) @@\ + LinkBuildLibraryMaybe(Concat(lib,libname.so),$(SOSYMLINK)) @@\ + @@\ +clean:: @@\ + @MAJREV=`echo rev | sed 's/\([0-9]*\)\(\.[0-9]*\)\{1,2\}/\1/'`; \ @@\ + set -x; $(RM) Concat(lib,libname.so.$$MAJREV) @@\ + $(RM) Concat(lib,libname.so.rev) Concat(lib,libname.so) + +#endif /* SharedDepLibraryTarget */ + +#ifndef SharedDepModuleTarget +#define SharedDepModuleTarget(name,deps,solist) @@\ +AllTarget(name) @@\ + @@\ +name: deps @@\ + $(RM) $@~ @@\ + $(CC) -o $@~ $(SHLIBLDFLAGS) solist $(REQUIREDLIBS) BaseShLibReqs @@\ + $(RM) $@ @@\ + $(MV) $@~ $@ @@\ + @@\ +clean:: @@\ + $(RM) name + +#endif /* SharedDepModuleTarget */ + +/* + * SharedLibraryDataTarget - generate rules to create shlib data file; + */ +#ifndef SharedLibraryDataTarget +#define SharedLibraryDataTarget(libname,rev,salist) +#endif /* SharedLibraryTarget */ diff --git a/nx-X11/config/cf/gnuLib.tmpl b/nx-X11/config/cf/gnuLib.tmpl new file mode 100644 index 000000000..97917ba5a --- /dev/null +++ b/nx-X11/config/cf/gnuLib.tmpl @@ -0,0 +1,6 @@ +XCOMM +XCOMM GNU Hurd shared library template +XCOMM + +#define SharedX11Reqs +#define SharedXlibi18nReqs $(LDPRELIB) $(XONLYLIB) diff --git a/nx-X11/config/cf/host.def b/nx-X11/config/cf/host.def new file mode 100644 index 000000000..4a11359e2 --- /dev/null +++ b/nx-X11/config/cf/host.def @@ -0,0 +1,539 @@ +/**************************************************************************/ +/* */ +/* Copyright (c) 2001, 2011 NoMachine (http://www.nomachine.com) */ +/* Copyright (c) 2008-2014 Oleksandr Shneyder <o.shneyder@phoca-gmbh.de> */ +/* Copyright (c) 2011-2016 Mike Gabriel <mike.gabriel@das-netzwerkteam.de>*/ +/* Copyright (c) 2014-2016 Mihai Moldovan <ionic@ionic.de> */ +/* Copyright (c) 2014-2016 Ulrich Sibiller <uli42@gmx.de> */ +/* Copyright (c) 2015-2016 Qindel Group (http://www.qindel.com) */ +/* */ +/* nx-X11, NX protocol compression and NX extensions to this software */ +/* are copyright of the aforementioned persons and companies. */ +/* */ +/* Redistribution and use of the present software is allowed according */ +/* to terms specified in the file LICENSE which comes in the source */ +/* distribution. */ +/* */ +/* All rights reserved. */ +/* */ +/**************************************************************************/ + +/******************************************************************************/ +/* + * This file is to provide a quick method for most people to change the + * behaviour of their Xorg installation without having to fully + * understand the workings of site.def and all the various '.cf' files. + * + * In the vast majority of cases, it should not be necessary to use this + * file at all or change it in any way. + * + * This file is divided into two sections. The first contains settings + * that end-users might reasonably change. The second contains settings + * that developers might want to change. + * + * IMPORTANT NOTE: In all cases changing the defaults may cause problems + * and/or unexpected side-effects. If you don't understand what a setting + * does, then it's best to not change it. If you make changes and have + * problems, verify that those problems are also present when using an + * empty host.def file and unchanged version of this file before reporting + * them. + * + * A good way to use this file is to copy it to host.def, and make the + * changes there. That way, future patches to this file won't fail. + * The host.def file will never be patched. + * + * The distributed version of this file MUST contain no uncommented + * definitions. Default definitions belong in xorg.cf, or <vendor>.cf + * files. + */ +/******************************************************************************/ + +#if defined(SunArchitecture) +#define ProjectRoot /usr/openwin +#endif + +/* + * Enable use the Cygwin IPC libraries to get MIT-SHM support. + */ +#if defined(cygwinArchitecture) +#define UseCygIPC YES +#endif + +/* + * If you have build-specific modifications in your host.def file, but + * want an empty host.def file installed when doing 'make install', + * uncomment the following + * +#define InstallEmptyHostDef + */ + +/* + * Which servers to build. There is only Xorg server. + * It can be disabled by the following. + * +#define XorgServer NO + */ +#define XorgServer NO + +/* + * Building libraries with NX enhancements is disabled + * by default. You should enable this in your host.def. + * +#define NXLibraries YES + */ +#define NXLibraries YES + +/* + * Building the NX agent nested server is disabled + * by default. Enable this in your host.def. + * +#define NXAgentServer YES + */ +#define NXAgentServer YES + +#ifdef NXAgentServer +#define BuildRenderLibrary YES +#endif + +/* + * Define this symbol to build the NX enhanced MS Windows + * X server for Cygnus environment. + * +#define NXWinServer YES + */ +#if defined(cygwinArchitecture) +#define NXWinServer NO +#endif + +/* + * Set the default server (ie the one that gets the sym-link to "X") + * +#define ServerToInstall Xorg + */ + +/* + * Force build of X libraries if any nested server is to be built. + * +#define BuildLibraries YES + * + * If you just want libraries for NXAgentServer, this should be + * enough (never tested, although). + * +#define BuildLibrariesForXServers YES + */ +#if NXAgentServer +#define BuildLibraries YES +#endif + +#define BuildDocs NO + +#define BuildComposite YES + +/* + * Server configuration parameters. The defaults are shown here: + */ + +/* + * Select the XInput devices you want by uncommenting this. + * +#define XInputDrivers mouse keyboard acecad calcomp citron \ + digitaledge dmc dynapro elographics \ + microtouch mutouch penmount spaceorb summa \ + wacom void magictouch aiptek + */ + +/* + * To use the deprecated, old keyboard driver, uncomment this. But + * even better, make the new keyboard driver (hw/xfree86/input/keyboard) + * work for your architechture. The old driver will be removed in the + * next release. + * +#define UseDeprecatedKeyboardDriver YES + */ + +/* + * Include True Type Fonts to default font path. It is safe to do + * this by default as NX intaller carries only misc and TTF in the + * basic set of fonts installed under Windows. + * +#define DefaultFontPath $(FONTDIR)/misc/,$(FONTDIR)/Speedo/,$(FONTDIR)/Type1/,$(FONTDIR)/75dpi/,$(FONTDIR)/100dpi/ + */ + +#if defined(LinuxArchitecture) || defined(SunArchitecture) || defined(FreeBSDArchitecture) +#define DefaultFontPath $(FONTDIR)/misc/,$(FONTDIR)/Speedo/,$(FONTDIR)/Type1/,$(FONTDIR)/75dpi/,$(FONTDIR)/100dpi/,$(FONTDIR)/TTF/ +#endif /* #if defined(LinuxArchitecture) || defined(SunArchitecture) */ + +#if defined(cygwinArchitecture) +#define DefaultFontPath /mnt/NX/fonts/base/,/mnt/NX/fonts/misc/,/mnt/NX/fonts/Speedo/,/mnt/NX/fonts/Type1/,/mnt/NX/fonts/75dpi/,/mnt/NX/fonts/100dpi/,/mnt/NX/fonts/TTF/ +#endif /* #if defined(cygwinArchitecture) */ + +/* + * To build only the servers with a cut-down source tree, uncomment + * this. + * +#define BuildServersOnly YES + */ +#define BuildServersOnly YES + +/* + * Undefine the following if you don't want to have config files and + * app-defaults installed in a separate directory (i.e. /etc/X11). + * +#define UseSeparateConfDir NO + */ + +/* + * Unless you're a developer you shouldn't need to change anything + * beyond this point. + */ + +/* + * If you want to enable some developer settings, like more verbose + * compiler warnings, uncomment this. + * +#define XFree86Devel YES +*/ + +/* + * If using GCC 2.x on a system where it isn't the default, uncomment + * the following + * + */ +#if defined(SunArchitecture) +#define HasGcc2 YES +#define HasGcc YES +#endif + +/* + * The default optimisation flags for GCC 2.x. -fno-strength-reduce is + * here to work around a bug in -O2 for GCC 2.x on i386 platforms. + * If you are using a version that doesn't have this bug, you can + * uncomment the following line, and remove '-fno-strength-reduce' + * If you are building binaries for a 486, it may be beneficial to add + * -m486 + * +#define DefaultGcc2i386Opt -O2 -fno-strength-reduce + */ + +#if defined (LinuxArchitecture) +#define DefaultGcc2i386Opt -g -O3 +#endif + +/* + * Enable all the optimizations on AMD64. + */ + +#define DefaultGcc2AMD64Opt -g -O3 GccAliasingArgs + +/* + * This allows the GCC warning flags to be set. The default is shown here. + * +#define GccWarningOptions -Wall -Wpedantic -Wpointer-arith -Wstrict-prototypes \ + -Wmissing-prototypes -Wmissing-declarations \ + -Wredundant-decls -Wnested-externs + */ + +/* + * Sun Compiler stuff.. + * +#define HasSunC YES +#define HasSunCplusplus YES +#define CplusplusCompilerMajorVersion 5 +#define CplusplusCompilerMinorVersion 0 +#define CCompilerMajorVersion 5 +#define CCompilerMinorVersion 0 + */ + +/* + * Optimized Sun Compiler Build. + * +#define DefaultCDebugFlags -xO4 -xtarget=pentium_pro +#define OptimizedCDebugFlags -xO4 -xtarget=pentium_pro + */ + +/* + * Debuggable Sun Compiler Build. + * Note: This builds _EVERYTHING_ as debuggable + * +#define DefaultCDebugFlags -g -xs +#define OptimizedCDebugFlags -g -xs + */ + +/* + * For Linux, this should match the Binutils version you have. This example + * is for 2.6.0.7. See linux.cf for the default setting. + * + * This should automatically get set correctly by imake. + * +#define LinuxBinUtilsMajorVersion 26 + */ + +/* + * For Linux, these should match the libc version you have. This example + * is for libc.5.4.x. See linux.cf for the default setting. + * + * This should automatically get set correctly by imake. + * +#define LinuxCLibMajorVersion 5 +#define LinuxClibMinorVersion 4 + */ + +/* + * If you want to use the GNU malloc library, uncomment this + * +#define UseGnuMalloc YES + */ + +/* + * Set this to whatever is required to access the GNU malloc library. + * The default is '-lgmalloc' unless is specified in the OS's .cf file. + * +#define GnuMallocLibrary -L/usr/local/lib -lgmalloc + */ + +/* + * Some Linux releases don't have a libtermcap. In this case you may need + * to uncomment the following + * +#define TermcapLibrary -lncurses + */ + +/* + * Build XAA. This can be disabled with: + * +#define XF86XAA NO + */ + +/* + * Build vgahw. This can be disabled with: + * +#define XF86VgaHw NO + */ + +/* + * Build xf1bpp. This can be disabled with: + * +#define XF1Bpp NO + */ + +/* + * Build xf4bpp. This can be disabled with: + * +#define XF4Bpp NO + */ + + +/* + * BSD Console driver support (for FreeBSD and NetBSD). + * + * By default, support is included for pccons and pcvt for NetBSD, and + * pccons, syscons and pcvt for FreeBSD. + * + * To change the list of supported drivers, set the following parameter. + * Possible values are -DPCCONS_SUPPORT, -DSYSCONS_SUPPORT, -DPCVT_SUPPORT. + * The following example includes support for syscons and pcvt only. + * +#define XFree86ConsoleDefines -DSYSCONS_SUPPORT -DPCVT_SUPPORT + */ + +/* + * To disable building XInput support, uncomment this + * +#define BuildXInputExt NO + */ +#if defined(SunArchitecture) +#define BuildXInputExt YES +#endif + +/* + * Uncomment this for joystick support. + * + * Note: Joystick support is broken, so don't enable this. + * +#define JoystickSupport YES + */ + +/* + * To disable the ScreenSaver Extension, uncomment this line. + * +#define BuildScreenSaverExt NO + */ +#define BuildScreenSaverExt YES + +/* + * If you don't want to build Xinerama support, uncomment this. + * +#define BuildXinerama NO + */ +#define BuildXinerama YES + +/* + * If you don't want to build support for the GLX extension, uncomment this. + * +#define BuildGlxExt NO + */ +#define BuildGlxExt YES + +/* + * Taken from xorg.cf. + */ + +#if defined(SparcArchitecture) \ + || defined (Sparc64Architecture) \ + || defined(ia64Architecture) \ + || defined(s390xArchitecture) \ + || defined(AMD64Architecture) +#define GlxExtraDefines -D__GLX_ALIGN64 +#endif + +#define BuildXKB YES +#define BuildXKBlib YES + +/* + * If you want to build against libXfont2, rather than libXfont(1), uncomment this. + * +#define HasXfont2 YES + */ + +/* + * If you are running NetBSD 0.9C or later, and have the aperture driver + * installed, uncomment this. + * +#define HasNetBSDApertureDriver YES + */ + +/* + * If you are running SVR3 and have the mmap driver installed (for linear + * framebuffer access) uncomment this. + * +#define HasSVR3mmapDrv YES + */ + +/* + * If you are using an SVR3 (like ISC 4.x) which supports long file names, + * you can uncomment this to have manual pages installed under their + * full names + * +#define ExpandManNames YES + */ + +/* + * For a POSIXized build on Interactive uncomment this + * Could be used with gcc 'till Version 2.6.3 + * Should be used with gcc 2.7.2. + * +#define UsePosix YES + */ + +/* + * If you don't want XDMAUTH support (if you don't have Wraphelp.c), + * comment this out. + * + */ +#if defined(LinuxArchitecture) +#define HasXdmAuth YES +#endif /* #if defined(LinuxArchitecture) */ + +/* + * To build static and shared libraries with debugging information, uncomment + * this. Assumes you have Gcc2. + * (If you don't have Gcc2, you can use the DebugLib{X11,...} variables + * to build debugging versions of the libraries separately.) + * +#define DebuggableLibraries YES +*/ +#if defined(LinuxArchitecture) +#define DebuggableLibraries YES +#endif /* #if defined(LinuxArchitecture) */ +/* + * To forceably build static libraries in addition to shared libraries, + * uncomment this. + * +#define ForceNormalLib YES + */ + +/* + * Uncomment this if your default tools (eg, gcc, ld, as, etc) are + * not the Linux ELF versions. + * +#define LinuxElfDefault NO + */ + +/* + * To use ELF format shared libraries for supported OSs, uncomment this. + * + * For Linux the default setting of this is the same as the setting of + * LinuxElfDefault. + * + * For FreeBSD this should automatically be set correctly by imake. Only + * change it here if you need to override the automatic setting. + * +#define UseElfFormat YES + */ + +/* + * For FreeBSD/ELF (FreeBSD 3.0) it is possible to also build and install + * a.out compatibility libraries. To enable that, uncomment this. + * +#define BuildAoutLibraries YES + */ + +/* + * If you have trouble with make bombing out in Xlib, try uncommenting this. + * You will not get dependencies as a result, but better than nothing. + * +#define MakeHashTableBug YES + */ + +/* + * If you do not want your man pages compress under SVR3 systems that + * support it, uncomment this. + * +#define CompressManPages NO + */ + +/* + * If you have sgmlfmt (the XFree86 doctools package) and want to build + * formatted docs from the SGML source, uncomment this. + * +#define HasSgmlFmt YES + */ + +/* + * To disable building some document formats, uncomment some of these. + * +#define BuildLinuxDocText NO +#define BuildLinuxDocHtml NO +#define BuildLinuxDocPS NO + */ + +/* + * To install Japanese versions of the documentation uncomment this. + * Note: The Japanese documentation consists of a subset of the + * XFree86 3.1 docs. + * +#define InstallJapaneseDocs YES + */ + +/* + * To build/install X specs docs, uncomment the following. + * The SpecsDocDirs setting here is recommended because it covers + * the docs that XFree86 has changed or added. + * +#define BuildSpecsDocs YES +#define SpecsDocDirs CTEXT GL ICCCM X11 Xext Xmu Xv XvMC i18n + */ + +/* + * To build all specs docs, not just those listed in SpecsDocDirs, uncomment + * the following. + * +#define BuildAllSpecsDocs YES + */ + +/* + * If your system doesn't support vm86() mode and you have + * libx86emu set library path here + * +#define X86EMU_LIBPATH /usr/local/lib + */ diff --git a/nx-X11/config/cf/linux.cf b/nx-X11/config/cf/linux.cf new file mode 100644 index 000000000..cd34555e6 --- /dev/null +++ b/nx-X11/config/cf/linux.cf @@ -0,0 +1,900 @@ +#ifndef LinuxElfDefault +# define LinuxElfDefault YES +#endif + +#ifndef UseElfFormat +# define UseElfFormat LinuxElfDefault +#endif + +#ifndef OSBinaryType +# if UseElfFormat +# define OSBinaryType [ELF] +# else +# ifdef AlphaArchitecture +# define OSBinaryType [ECOFF] +# else +# define OSBinaryType [a.out] +# endif +# endif +#endif + +#ifndef OSName +# define OSName DefaultOSName OSBinaryType +#endif + +#ifndef OSVendor +# define OSVendor /**/ +#endif +#ifndef OSMajorVersion +# define OSMajorVersion DefaultOSMajorVersion +#endif +#ifndef OSMinorVersion +# define OSMinorVersion DefaultOSMinorVersion +#endif +#ifndef OSTeenyVersion +# define OSTeenyVersion DefaultOSTeenyVersion +#endif + +#ifndef LinuxDistribution +# define LinuxDistribution DefaultLinuxDistribution +/* + Add "#define LinuxDistribution Linux<mumble>" to your site.def or host.def. + Currently only LinuxSuSE, LinuxRedHat and LinuxDebian will be figured out + automatically. + Valid values are (from the list at www.linux.org in Oct. '97): + LinuxUnknown (0) + LinuxSuSE (1) + LinuxCaldera (2) + LinuxCraftworks (3) + LinuxDebian (4) + LinuxInfoMagic (5) + LinuxKheops (6) + LinuxPro (7) + LinuxRedHat (8) + LinuxSlackware (9) + LinuxTurbo (10) + LinuxWare (11) + LinuxYggdrasil (12) +*/ +#endif +#ifndef LinuxDistName +# define LinuxDistName DefaultLinuxDistName +#endif +#ifndef LinuxCLibMajorVersion +# define LinuxCLibMajorVersion DefaultLinuxCLibMajorVersion +#endif +#ifndef LinuxCLibMinorVersion +# define LinuxCLibMinorVersion DefaultLinuxCLibMinorVersion +#endif +#ifndef LinuxCLibTeenyVersion +# define LinuxCLibTeenyVersion DefaultLinuxCLibTeenyVersion +#endif + +#ifndef HasGhostScript +# define HasGhostScript YES +#endif +#ifndef BuildPDFdocs +# define BuildPDFdocs NO +#endif + +#ifndef LinuxBinUtilsMajorVersion +# define LinuxBinUtilsMajorVersion DefaultLinuxBinUtilsMajorVersion +#endif + +XCOMM operating system: OSName (OSMajorVersion./**/OSMinorVersion./**/OSTeenyVersion) +XCOMM libc: (LinuxCLibMajorVersion./**/LinuxCLibMinorVersion./**/LinuxCLibTeenyVersion) +XCOMM binutils: (LinuxBinUtilsMajorVersion) + +#if LinuxDistribution == LinuxDebian +# if !defined(NothingOutsideProjectRoot) || !NothingOutsideProjectRoot +# define SystemManDirectory /usr/share/man +# endif +# define HasPam YES +/* un-comment this when it is un-broken */ +/* # define JoystickSupport YES */ +# if !defined(NothingOutsideProjectRoot) || !NothingOutsideProjectRoot +# define XAppLoadDir EtcX11Directory/app-defaults +# define XFileSearchPathDefault Concat4(EtcX11Directory/%L/%T/%N%C,%S:EtcX11Directory/%l/%T/%N%C,%S:EtcX11Directory/%T/%N%C,%S:EtcX11Directory/%L/%T/%N%S:EtcX11Directory/%l/%T/%N%S:EtcX11Directory/%T/%N%S):Concat4($(LIBDIR)/%L/%T/%N%C,%S:$(LIBDIR)/%l/%T/%N%C,%S:$(LIBDIR)/%T/%N%C,%S:$(LIBDIR)/%L/%T/%N%S:$(LIBDIR)/%l/%T/%N%S:$(LIBDIR)/%T/%N%S) +/* the relative symlink created by this rule causes problems for us */ +# endif /* !defined(NothingOutsideProjectRoot) || !NothingOutsideProjectRoot */ +# define SharedLibXdmGreet NO +# define FSUseSyslog YES + +# define DriverManSuffix 4x +# define DriverManDir $(MANSOURCEPATH)4 + +# define MiscManSuffix 7x +# define MiscManDir $(MANSOURCEPATH)7 + +/* + * + * +# define DebianMaintainer YES + * + * + */ + +# ifdef DebianMaintainer +# ifndef XorgCustomVersion +# define XorgCustomVersion "Debian" +# endif +# ifndef BuilderEMailAddr +# define BuilderEMailAddr "debian-x@lists.debian.org" +# endif +# define XFree86Devel YES +# define BuildAllSpecsDocs YES +# define DebuggableLibraries YES +# define ForceNormalLib YES +# define BuildSpecsDocs YES +# define SpecsDocDirs CTEXT GL ICCCM X11 Xext Xv i18n xterm +# define BuildHtmlManPages NO + +/* m68k has no 2.4 kernel yet */ +# ifndef Mc68020Architecture +# define HasLinuxInput YES +# endif +# define HasXdmAuth YES +# define HasLatex YES +/* extended instruction set support */ +# ifdef i386Architecture +# define HasX86Support YES +# define HasMMXSupport YES +# define Has3DNowSupport YES +/* 2.4 is not yet the official (or predominant) kernel in unstable */ +# define HasSSESupport NO +# endif /* i386Architecture */ +# endif /* DebianMaintainer */ +#endif /* LinuxDebian */ + +#if LinuxDistribution == LinuxRedHat +#define FSUseSyslog YES +#endif + +#ifndef HasDevRandom +# define HasDevRandom YES +# ifndef RandomDeviceName +# define RandomDeviceName /dev/urandom +# endif +#endif + +/* + * The Linux BinUtils major version. 25 => 2.5.x, which is what is included + * with Slackware 3.0 + * + * This remains for compatibility only. + * + */ +#ifndef BinUtilsMajorVersion +# define BinUtilsMajorVersion LinuxBinUtilsMajorVersion +#endif + +#if (LinuxCLibMajorVersion >= 6 || LinuxDistribution == LinuxSuSE) +# define LinuxLocaleDefines /**/ +#else +# define LinuxLocaleDefines -DX_LOCALE +#endif + +#ifndef LinuxAdditionalIncludes +# define LinuxAdditionalIncludes /**/ +#endif + +#ifndef LinuxGnuSourceDefines +# ifdef UseInstalled +# define LinuxGnuSourceDefines /**/ +# else +# define LinuxGnuSourceDefines -D_GNU_SOURCE +# endif +#endif + +#if LinuxCLibMajorVersion >= 6 +# define LinuxSourceDefines -D_POSIX_C_SOURCE=199309L \ + -D_POSIX_SOURCE -D_XOPEN_SOURCE \ + -D_DEFAULT_SOURCE \ + -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 \ + LinuxAdditionalIncludes LinuxGnuSourceDefines \ + LinuxLocaleDefines +# define HasPosixThreads YES +# define ThreadedX YES +# define HasThreadSafeAPI YES +# define ThreadsLibraries -lpthread +# define SystemMTDefines -D_REENTRANT +# ifndef HasLibCrypt +# define HasLibCrypt YES +# endif +/* netscape wraps select but not poll as of communicator 4.72 */ +# ifndef HasPoll +# define HasPoll NO +# endif +#else +# define LinuxSourceDefines -D_POSIX_SOURCE -D_POSIX_C_SOURCE=2 \ + -D_BSD_SOURCE -D_SVID_SOURCE \ + LinuxGnuSourceDefines LinuxLocaleDefines +# ifndef HasLibCrypt +# define HasLibCrypt NO +# endif +# ifndef HasBasename +# define HasBasename NO +# endif + /* Proliferation of C99isms makes -ansi unpalatable... */ +# if !defined(DefaultCCOptions) && !defined(UseInstalled) && HasGcc +# define DefaultCCOptions GccWarningOptions +# endif +#endif + +/* + * XXX Check which versions of Linux really have IPv6. glibc 2.0 on + * Red Hat 5.2 doesn't. + */ +#if LinuxCLibMajorVersion < 6 || \ + (LinuxCLibMajorVersion == 6 && LinuxCLibMinorVersion == 0) +#define BuildIPv6 NO +#endif + +/* <linux/input.h> support mainly for USB support */ +#ifndef HasLinuxInput +# if defined(__linux__) && (OSMajorVersion > 2 || (OSMajorVersion == 2 && OSMinorVersion >= 4)) +# define HasLinuxInput YES +# else +# define HasLinuxInput NO +# endif +#endif + +#ifndef JoystickSupport +# define JoystickSupport NO /* joystick driver is broken */ +#endif + +/* <linux/joystick.h> appeared in 2.1.45 (officially) */ +#ifndef HasLinuxSupport +# if defined(__linux__) && (JoystickSupport || \ + (OSMajorVersion > 2) || \ + ((OSMajorVersion == 2) && (OSMinorVersion > 1)) || \ + ((OSMajorVersion == 2) && (OSMinorVersion == 1) && (OSTeenyVersion >= 45))) +# define HasLinuxJoystick YES +# else +# define HasLinuxJoystick NO +# endif +#endif + +/* Libtool on linux always uses minor numbers */ +#define LibtoolMinorVersions YES + +/* On x86, determine whether to build with MTRR support */ +#ifndef HasMTRRSupport +# if defined (i386Architecture) || defined (AMD64Architecture) +# if OSMajorVersion > 2 || (OSMajorVersion == 2 && OSMinorVersion > 1) || \ + (OSMajorVersion == 2 && OSMinorVersion == 1 && OSTeenyVersion >= 99) +# define HasMTRRSupport YES +# else +# define HasMTRRSupport NO +# endif +# else +# define HasMTRRSupport NO /* no for non-ix86 */ +# endif +#endif + +#ifndef XF86INT10_BUILD +# if defined(__linux__) && defined(i386Architecture) +# define XF86INT10_BUILD X86VM +# elif defined(__linux__) && defined(AMD64Architecture) +# define XF86INT10_BUILD X86EMU_OS +# else +# define XF86INT10_BUILD X86EMU_GENERIC +# endif +#endif + +/* + * Let the OS restore console fonts instead of the generic VGA + * layer. This exists for Linux only at the moment so put it + * here. + */ +#ifndef DoOSFontRestore +# define DoOSFontRestore YES +#endif + +/* Should we check the OS version to determine if the kernel supports it? */ +#if DoOSFontRestore +# ifndef FontRestoreCheckOsVersion +# define FontRestoreCheckOsVersion YES +# endif +#endif + +#ifndef HasAgpGart +# if defined(i386Architecture) || defined(ia64Architecture) || defined(AMD64Architecture) + /* The AGPGART header file is included in os-support/linux, which + allows all drivers that depend on AGP to build properly. */ +# define HasAgpGart YES +# else +# define HasAgpGart NO +# endif +#endif + +/* + * Support for Intel's SSE Native Instructions, also known as the + * Streaming SIMD Extensions, was introduced in the 2.4.x kernels. + */ +#ifndef HasSSESupport +# if defined(i386Architecture) +# if OSMajorVersion > 2 || (OSMajorVersion == 2 && OSMinorVersion >= 4) +# define HasSSESupport YES +# else +# define HasSSESupport NO +# endif +# else +# define HasSSESupport NO +# endif +#endif + +/* + * Support for MMX isn't present in the Assembler used in Red Hat 4.2, so + * don't enable it for libc5 as a reasonable default. + */ +#ifndef HasMMXSupport +# if defined(i386Architecture) +# if (LinuxCLibMajorVersion > 5) +# define HasMMXSupport YES +# else +# define HasMMXSupport NO +# endif +# else +# define HasMMXSupport NO +# endif +#endif + +/* + * Support for 3DNow isn't present in the Assembler used in Red Hat 4.2, so + * don't enable it for libc5 as a reasonable default. + * + * XXX This is preliminary. + */ +#ifndef Has3DNowSupport +# if defined(i386Architecture) +# if (LinuxCLibMajorVersion > 5) +# define Has3DNowSupport YES +# else +# define Has3DNowSupport NO +# endif +# else +# define Has3DNowSupport NO +# endif +#endif + +#if defined(__linux__) && !defined(LinuxFBDevSupport) +# define LinuxFBDevSupport YES +#endif + +/* For compatibility */ +#define SourceDefines LinuxSourceDefines + +#define BuildLibPathVar LD_LIBRARY_PATH +#define GccUsesGas YES +#define UseGas YES +#define GnuCpp YES +#if UseElfFormat +# ifndef HasDlopen +# define HasDlopen YES +# endif +#endif +#define HasWeakSymbols UseElfFormat +#ifndef HasShadowPasswd +# if UseElfFormat +# define HasShadowPasswd YES +# else +# define HasShadowPasswd NO +# endif +#endif +#define HasPutenv YES +#ifndef HasShm +# define HasShm YES +#endif + +/* Use SecureRPC (used for SUN-DES-1 auth. and other goodies) when + * glibc has support for it */ +#ifndef HasSecureRPC +# if !(LinuxCLibMajorVersion < 6 || \ + (LinuxCLibMajorVersion == 6 && LinuxCLibMinorVersion < 3)) +# define HasSecureRPC YES +# endif +#endif + +#define HasSockets YES +#if UseElfFormat || defined(AlphaArchitecture) +#ifndef HasSnprintf +#define HasSnprintf YES +#endif +#ifndef HasReallocarray +#define HasReallocarray NO +#endif +#define HasMkstemp YES +#endif +/* getresuid() appeared in 2.1.4, and getresgid in 2.1.44 */ +#if !defined(HasGetresuid) && \ + (((OSMajorVersion*100000) + (OSMinorVersion*1000) + OSTeenyVersion) >= 201044) +#define HasGetresuid YES +#endif +#if OSMajorVersion >= 2 +#define HasUsableFileMmap YES +#endif +#ifndef HasNCurses +#define HasNCurses YES +#endif + +#ifndef HasGroff +#define HasGroff YES +#endif + +#define AvoidNullMakeCommand YES +#ifndef DebuggableLibraries +#define DebuggableLibraries NO +#endif +#define CompressAllFonts YES +#define Malloc0ReturnsNull YES +#define NeedConstPrototypes YES +#define NeedFunctionPrototypes YES +#define NeedNestedPrototypes YES +#define NeedVarargsPrototypes YES +#ifndef NeedWidePrototypes +#define NeedWidePrototypes NO +#endif +#define SetTtyGroup YES + +#ifndef UseStaticTermcapLib +#define UseStaticTermcapLib NO +#endif + +#ifndef HasCookieMaker +#define HasCookieMaker YES +#define MkCookieCmd mcookie +#endif + +#ifndef BourneShell +/* + * This will cause builds/installs to terminate on errors, as on other + * platforms. + */ +#define BourneShell /bin/sh -e +#endif + +#define MkdirHierCmd mkdir -p + +#ifndef HaveLib64 +# if defined (AMD64Architecture) || defined (s390xArchitecture) || defined (Ppc64Architecture) +# define HaveLib64 YES +# else +# define HaveLib64 NO +# endif +#endif + +#if LinuxElfDefault +# if UseElfFormat +# ifdef MipsArchitecture +# ifndef AsCmd +# define AsCmd gcc -c -x assembler-with-cpp +# endif +# endif /* MipsArchitecure */ +# if defined (i386Architecture) && ((GccMajorVersion >3) \ + || ((GccMajorVersion == 3) && (GccMinorVersion >= 1))) +# ifndef CcCmd +# define CcCmd gcc -m32 +# endif +# ifndef CplusplusCmd +# define CplusplusCmd c++ -m32 +# endif +# endif +# if defined (Ppc64Architecture) +# ifndef CcCmd +# define CcCmd gcc -m64 +# endif +# ifndef CplusplusCmd +# define CplusplusCmd c++ -m64 +# endif +# endif +# ifndef CcCmd +# define CcCmd gcc +# define CplusplusCmd c++ +# endif +# ifndef AsCmd +# define AsCmd CcCmd -c -x assembler +# endif +# define AsmDefines -D__ELF__ +# ifndef LdCmd +# define LdCmd CcCmd -nostdlib +# endif +# ifndef LinuxUsesNcurses +# if LinuxCLibMajorVersion >= 6 || (LinuxDistribution == LinuxSuSE) +# define LinuxUsesNcurses YES +# else +# define LinuxUsesNcurses NO +# endif +# endif +# ifndef TermcapLibrary +# if UseStaticTermcapLib +# if LinuxUsesNcurses +# if !HaveLib64 +# define TermcapLibrary StaticLibrary(/usr/lib,ncurses) +# else +# define TermcapLibrary StaticLibrary(/usr/lib64,ncurses) +# endif +# else +# if !HaveLib64 +# define TermcapLibrary StaticLibrary(/usr/lib/termcap,termcap) +# else +# define TermcapLibrary StaticLibrary(/usr/lib64/termcap,termcap) +# endif +# endif +# else +# if LinuxUsesNcurses +# define TermcapLibrary -lncurses +# else +# define TermcapLibrary -ltermcap +# endif +# endif +# endif +# else /* UseElfFormat */ +# ifdef AlphaArchitecture +# define CcCmd gcc -b alpha-linuxecoff +# define CplusplusCmd g++ -b alpha-linuxecoff +# define AsCmd CcCmd -c -x assembler +# define LdCmd CcCmd -nostdlib -Wl,"-m alpha" +# define AsmDefines -DUSE_GAS -U__ELF__ +# endif /* AlphaArchitecture */ +# ifdef i386Architecture +# define CcCmd gcc -b i486-linuxaout +# define CplusplusCmd g++ -b i486-linuxaout +# define AsCmd CcCmd -c -x assembler +# define LdCmd CcCmd -nostdlib -Wl,"-m i386linux" +# define AsmDefines -DUSE_GAS -U__ELF__ +# endif /* i386Architecture */ +# ifdef ia64Architecture +# define CcCmd gcc +# define CplusplusCmd g++ +# define AsCmd CcCmd -c -x assembler +# define LdCmd CcCmd -nostdlib +# define AsmDefines -DUSE_GAS -U__ELF__ +# endif /* ia64Architecture */ +# ifdef Mc68020Architecture +# define CcCmd gcc -b m68k-linuxaout +# define CplusplusCmd g++ -b m68k-linuxaout +# define AsCmd CcCmd -c -x assembler +# define LdCmd CcCmd -nostdlib -Wl,"-m m68klinux" +# define AsmDefines -DUSE_GAS -U__ELF__ +# endif /* Mc68020Architecture */ +# ifdef AMD64Architecture +# define CcCmd gcc +# define CplusplusCmd g++ +# define AsCmd CcCmd -c -x assembler +# define LdCmd CcCmd -nostdlib +# define AsmDefines -DUSE_GAS -U__ELF__ +# endif /* AMD64Architecture */ +# endif /* UseElfFormat */ +#else +# if UseElfFormat +# ifdef AlphaArchitecture +# define CcCmd gcc -b alpha-linux +# define AsCmd CcCmd -c -x assembler +# define LdCmd CcCmd -nostdlib -Wl,"-m elf64alpha" +# define AsmDefines -D__ELF__ +# define CplusplusCmd c++ -b alpha-linux +# endif /* AlphaArchitecture */ +# ifdef i386Architecture +# define CcCmd gcc -b i486-linux +# define AsCmd CcCmd -c -x assembler +# define LdCmd CcCmd -nosdlib -Wl,"-m elf_i386" +# define AsmDefines -D__ELF__ +# define CplusplusCmd c++ -b i486-linux +# endif /* i386Architecture */ +# ifdef ia64Architecture +# define CcCmd gcc +# define CplusplusCmd g++ +# define AsCmd CcCmd -c -x assembler +# define LdCmd CcCmd -nostdlib +# define AsmDefines -D__ELF__ +# endif /* ia64Architecture */ +# ifdef Mc68020Architecture +# define CcCmd gcc -b m68k-linux +# define AsCmd CcCmd -c -x assembler +# define LdCmd CcCmd -nostdlib -W,l"-m m68kelf" +# define AsmDefines -D__ELF__ +# define CplusplusCmd c++ -b m68k-linux +# endif /* Mc68020Architecture */ +# ifdef AMD64Architecture +# define CcCmd gcc +# define CplusplusCmd g++ +# define AsCmd CcCmd -c -x assembler +# define LdCmd CcCmd -nostdlib +# define AsmDefines -D__ELF__ +# endif /* AMD64Architecture */ +# else +# define CcCmd gcc +# define AsCmd CcCmd -c -x assembler +# define LdCmd CcCmd -nostdlib +# define AsmDefines -DUSE_GAS +# endif +#endif + +/* + * Some older distros still need /lib/cpp. There's probably a better + * test, but this handles the older Red Hat releases at least. + */ +#ifndef CppCmd +# if (LinuxDistribution == LinuxRedHat) && \ + ((LinuxCLibMajorVersion < 6) || \ + (LinuxCLibMajorVersion == 6 && LinuxCLibMinorVersion < 1)) +# define CppCmd /lib/cpp +# else +# define CppCmd cpp +# endif +#endif + +/* Some Linux distributions have yacc, some don't. All have bison. */ +#define YaccCmd bison -y +#define LexCmd flex -l +#define HasFlex YES +#define LexLib -lfl +#define PreProcessCmd CcCmd -E +#define PostIncDir DefaultGccIncludeDir +#define LdCombineFlags -r +#ifndef LdPostLib +# define LdPostLib /* Never needed */ +#endif +#define HasWChar32 YES +#define StandardCppOptions -traditional +#define StandardCppDefines StandardDefines + +#define HasVarRun YES +#ifndef VarDbDirectory +# define VarDbDirectory $(VARDIR)/lib +#endif + +#ifndef OSXInputDrivers +# if HasLinuxJoystick +# define OSXInputDrivers1 ur98 +# else +# define OSXInputDrivers1 /**/ +# endif +# if HasLinuxInput +# define OSXInputDrivers2 aiptek evdev +# else +# define OSXInputDrivers2 /**/ +# endif +# define OSXInputDrivers OSXInputDrivers1 OSXInputDrivers2 +#endif + +#if UseElfFormat +# define HasPlugin YES +# define VendorHasX11R6_3libXext YES /* XC or XFree86 >= 3.3.1 */ +#endif + +#ifdef AlphaArchitecture +# ifndef OptimizedCDebugFlags +# define OptimizedCDebugFlags DefaultGcc2AxpOpt +# endif +# define LinuxMachineDefines -D__alpha__ +# define ServerOSDefines XFree86ServerOSDefines -DDDXTIME +# define ServerExtraDefines -DGCCUSESGAS XFree86ServerDefines -D_XSERVER64 -DJENSEN_SUPPORT +# ifdef UseCompaqMathLibrary +# define MathLibrary -lcpml -lm +# endif +#endif /* AlphaArchitecture */ + +#ifdef Arm32Architecture +# define DefaultCCOptions +# ifndef OptimizedCDebugFlags +# define OptimizedCDebugFlags -O3 +# endif +# define LinuxMachineDefines -D__arm__ -D__arm32__ -U__arm -Uarm +# define ServerOSDefines XFree86ServerOSDefines -DDDXTIME +# define ServerExtraDefines -DGCCUSESGAS XFree86ServerDefines +#endif /* Arm32Achitecture */ + +#ifdef Arm64Architecture +# define DefaultCCOptions +# ifndef OptimizedCDebugFlags +# define OptimizedCDebugFlags -O3 +# endif +# define LinuxMachineDefines -D__aarch64__ -U__arm -Uarm +# define ServerOSDefines XFree86ServerOSDefines -DDDXTIME +# define ServerExtraDefines -DGCCUSESGAS XFree86ServerDefines -D_XSERVER64 +#endif /* Arm64Achitecture */ + +#ifdef i386Architecture +# ifndef OptimizedCDebugFlags +# define OptimizedCDebugFlags DefaultGcc2i386Opt +# endif +# define LinuxMachineDefines -D__i386__ +# define ServerOSDefines XFree86ServerOSDefines -DDDXTIME +# define ServerExtraDefines -DGCCUSESGAS XFree86ServerDefines +#endif /* i386Architecture */ + +#ifdef ia64Architecture +# ifndef OptimizedCDebugFlags +# define OptimizedCDebugFlags -O2 GccAliasingArgs +# endif +# define LinuxMachineDefines -D__ia64__ +# define ServerOSDefines XFree86ServerOSDefines -DDDXTIME +# define ServerExtraDefines -DGCCUSESGAS XFree86ServerDefines -D_XSERVER64 +#endif /* ia64Architecture */ + +#ifdef Mc68020Architecture +# ifndef OptimizedCDebugFlags +# define OptimizedCDebugFlags -O2 GccAliasingArgs +# endif +# define LinuxMachineDefines -D__mc68000__ +# define ServerOSDefines XFree86ServerOSDefines -DDDXTIME +# define ServerExtraDefines -DGCCUSESGAS XFree86ServerDefines +#endif /* Mc68020Architecture */ + +#ifdef MipsArchitecture +# ifndef OptimizedCDebugFlags +# define OptimizedCDebugFlags DefaultGcc2MipsOpt +# endif +# define LinuxMachineDefines -D__mips__ +# define ServerOSDefines XFree86ServerOSDefines -DDDXTIME +# define ServerExtraDefines -DGCCUSESGAS XFree86ServerDefines +#endif + +#ifdef Ppc64Architecture +# define DefaultCCOptions -mminimal-toc +# ifndef OptimizedCDebugFlags +# define OptimizedCDebugFlags DefaultGcc2Ppc64Opt +# endif +# define LinuxMachineDefines -D__powerpc64__ -D__powerpc__ +# define ServerOSDefines XFree86ServerOSDefines -DDDXTIME -DPART_NET +# define ServerExtraDefines -DGCCUSESGAS XFree86ServerDefines -D_XSERVER64 +#endif /* Ppc64Architecture */ + +#ifdef PpcArchitecture +# define DefaultCCOptions +# ifndef OptimizedCDebugFlags +# define OptimizedCDebugFlags DefaultGcc2PpcOpt +# endif +# define LinuxMachineDefines -D__powerpc__ +# define ServerOSDefines XFree86ServerOSDefines -DDDXTIME +# define ServerExtraDefines -DGCCUSESGAS XFree86ServerDefines +#endif /* PpcArchitecture */ + +#ifdef s390Architecture +# ifndef OptimizedCDebugFlags +# define OptimizedCDebugFlags -O2 -fomit-frame-pointer GccAliasingArgs +# endif +# define LinuxMachineDefines -D__s390__ +# define ServerOSDefines XFree86ServerOSDefines -DDDXTIME +# define ServerExtraDefines -DGCCUSESGAS XFree86ServerDefines +#endif /* s390Architecture */ + +#ifdef s390xArchitecture +/*#define DefaultCCOptions -fsigned-char */ +#define OptimizedCDebugFlags -O3 -fomit-frame-pointer +#define LinuxMachineDefines -D__s390x__ +#define ServerOSDefines XFree86ServerOSDefines -DDDXTIME +#define ServerExtraDefines -DGCCUSESGAS XFree86ServerDefines -D_XSERVER64 +#endif /* s390xArchitecture */ + +#ifdef SparcArchitecture +# ifndef OptimizedCDebugFlags +# define OptimizedCDebugFlags -O2 GccAliasingArgs +# endif +# define LinuxMachineDefines -D__sparc__ +# define ServerOSDefines XFree86ServerOSDefines -DDDXTIME +# define AsVISOption -Av9a +# ifdef Sparc64Architecture +# define AsOutputArchSize 64 +# define ServerExtraDefines -DGCCUSESGAS XFree86ServerDefines -D_XSERVER64 +# else +# define AsOutputArchSize 32 +# define ServerExtraDefines -DGCCUSESGAS XFree86ServerDefines +# endif +#endif + +#ifdef SuperHArchitecture +# ifndef SuperHArchOptFlags +# ifdef SuperH4Architecture +# define SuperHArchOptFlags -m4 +# elif defined(SuperH4NOFPUArchitecture) +# define SuperHArchOptFlags -m4-nofpu +# else +# define SuperHArchOptFlags -m3 +# endif +# endif +# ifndef SuperHebArchitecture +# ifdef SuperHebArchitecture +# define SuperHEndianFlags -mb +# else +# define SuperHEndianFlags -ml +# endif +# endif +# ifndef OptimizedCDebugFlags +# define OptimizedCDebugFlags -O2 SuperHArchOptFlags SuperHEndianFlags GccAliasingArgs +# endif +# define LinuxMachineDefines -D__sh__ +# define ServerOSDefines XFree86ServerOSDefines -DDDXTIME +# define ServerExtraDefines -DGCCUSESGAS XFree86ServerDefines +#endif + +#ifdef AMD64Architecture +# ifndef OptimizedCDebugFlags +# define OptimizedCDebugFlags DefaultGcc2AMD64Opt +# endif +# define LinuxMachineDefines -D__amd64__ +# define ServerOSDefines XFree86ServerOSDefines -DDDXTIME +# define ServerExtraDefines -DGCCUSESGAS XFree86ServerDefines -D_XSERVER64 +#endif /* AMD64Architecture */ + +#ifndef StandardDefines +# ifdef __linux__ +# define StandardDefines -Dlinux LinuxMachineDefines LinuxSourceDefines +# else +# define StandardDefines LinuxMachineDefines LinuxSourceDefines +# endif +#endif + +#if UseElfFormat +# define DlLibrary -rdynamic -ldl +#else +# define DlLibrary /**/ +#endif + +#define ServerExtraSysLibs /**/ + +#ifndef PamLibraries +#define PamLibraries -lpam DlLibrary +#endif + +#ifndef PamMiscLibraries +#define PamMiscLibraries -lpam_misc +#endif + +#define ConnectionFlags -DUNIXCONN -DTCPCONN + + +/* Some of these man page defaults are overriden in the above OS sections */ +#ifndef ManSuffix +# define ManSuffix 1x +#endif +#ifndef ManDir +# define ManDir $(MANSOURCEPATH)1 +#endif +#ifndef LibManSuffix +# define LibManSuffix 3x +#endif +#ifndef LibmanDir +# define LibmanDir $(MANSOURCEPATH)3 +#endif +#ifndef FileManSuffix +# define FileManSuffix 5x +#endif +#ifndef FileManDir +# define FileManDir $(MANSOURCEPATH)5 +#endif + +#ifndef StaticLibrary +# define StaticLibrary(libpath,libname) -Wl,-Bstatic Concat(-L,libpath) Concat(-l,libname) -Wl,-Bdynamic +#endif + +#define HasGnuMake YES + +#define MakeNamedTargetSubdir(dir,flags,subname)\ + $(MAKE) -C dir $(MFLAGS) $(PARALLELMFLAGS) flags subname + +#define ArchitectureDefines -DLINUX_ARCHITECTURE + +#define TtClientLibs $(TTLIB) $(XTOOLLIB) $(XLIB) +#define TtClientDepLibs $(DEPTTLIB) $(DEPXTOOLLIB) $(DEPXLIB) + +#if HaveLib64 +# ifndef LibDirName +# define LibDirName lib +# endif +# ifndef SystemUsrLibDir +# define SystemUsrLibDir /usr/lib64 +# endif +# ifndef TkLibDir +# define TkLibDir /usr/lib64 +# endif +#endif + +#include <lnxLib.rules> +# include <xorg.cf> + +#ifndef XFree86ServerOSDefines +# define XFree86ServerOSDefines +#endif diff --git a/nx-X11/config/cf/lnxLib.rules b/nx-X11/config/cf/lnxLib.rules new file mode 100644 index 000000000..e415db8f1 --- /dev/null +++ b/nx-X11/config/cf/lnxLib.rules @@ -0,0 +1,590 @@ +/* + * Linux shared library rules (DLL & ELF versions) + */ +#ifndef HasSharedLibraries +# define HasSharedLibraries YES +#endif +#ifndef ForceNormalLib +# define ForceNormalLib NO +#endif + +#ifndef UseRpath +#define UseRpath YES +#endif + +#if UseElfFormat + +# if LinuxCLibMajorVersion <= 5 +/* + * #define BaseShLibReqs -lc + * + * I don't want to use this since the normal ELF executables should + * be linked with libc.so. If it is not, i.e., static, the variables in + * libc.so which is loaded in because of the other shared libraries + * may have different values than the ones in the static ELF + * executables. That happens if the binaries are linked with libg.a + * or libc_p.a. + * + * If an ELF executable linked with libg.a or libc_p.a loads a shared + * object which needs libc.so via dlopen (), I think it should fail. + * It is a very bad idea. The moral story is DON'T USE dlopen () IN + * ELF EXECUTABLES LINKED WITH libg.a OR libc_p.a. H.J. + * + */ +# define BaseShLibReqs +# else +/* With GNU libc 2 this works fine. */ +# define BaseShLibReqs -lc +# endif + +# ifndef SharedDataSeparation +# define SharedDataSeparation NO +# endif +# ifndef SharedCodeDef +# define SharedCodeDef /**/ +# endif +# ifndef SharedLibraryDef +# define SharedLibraryDef /**/ +# endif +# ifndef ShLibIncludeFile +# define ShLibIncludeFile <lnxLib.tmpl> +# endif +#ifndef RpathLoadFlags +#if UseRpath +#define RpathLoadFlags -Wl,-rpath,$(USRLIBDIRPATH) +#else +#define RpathLoadFlags /**/ +#endif +#endif +#ifndef LibraryRpathLoadFlags +#define LibraryRpathLoadFlags RpathLoadFlags +#endif +# ifndef SharedLibraryLoadFlags +# define SharedLibraryLoadFlags -shared +# endif +# ifndef PositionIndependentCFlags +# define PositionIndependentCFlags -fPIC +# endif +# ifndef PositionIndependentCplusplusFlags +# define PositionIndependentCplusplusFlags -fPIC +# endif +# ifndef ExtraLoadFlags +# if LinuxBinUtilsMajorVersion >= 26 +# ifdef UseInstalled +# if LinuxBinUtilsMajorVersion < 27 +# define ExtraLoadFlags RpathLoadFlags -Wl,-rpath-link,$(USRLIBDIRPATH) +# endif +# else +# define ExtraLoadFlags RpathLoadFlags -Wl,-rpath-link,$(BUILDLIBDIR) +# endif +# else +# define ExtraLoadFlags RpathLoadFlags +# endif +# endif +# ifndef HardCodeLibdirFlag +# define HardCodeLibdirFlag RpathLoadFlags +# endif +# if !defined(ShlibGlobalsFlags) +# define ShlibGlobalsFlags -Wl,-Bsymbolic +# endif + +/* + * InstallSharedLibrary - generate rules to install the shared library. + * NOTE: file must be executable, hence "INSTBINFLAGS" + */ +# ifndef InstallSharedLibrary +# define InstallSharedLibrary(libname,rev,dest) @@\ +install:: Concat(lib,libname.so.rev) @@\ + MakeDir($(DESTDIR)dest) @@\ + $(INSTALL) $(INSTALLFLAGS) $(INSTBINFLAGS) Concat(lib,libname.so.rev) $(DESTDIR)dest @@\ + @T=`echo Concat($(DESTDIR)dest/lib,libname.so.rev) | sed 's/\(lib[^\.]*\.so\.[0-9]*\)\(\.[0-9]*\)\{1,2\}/\1/'`;\ + set -x; $(RM) $$T && $(LN) Concat(lib,libname.so.rev) $$T @@\ + @if $(SOSYMLINK); then (set -x; \ + $(RM) Concat($(DESTDIR)dest/lib,libname.so); \ @@\ + $(LN) Concat(lib,libname.so.rev) Concat($(DESTDIR)dest/lib,libname.so)); fi +# endif /* InstallSharedLibrary */ + +# ifndef InstallSharedLibtoolLibrary + +# define SetRevisions(rev) V=`expr rev : '\([^:]*\)'`; \ @@\ + R=`expr rev : '.*:\([^:]*\):'`; \ @@\ + A=`expr rev : '.*:\([^:]*\)'`; \ @@\ + MAJ=`expr $$V - $$A`; \ @@\ + MIN=$$A.$$R + +# define InstallSharedLibtoolLibrary(libname,rev,dest) @@\ +install:: Concat(lib,libname.so) @@\ + MakeDir($(DESTDIR)dest) @@\ + @set +e; SetRevisions(rev); \ @@\ + set -xe; \ @@\ + $(INSTALL) $(INSTALLFLAGS) $(INSTBINFLAGS) Concat(lib,libname.so.$$MAJ.$$MIN) $(DESTDIR)dest; \ @@\ + $(RM) Concat($(DESTDIR)dest/lib,libname.so.$$MAJ); \ @@\ + $(LN) Concat(lib,libname.so.$$MAJ.$$MIN) Concat($(DESTDIR)dest/lib,libname.so.$$MAJ); \ @@\ + $(RM) Concat($(DESTDIR)dest/lib,libname.so); \ @@\ + $(LN) Concat(lib,libname.so.$$MAJ.$$MIN) Concat($(DESTDIR)dest/lib,libname.so) +# endif /* InstallSharedLibrary */ + +/* + * InstallSharedLibraryData - generate rules to install the shared library data + */ +# ifndef InstallSharedLibraryData +# define InstallSharedLibraryData(libname,rev,dest) +# endif /* InstallSharedLibraryData */ + + +/* + * SharedLibraryTarget - generate rules to create a shared library; + * build it into a different name so that we do not hose people by having + * the library gone for long periods. + */ +# ifndef SharedLibraryTarget +# define SharedLibraryTarget(libname,rev,solist,down,up) @@\ +AllTarget(Concat(lib,libname.so.rev)) @@\ + @@\ +Concat(lib,libname.so.rev): solist $(EXTRALIBRARYDEPS) @@\ + $(RM) $@~ @@\ + @SONAME=`echo $@ | sed 's/\(lib[^\.]*\.so\.[0-9]*\)\(\.[0-9]*\)\{1,2\}/\1/'`; (set -x; \ @@\ + cd down; $(CC) -o up/$@~ $(SHLIBLDFLAGS) -Wl,-soname,$$SONAME solist $(REQUIREDLIBS) BaseShLibReqs) || exit 1; \ @@\ + (set -x; $(RM) $$SONAME; $(LN) $@ $$SONAME); \ @@\ + LinkBuildSonameLibrary($$SONAME) @@\ + $(RM) $@ @@\ + $(MV) $@~ $@ @@\ + @if $(SOSYMLINK); then (set -x; \ @@\ + $(RM) Concat(lib,libname.so); \ @@\ + $(LN) $@ Concat(lib,libname.so)); fi @@\ + LinkBuildLibrary($@) @@\ + LinkBuildLibraryMaybe(Concat(lib,libname.so),$(SOSYMLINK)) @@\ + @@\ +clean:: @@\ + @MAJREV=`echo rev | sed 's/\([0-9]*\)\(\.[0-9]*\)\{1,2\}/\1/'`; \ @@\ + set -x; $(RM) Concat(lib,libname.so.$$MAJREV) @@\ + $(RM) Concat(lib,libname.so.rev) Concat(lib,libname.so) + +# endif /* SharedLibraryTarget */ + + +# ifndef SharedLibtoolLibraryTarget +# define SharedLibtoolLibraryTarget(libname,rev,solist,down,up) @@\ +AllTarget(Concat(lib,libname.so)) @@\ + @@\ +Concat(lib,libname.so): solist $(EXTRALIBRARYDEPS) @@\ + $(RM) $@~ @@\ + @set +e; SetRevisions(rev); set -e; \ @@\ + SONAME=$@.$$MAJ; \ @@\ + (set -x; \ @@\ + $(RM) $@.$$MAJ.$$MIN~; \ @@\ + cd down; $(CC) -o up/$@.$$MAJ.$$MIN~ $(SHLIBLDFLAGS) -Wl,-soname,$$SONAME solist $(REQUIREDLIBS) BaseShLibReqs) || exit 1; \ @@\ + (set -x; \ @@\ + $(RM) $$SONAME; $(LN) $@.$$MAJ.$$MIN $$SONAME); \ @@\ + LinkBuildSonameLibrary($$SONAME); \ @@\ + (set -x; \ @@\ + $(RM) $@.$$MAJ.$$MIN; \ @@\ + $(MV) $@.$$MAJ.$$MIN~ $@.$$MAJ.$$MIN; \ @@\ + $(RM) $@; \ @@\ + $(LN) $@.$$MAJ.$$MIN $@); \ @@\ + LinkBuildLibraryInline($@.$$MAJ.$$MIN); \ @@\ + LinkBuildLibraryInline($@) @@\ + @@\ +clean:: @@\ + @set +e; SetRevisions(rev); \ @@\ + set -xe; \ @@\ + $(RM) Concat(lib,libname.so.$$MAJ); \ @@\ + $(RM) Concat(lib,libname.so.$$MAJ.$$MIN) @@\ + $(RM) Concat(lib,libname.so) + +# endif /* SharedLibtoolLibraryTarget */ + +/* + * SharedDepLibraryTarget - generate rules to create a shared library. + */ +# ifndef SharedDepLibraryTarget +# define SharedDepLibraryTarget(libname,rev,deplist,solist,down,up) @@\ +AllTarget(Concat(lib,libname.so.rev)) @@\ + @@\ +Concat(lib,libname.so.rev): deplist $(EXTRALIBRARYDEPS) @@\ + $(RM) $@~ @@\ + @SONAME=`echo $@ | sed 's/\(lib[^\.]*\.so\.[0-9]*\)\(\.[0-9]*\)\{1,2\}/\1/'`; set -x; \ @@\ + (cd down; $(CC) -o up/$@~ $(SHLIBLDFLAGS) -Wl,-soname,$$SONAME solist $(REQUIREDLIBS) BaseShLibReqs); \ @@\ + $(RM) $$SONAME; $(LN) $@ $$SONAME; \ @@\ + LinkBuildSonameLibrary($$SONAME) @@\ + $(RM) $@ @@\ + $(MV) $@~ $@ @@\ + @if $(SOSYMLINK); then (set -x; \ @@\ + $(RM) Concat(lib,libname.so); \ @@\ + $(LN) $@ Concat(lib,libname.so)); fi @@\ + LinkBuildLibrary($@) @@\ + LinkBuildLibraryMaybe(Concat(lib,libname.so),$(SOSYMLINK)) @@\ + @@\ +clean:: @@\ + @MAJREV=`echo rev | sed 's/\([0-9]*\)\(\.[0-9]*\)\{1,2\}/\1/'`; \ @@\ + set -x; $(RM) Concat(lib,libname.so.$$MAJREV) @@\ + $(RM) Concat(lib,libname.so.rev) Concat(lib,libname.so) + +#endif /* SharedDepLibraryTarget */ + +/* + * SharedDepCplusplusLibraryTarget - generate rules to create a shared library. + */ +#ifndef SharedDepCplusplusLibraryTarget +#define SharedDepCplusplusLibraryTarget(libname,rev,deplist,solist,down,up) @@\ +AllTarget(Concat(lib,libname.so.rev)) @@\ + @@\ +Concat(lib,libname.so.rev): deplist $(EXTRALIBRARYDEPS) @@\ + $(RM) $@~ @@\ + @SONAME=`echo $@ | sed 's/\(lib[^\.]*\.so\.[0-9]*\)\(\.[0-9]*\)\{1,2\}/\1/'`; set -x; \ @@\ + (cd down; $(CXX) -o up/$@~ $(SHLIBLDFLAGS) -Wl,-soname,$$SONAME solist $(REQUIREDLIBS) BaseShLibReqs); \ @@\ + $(RM) $$SONAME; $(LN) $@ $$SONAME; \ @@\ + LinkBuildSonameLibrary($$SONAME) @@\ + $(RM) $@ @@\ + $(MV) $@~ $@ @@\ + @if $(SOSYMLINK); then (set -x; \ @@\ + $(RM) Concat(lib,libname.so); \ @@\ + $(LN) $@ Concat(lib,libname.so)); fi @@\ + LinkBuildLibrary($@) @@\ + LinkBuildLibraryMaybe(Concat(lib,libname.so),$(SOSYMLINK)) @@\ + @@\ +clean:: @@\ + @MAJREV=`echo rev | sed 's/\([0-9]*\)\(\.[0-9]*\)\{1,2\}/\1/'`; \ @@\ + set -x; $(RM) Concat(lib,libname.so.$$MAJREV) @@\ + $(RM) Concat(lib,libname.so.rev) Concat(lib,libname.so) + +#endif /* SharedDepCplusplusLibraryTarget */ + +# ifndef SharedDepModuleTarget +# define SharedDepModuleTarget(name,deps,solist) @@\ +AllTarget(name) @@\ + @@\ +name: deps @@\ + $(RM) $@~ @@\ + $(CC) -o $@~ $(SHLIBLDFLAGS) solist $(REQUIREDLIBS) BaseShLibReqs @@\ + $(RM) $@ @@\ + $(MV) $@~ $@ @@\ + @@\ +clean:: @@\ + $(RM) name + +# endif /* SharedDepModuleTarget */ + +# ifndef SharedDriModuleTarget +# define SharedDriModuleTarget(name,deps,solist) @@\ +AllTarget(name) @@\ + @@\ +name: deps @@\ + $(RM) $@~ $@.map @@\ + @(echo 'DRI_MODULE { global: __dri*; local: *; };' > $@.map) @@\ + $(CC) -o $@~ -Wl,--version-script=$@.map $(SHLIBLDFLAGS) solist $(REQUIREDLIBS) BaseShLibReqs @@\ + $(RM) $@ $@.map @@\ + $(MV) $@~ $@ @@\ + @@\ +clean:: @@\ + $(RM) name @@\ + $(RM) name.map + +# endif /* SharedDriModuleTarget */ + +/* + * SharedLibraryDataTarget - generate rules to create shlib data file; + */ +# ifndef SharedLibraryDataTarget +# define SharedLibraryDataTarget(libname,rev,salist) +# endif /* SharedLibraryTarget */ + +#else /* UseElfFormat */ + +# ifndef SharedDataSeparation +# define SharedDataSeparation NO +# endif +# ifndef SharedCodeDef +# define SharedCodeDef /**/ +# endif +# ifndef SharedLibraryDef +# define SharedLibraryDef /**/ +# endif +# ifndef ShLibIncludeFile +# define ShLibIncludeFile <lnxLib.tmpl> +# endif +# ifndef SharedLibraryLoadFlags +# define SharedLibraryLoadFlags /**/ +# endif +# ifndef PositionIndependentCFlags +# define PositionIndependentCFlags -B/usr/bin/jump +# endif + +/* + * These definitions are now extended to work with the X sources and + * external sources wishing to build shared libs. + * + * A library can create it's own shlibs (.so) or can be incorporated into + * another "host" lib. All libraries generate stub (.sa) files. + * A "host" lib does all the work to generate the stubs for itself and its + * "guests", invoking the "guest" Makefiles to create the objects for + * inclusion into the "host" shlib. A "guest" lib will ask the "host" to + * create the stubfiles, then copy its own into its directory. + * Most external libs are "host" libs; the concept of "guest" is a holdover + * from older libs during the days of scarce shared library address space. + * + * To create a simple "host" shared lib, Xfoo, define: + * + * JUMP_ROOT_Xfoo = <source directory> + * JUMP_IS_HOST_Xfoo = YES + * JUMP_STUBLIBS_Xfoo = libXfoo.sa + * JUMP_DIR_Xfoo = $(JUMP_ROOT_Xfoo)/shared <work directory> + * JUMP_DEFS_Xfoo = -DFOO <defs for jump files> + * JUMP_VARS_Xfoo = $(JUMP_ROOT_Xfoo)/jump_vars <see DLL docs> + * JUMP_FUNCS_Xfoo = $(JUMP_ROOT_Xfoo)/jump_funcs <see DLL docs> + * JUMP_IGNORE_Xfoo = $(JUMP_ROOT_Xfoo)/jump_ignore <see DLL docs> + * JUMP_EXPORT_Xfoo = $(JUMP_DIR_Xfoo)/jump.vars <exported symbols> + * JUMP_IMPORT_Xfoo = $(JUMP_EXPORT_Xbar) <imported symbols> + * JUMP_ADDRESS_Xfoo = 0xXXXXXXXX <fill in with address> + * JUMP_JUMPTABLESIZE_Xfoo = 0x4000 <adjust if necessary> + * JUMP_GOTSIZE_Xfoo = 4096 <adjust if necessary> + * JUMP_STUBNAMES_Xfoo = libXfoo <and others> + * JUMP_STUBS_IMPORT_Xfoo = /usr/lib/libc.sa <and others> + * JUMP_LDLIBS_Xfoo = `$(CC) --print-libgcc-file-name` -lc <and others> + * + * To create a complex "host", you need to add + * JUMP_SIBARS_Xt = jump/libXbar.a~ <and others> + * These are the archives of the shared objects of the "guest" libs. They + * need to be added to the JUMP_LDLIBS_Xfoo lines. + * + * For further clarification, study the definitions of libXaw, a simple "host" + * lib, libXt, a complex "host" lib, and libXmu, one of libXts "guests". + * + * As a hint of how to start (with the DLL docs), touch jump_vars, jump_funcs + * and jump_ignore, then compile. Then massage the jump.vars and jump.funcs + * files in the shared subdirectory into jump_xxx files. + */ + +# ifndef UseInstalled +XCOMM These are only needed to build the server + +# if LinuxElfDefault +LIBC_SA = /usr/i486-linuxaout/lib/libc.sa +LIBM_SA = /usr/i486-linuxaout/lib/libm.sa +# else +LIBC_SA = /usr/lib/libc.sa +LIBM_SA = /usr/lib/libm.sa +# endif + +JUMP_LDLIBS_libc = `$(CC) --print-libgcc-file-name` -lc + +XCOMM libX11.so (X11, SM, ICE) +JUMP_ROOT_X11 = $(XLIBSRC) +JUMP_IS_HOST_X11 = YES +JUMP_STUBLIBS_X11 = libNX_X11.sa libNX_SM.sa libNX_ICE.sa +JUMP_SIBDIRS_X11 = $(JUMP_ROOT_SM) $(JUMP_ROOT_ICE) +JUMP_DIR_X11 = $(JUMP_ROOT_X11)/shared +JUMP_DEFS_X11 = $(XDMAUTHDEFS) $(XKB_DEFINES) +JUMP_VARS_X11 = $(JUMP_ROOT_X11)/jump_vars +JUMP_FUNCS_X11 = $(JUMP_ROOT_X11)/jump_funcs +JUMP_IGNORE_X11 = $(JUMP_ROOT_X11)/jump_ignore +JUMP_EXPORT_X11 = $(JUMP_DIR_X11)/jump.vars +JUMP_ADDRESS_X11 = 0x60200000 +JUMP_JUMPTABLESIZE_X11 = 0x4000 +JUMP_GOTSIZE_X11 = 4096 +JUMP_STUBNAMES_X11 = libNX_X11 libNX_SM libNX_ICE +JUMP_STUBS_IMPORT_X11 = $(LIBC_SA) +JUMP_SIBARS_X11 = jump/libNX_SM.a~ jump/libNX_ICE.a~ +JUMP_LDLIBS_X11 = $(JUMP_SIBARS_X11) $(JUMP_LDLIBS_libc) + +XCOMM libXext (part of libXt.so) +JUMP_ROOT_Xext = $(XEXTLIBSRC) +JUMP_IS_HOST_Xext = NO +JUMP_HOST_Xext = $(JUMP_ROOT_Xt) +JUMP_DIR_Xext = $(JUMP_DIR_Xt) + +XCOMM libXtst (part of libXt.so) +JUMP_ROOT_Xtst = $(XTESTLIBSRC) +JUMP_IS_HOST_Xtst = NO +JUMP_HOST_Xtst = $(JUMP_ROOT_Xt) +JUMP_DIR_Xtst = $(JUMP_DIR_Xt) + +# endif /* !UseInstalled */ + +/* + * SharedLibraryDataTarget - generate rules to create shared data file + */ +# ifndef SharedLibraryDataTarget +# define SharedLibraryDataTarget(libname,rev,salist) +# endif + +/* + * SharedLibraryTarget - generate rules to create a shared library; + * There are two basic flavors of libs: self-generating, which create + * their own (and possibly other) libs, and hosted, which rely on another + * lib for all the work. + */ +# ifndef SharedLibraryTarget +# define SharedLibraryTarget(libname,rev,solist,down,up) @@\ +XCOMM This logic is such to compile the libs in their proper order, @@\ +XCOMM remain dependent on subsidiary libs, and yet minimize local work @@\ + @@\ +JUMP_DIR=./jump @@\ +JUMP_LIB=Concat(lib,libname) @@\ + @@\ +XCOMM this is needed for newer gnumake versions @@\ +export JUMP_DIR JUMP_LIB @@\ + @@\ +JUMP_IS_HOST=$(Concat(JUMP_IS_HOST_,libname)) @@\ +JUMP_AR=$(JUMP_DIR)/Concat(lib,libname.a~) @@\ +JUMP_SA=Concat(lib,libname.sa) @@\ +JUMP_SO=Concat(lib,libname.so.rev) @@\ + @@\ +JUMP_HOST=$(Concat(JUMP_HOST_,libname)) @@\ + @@\ +INSTSOLIBFLAGS=-m 0555 @@\ + @@\ +AllTarget($(BUILDLIBDIR)/$(JUMP_SA)) @@\ + @@\ +$(BUILDLIBDIR)/$(JUMP_SA): $(JUMP_SA) @@\ + LinkBuildLibrary($(JUMP_SA)) @@\ + @@\ +$(JUMP_SA) $(Concat(JUMP_STUBLIBS_,libname)) do_JUMP_SA: \ + down/mk_JUMP_SA_$(JUMP_IS_HOST) @@\ + @@\ +down/mk_JUMP_SA_0:: mk_JUMP_HOST @@\ + @@\ +down/mk_JUMP_SA_0:: $(JUMP_HOST)/$(JUMP_SA) @@\ + $(RM) $(JUMP_SA) @@\ + $(LN) $(JUMP_HOST)/$(JUMP_SA) $(JUMP_SA) @@\ + touch $@ @@\ + @@\ +down/mk_JUMP_SA_1:: $(JUMP_SO) @@\ + @@\ +down/mk_JUMP_SA_1:: down/mk_JUMP_SO_2 @@\ + $(RM) $(Concat(JUMP_STUBLIBS_,libname)) @@\ + mkstubs -v rev -l $(JUMP_LIB) \ + -a $(Concat(JUMP_ADDRESS_,libname)) \ + -j $(Concat(JUMP_JUMPTABLESIZE_,libname)) \ + -g $(Concat(JUMP_GOTSIZE_,libname)) \ + -- $(Concat(JUMP_STUBNAMES_,libname)) @@\ + verify-shlib -l $(JUMP_SO) \ + $(Concat(JUMP_STUBLIBS_,libname)) @@\ + $(MV) verify.out $(JUMP_DIR) @@\ + touch $@ @@\ + @@\ +mk_JUMP_HOST: @@\ + @echo checking stub library $(JUMP_SA) in $(JUMP_HOST)... @@\ + @(cd $(JUMP_HOST); $(MAKE) $(MFLAGS) $(JUMP_SA)) || exit 1 @@\ + @echo ok. continuing in $(Concat(JUMP_ROOT_,libname))... @@\ + @@\ +$(JUMP_SO): down/mk_JUMP_SO_$(JUMP_IS_HOST) @@\ + @@\ +down/mk_JUMP_SO_0: @@\ + @@\ +down/mk_JUMP_SO_1:: $(JUMP_AR) mk_JUMP_SIBDIRS down/mk_JUMP_SO_2 @@\ + @@\ +down/mk_JUMP_SO_2: down/mk_JUMP_AR $(Concat(JUMP_SIBARS_,libname)) @@\ + $(RM) $(JUMP_SO) @@\ + mkimage -f -v rev -l $(JUMP_LIB) \ + -a $(Concat(JUMP_ADDRESS_,libname)) \ + -j $(Concat(JUMP_JUMPTABLESIZE_,libname)) \ + -g $(Concat(JUMP_GOTSIZE_,libname)) \ + -- $(JUMP_AR) $(Concat(JUMP_LDLIBS_,libname)) @@\ + $(RM) $(JUMP_DIR)/__jump.s $(JUMP_DIR)/__jump.o @@\ + LinkBuildLibrary($(JUMP_SO)) @@\ + touch $@ @@\ + @@\ +mk_JUMP_SIBDIRS: @@\ + @for d in $(Concat(JUMP_SIBDIRS_,libname)); do \ + echo checking ar library in $$d...; \ + (cd $$d ; $(MAKE) $(MFLAGS) fastdo_JUMP_AR) || exit 1; \ + echo ok. continuing in $(Concat(JUMP_ROOT_,libname))...;done@@\ + @@\ +fastdo_JUMP_AR: $(JUMP_DIR) down/mk_JUMP_AR @@\ + @@\ +$(JUMP_AR) do_JUMP_AR:: jumpsetup down/mk_JUMP_AR @@\ + @@\ +jumpsetup: $(JUMP_DIR) jumpsetup_$(JUMP_IS_HOST) @@\ + @@\ +$(JUMP_DIR): @@\ + $(RM) jump @@\ + LibMkdir($(Concat(JUMP_DIR_,libname))) @@\ + $(LN) $(Concat(JUMP_DIR_,libname)) jump @@\ + @@\ +jumpsetup_0: @@\ + @echo doing jump setup in host $(JUMP_HOST)... @@\ + @(cd $(JUMP_HOST); $(MAKE) $(MFLAGS) jumpsetup) || exit 1 @@\ + @echo ok. continuing in $(Concat(JUMP_ROOT_,libname))... @@\ + @@\ +jumpsetup_1:: @@\ + @for d in $(Concat(JUMP_SUBDIRS_,libname)); do \ + echo checking stub library in $$d...; \ + (cd $$d ; $(MAKE) $(MFLAGS) do_JUMP_SA) || exit 1; \ + echo ok. continuing in $(Concat(JUMP_ROOT_,libname))...;done@@\ + @@\ +jumpsetup_1:: $(JUMP_DIR)/jump.funcs $(JUMP_DIR)/jump.vars \ + $(JUMP_DIR)/jump.ignore $(JUMP_DIR)/jump.import @@\ + @@\ +$(JUMP_DIR)/jump.funcs: $(Concat(JUMP_FUNCS_,libname)) @@\ + $(RM) $(JUMP_DIR)/jump.funcs @@\ + cat $(Concat(JUMP_FUNCS_,libname)) | \ + $(CPP) $(ALLDEFINES) $(Concat(JUMP_DEFS_,libname)) > $@ @@\ + @@\ +$(JUMP_DIR)/jump.vars: $(Concat(JUMP_VARS_,libname)) @@\ + $(RM) $(JUMP_DIR)/jump.vars @@\ + cat $(Concat(JUMP_VARS_,libname)) | \ + $(CPP) $(ALLDEFINES) $(Concat(JUMP_DEFS_,libname)) > $@ @@\ + @@\ +$(JUMP_DIR)/jump.ignore: $(Concat(JUMP_IGNORE_,libname)) @@\ + $(RM) $(JUMP_DIR)/jump.ignore @@\ + cat $(Concat(JUMP_IGNORE_,libname)) | \ + $(CPP) $(ALLDEFINES) $(Concat(JUMP_DEFS_,libname)) > $@ @@\ + @@\ +$(JUMP_DIR)/jump.import: $(JUMP_DIR)/stubs.import \ + $(Concat(JUMP_IMPORT_,libname)) @@\ + $(RM) $(JUMP_DIR)/jump.import @@\ + cat $(JUMP_DIR)/stubs.import $(Concat(JUMP_IMPORT_,libname)) > $@ @@\ + @@\ +$(JUMP_DIR)/stubs.import: $(Concat(JUMP_STUBS_IMPORT_,libname)) @@\ + $(RM) $(JUMP_DIR)/stubs.import @@\ + nm --no-cplus $(Concat(JUMP_STUBS_IMPORT_,libname)) | grep '__GOT__' | \ + sed 's/__GOT__/_/' > $@ @@\ + @@\ +down/mk_JUMP_AR: solist @@\ + $(RM) $(JUMP_AR) @@\ + @if [ -s $(JUMP_DIR)/jump.log ]; then \ + echo "Error: Leftover globals for shared lib"; \ + exit 1; fi @@\ + (cd down; $(AR) up/$(JUMP_AR) solist) || exit 1 @@\ + $(RANLIB) $(JUMP_AR) @@\ + touch $@ @@\ + @@\ +clean:: jumpclean @@\ + @@\ +jumpclean: jumpclean_$(JUMP_IS_HOST) @@\ + $(RM) $(JUMP_SA) down/mk_JUMP_AR @@\ + $(RM) -r $(JUMP_DIR) @@\ + @@\ +jumpclean_0: @@\ + $(RM) down/mk_JUMP_SA_0 @@\ + $(RM) $(JUMP_HOST)/$(JUMP_SA) @@\ + @@\ +jumpclean_1: @@\ + $(RM) -r $(JUMP_SO) $(Concat(JUMP_DIR_,libname)) \ @@\ + down/mk_JUMP_SA_1 down/mk_JUMP_SO_1 down/mk_JUMP_SO_2 +# endif /* SharedLibraryTarget */ + +/* + * InstallSharedLibrary - generate rules to install the shared library. + */ +# ifndef InstallSharedLibrary +# define InstallSharedLibrary(libname,rev,dest) @@\ +install:: $(JUMP_SA) $(JUMP_SO) @@\ + MakeDir($(DESTDIR)dest) @@\ + @if [ "$(JUMP_IS_HOST)" = YES ]; then \ + (T=$(DESTDIR)dest/`echo $(JUMP_SO)|sed '/\(lib[^\.]*\.so\.[0-9]*\)\(\.[0-9]*\)\{1,2\}/\1/`;\ + set -x; \ + $(INSTALL) -s -c $(INSTSOLIBFLAGS) $(JUMP_SO) $(DESTDIR)dest; \ + $(RM) $$T && $(LN) $(JUMP_SO) $$T); fi @@\ + $(INSTALL) -c $(INSTLIBFLAGS) $(JUMP_SA) $(DESTDIR)dest +# endif /* InstallSharedLibrary */ + +/* + * InstallSharedLibraryData - generate rules to install the shared library data + */ +# ifndef InstallSharedLibraryData +# define InstallSharedLibraryData(libname,rev,dest) +# endif /* InstallSharedLibraryData */ + +#endif /* UseElfFormat */ diff --git a/nx-X11/config/cf/lnxLib.tmpl b/nx-X11/config/cf/lnxLib.tmpl new file mode 100644 index 000000000..2e10151df --- /dev/null +++ b/nx-X11/config/cf/lnxLib.tmpl @@ -0,0 +1,7 @@ +/* + * Linux shared library template + */ + +#define SharedX11Reqs $(LDPRELIB) -ldl -lXdmcp + +#define NoMessageCatalog diff --git a/nx-X11/config/cf/noop.rules b/nx-X11/config/cf/noop.rules new file mode 100644 index 000000000..8b1378917 --- /dev/null +++ b/nx-X11/config/cf/noop.rules @@ -0,0 +1 @@ + diff --git a/nx-X11/config/cf/nxversion.def.in b/nx-X11/config/cf/nxversion.def.in new file mode 100644 index 000000000..03ac921f4 --- /dev/null +++ b/nx-X11/config/cf/nxversion.def.in @@ -0,0 +1,4 @@ +#define NX_VERSION_MAJOR ###NX_VERSION_MAJOR### +#define NX_VERSION_MINOR ###NX_VERSION_MINOR### +#define NX_VERSION_MICRO ###NX_VERSION_MICRO### +#define NX_VERSION_PATCH ###NX_VERSION_PATCH### diff --git a/nx-X11/config/cf/site.def b/nx-X11/config/cf/site.def new file mode 100644 index 000000000..da4c13793 --- /dev/null +++ b/nx-X11/config/cf/site.def @@ -0,0 +1,126 @@ +/*************************************************************************** + * * + * SITE-SPECIFIC DEFINITIONS * + * * + * This file contains two halves, one included before the vendor-specific * + * configuration file (.cf file), and one included after the .cf file. * + * The before-half should be protected by #ifdef BeforeVendorCF, and the * + * after-half should be protected by #ifdef AfterVendorCF. * + * * + * The before-half should only set things that the .cf file depends on. * + * For the .cf files shipped in this release, the main variables in this * + * category are HasGcc, HasGcc2, HasCplusplus, OSMajorVersion, * + * OSMinorVersion, and OSTeenyVersion. * + * * + * The after-half should contain all other definitions. For example, * + * place your ProjectRoot definition here. * + * * + * OS Major and Minor version numbers should be changed directly in the * + * .cf file, not overridden in site.def. * + * * + ***************************************************************************/ + +/* if you want host-specific customization, this is one way to do it */ +/* +#ifndef SiteIConfigFiles +#define SiteIConfigFiles $(IRULESRC)/host.def +#define LocalConfigFiles host.def +#endif +*/ + + +#ifdef BeforeVendorCF + +/* + * Include this for easy XFree86 customisations + */ +#ifndef SiteIConfigFiles +#define SiteIConfigFiles $(IRULESRC)/xorgsite.def $(IRULESRC)/host.def +#endif + +#include <host.def> + +#include <xorgsite.def> + +/* On systems where cpp doesn't correctly expand macros in include directives + * the two following macros need to be defined directly (where "X11" is + * really whatever the TopLevelProject macro is defined to be). + */ +# if defined(SVR4Architecture) || \ + defined(SCOArchitecture) || defined(Win32Architecture) || \ + defined(UXPArchitecture) || defined(SunArchitecture) || \ + defined(DynixPtxArchitecture) || defined(i386IscArchitecture) +# ifndef ProjectRulesFile +# define ProjectRulesFile <X11.rules> +# endif +# ifndef ProjectTmplFile +# define ProjectTmplFile <X11.tmpl> +# endif +# endif + +/* +#ifndef HasGcc2 +#define HasGcc2 YES +#endif +*/ + +#endif /* BeforeVendorCF */ + +#ifdef AfterVendorCF + +#ifndef ProjectRoot +#define ProjectRoot /usr/local +#endif + +/* + * On some platforms, some things may be installed outside of ProjectRoot + * by default. To disable this, uncomment the following line. + * +#define NothingOutsideProjectRoot YES + */ + +/* + * Set EtcX11Directory if you want config file links installed under + * ProjectRoot rather than in /etc/X11. See also HasVarDirectory, + * UseEtcX11 and UseSeparateConfDir. + * +#define EtcX11Directory /etc/nx + */ + + +/* Only set HasXdmAuth to YES if you have a Wraphelp.c file. */ +/* #define HasXdmAuth YES */ + +/* +#if defined(SunArchitecture) && defined(SparcArchitecture) +#define HasCodeCenter YES +#ifndef SVR4Architecture +#define HasTestCenter YES +#endif +#endif +*/ + +/* +#ifdef __hp9000s800 +#define HasCodeCenter YES +#endif +*/ + +/* +#if defined(SunArchitecture) && defined(SparcArchitecture) && !defined(SVR4Architecture) +#define HasPurify YES +#endif +*/ + +/* +#define HasSentinel YES +*/ + +/* +#undef DefaultUserPath +#define DefaultUserPath /bin:/usr/bin:$(BINDIR):/usr/ucb:/usr/local/bin +*/ + +#include <host.def> + +#endif /* AfterVendorCF */ diff --git a/nx-X11/config/cf/xf86.rules b/nx-X11/config/cf/xf86.rules new file mode 100644 index 000000000..879bd3c90 --- /dev/null +++ b/nx-X11/config/cf/xf86.rules @@ -0,0 +1,127 @@ +/* + * Rules needed to build the XFree86 X Servers + */ + +#ifndef ObjectMapIncludeFromSpecialSource +#define ObjectMapIncludeFromSpecialSource(dst,src,flags) @@\ +dst.c: src.c @@\ + RemoveFile($@) @@\ + echo "#include \"mfbmap.h\"" > $@ @@\ + echo "#include \"$?\"" >> $@ @@\ + @@\ +SpecialCObjectRule(dst,NullParameter,flags) @@\ + @@\ +depend:: dst.c @@\ + @@\ +clean:: @@\ + RemoveFile(dst.c) +#endif + + +/* + * Rules for building config files from scripts + */ + +#ifndef Depend +# define Depend depend +#endif + +#ifndef ConfigTargetLong +#define ConfigTargetLong(target,dep,script,args,extra) @@\ +all:: Configure @@\ + @@\ +Configure:: target.o @@\ + @@\ +target.c: script dep @@\ + $(MAKE) $(MFLAGS) Makefile @@\ + $(MAKE) $(MFLAGS) extra Concat(Build,target) @@\ + @@\ +Concat(Build,target): @@\ + $(RM) target.c @@\ + $(SHELL) script args @@\ + @@\ +clean:: @@\ + $(RM) target.c +#endif + +#define ConfigTarget(target,dep,script,args) ConfigTargetLong(target,dep,script,args,Depend) + +#define ConfigTargetNoDepend(target,dep,script,args) ConfigTargetLong(target,dep,script,args,) + +#ifndef DriverObjectList +#define DriverObjectList(drivers,list) @@\ +list: $(ICONFIGFILES) drivers @@\ + RemoveFile(list) @@\ + @echo Creating list for drivers; \ @@\ + DRIVERS="drivers"; \ @@\ + if [ x"$$DRIVERS" != x ]; then \ @@\ + for i in $$DRIVERS; do \ @@\ + DRIVER="$$i/*_drv.o"; \ @@\ + for j in $$DRIVER; do \ @@\ + echo $$j >> list; \ @@\ + done; \ @@\ + done; \ @@\ + else \ @@\ + echo "" > list; \ @@\ + fi @@\ + @@\ +clean:: @@\ + RemoveFile(list) +#endif + +/* + * Rules for installing Driver SDK parts (target is install.sdk) + */ + +#ifndef InstallDriverSDKNonExecFile +#define InstallDriverSDKNonExecFile(file,dest) /**/ +#endif + +#ifndef InstallDriverSDKLibrary +#define InstallDriverSDKLibrary(libname,dest) /**/ +#endif + +#ifndef InstallDriverSDKNamedLibrary +#define InstallDriverSDKNamedLibrary(libname,dlibname,dest) /**/ +#endif + +#ifndef InstallDriverSDKNamedNonExec +#define InstallDriverSDKNamedNonExec(srcname,dstname,dest) /**/ +#endif + +#ifndef InstallDriverSDKNamedProg +#define InstallDriverSDKNamedProg(srcname,dstname,dest) /**/ +#endif + +#ifndef InstallDriverSDKSubdirs +#define InstallDriverSDKSubdirs(dirs) /**/ +#endif + +#ifndef InstallDriverSDKMultipleDestFlags +#define InstallDriverSDKMultipleDestFlags(list,dest,flags) /**/ +#endif + +#ifndef InstallDriverSDKDynamicModule +#define InstallDriverSDKDynamicModule(module,dest,subdir) /**/ +#endif + +#ifndef InstallDriverSDKObjectModule +#define InstallDriverSDKObjectModule(module,dest,subdir) /**/ +#endif + + +#ifndef InstallDriverSDKObjectSubModule +#define InstallDriverSDKObjectSubModule(module,dest,subdir) /**/ +#endif + +#ifndef InstallDriverSDKLibraryModule +#define InstallDriverSDKLibraryModule(module,dest,subdir) /**/ +#endif + +#ifndef ServerDriverSDKTarget +#define ServerDriverSDKTarget(program) /**/ +#endif + +#ifndef InstallDriverSDKProgramWithFlags +#define InstallDriverSDKProgramWithFlags(program,dest,flags) /**/ +#endif diff --git a/nx-X11/config/cf/xorg.cf b/nx-X11/config/cf/xorg.cf new file mode 100644 index 000000000..1aa7daf06 --- /dev/null +++ b/nx-X11/config/cf/xorg.cf @@ -0,0 +1,873 @@ +/* + * This configuration file contains all of the configuration + * information for the Xorg based X Servers. + * + * Most of these settings can be overridden in a vendor.cf or the + * BeforeVendor part of the site.def file. + */ + +/* Get and set version information. */ + +#include "xorgversion.def" + +#if !defined(XorgVersionString) && \ + defined(XORG_VERSION_MAJOR) && defined(XORG_VERSION_MINOR) && \ + defined(XORG_VERSION_PATCH) && defined(XORG_VERSION_SNAP) +# if XORG_VERSION_SNAP == 0 +# if XORG_VERSION_PATCH == 0 +# define XorgVersionString `echo XORG_VERSION_MAJOR XORG_VERSION_MINOR | sed 's/ /./g'` +# else +# define XorgVersionString `echo XORG_VERSION_MAJOR XORG_VERSION_MINOR XORG_VERSION_PATCH | sed 's/ /./g'` +# endif +# else +# define XorgVersionString `echo XORG_VERSION_MAJOR XORG_VERSION_MINOR XORG_VERSION_PATCH XORG_VERSION_SNAP | sed 's/ /./g'` +# endif +#endif + +#if !defined(XORG_DATE) && defined(XF86_DATE) +# define XORG_DATE XF86_DATE +#endif + +/* + * Xorg versions are M.m.P.s, and XorgVersion is: + * + * M * 10000000 + m * 100000 + P * 1000 + s + * + */ + +#ifndef XorgVersion +# define XorgVersion (((XORG_VERSION_MAJOR) * 10000000) + ((XORG_VERSION_MINOR) * 100000) + ((XORG_VERSION_PATCH) * 1000) + XORG_VERSION_SNAP) +#endif + +#ifndef VersionDefines +# define VersionDefines -DXORG_VERSION_CURRENT="$(XORG_VERSION_CURRENT)" +#endif + +/* Place the version of the relevant changelog file here */ +#ifndef ReleaseVersion +# define ReleaseVersion RELEASE-1 +#endif + +XORG_VERSION_CURRENT = XorgVersion +RELEASE_VERSION = ReleaseVersion + +#if NXAgentServer +#include "nxversion.def" + +#if !defined(nxVersionString) && \ + defined(NX_VERSION_MAJOR) && defined(NX_VERSION_MINOR) && \ + defined(NX_VERSION_MICRO) && defined(NX_VERSION_PATCH) +# define nxVersionString `echo NX_VERSION_MAJOR NX_VERSION_MINOR NX_VERSION_MICRO NX_VERSION_PATCH | sed 's/ /./g'` +#endif + +/* + * NX versions are M.m.µ.p, and NXVersion is: + * + * M * 10000000 + m * 100000 + µ * 1000 + p + * + */ + +#if !defined(nxVersion) && defined(nxVersionString) +# define nxVersion (((NX_VERSION_MAJOR) * 10000000) + ((NX_VERSION_MINOR) * 100000) + ((NX_VERSION_MICRO) * 1000) + NX_VERSION_PATCH) + +NX_VERSION_CURRENT = nxVersion +NX_VERSION_CURRENT_STRING = nxVersionString + +#endif +#endif /* NXAgentServer */ + +#if !defined(XorgManVersionString) && \ + defined(XORG_VERSION_MAJOR) && defined(XORG_VERSION_MINOR) && \ + defined(XORG_VERSION_PATCH) && defined(XORG_VERSION_SNAP) +# if XORG_VERSION_SNAP == 0 +#define XorgManVersionString `echo XORG_VERSION_MAJOR XORG_VERSION_MINOR XORG_VERSION_PATCH | sed -e 's/ /./g' -e 's/^/Version\\\ /'` +#else +#define XorgManVersionString `echo XORG_VERSION_MAJOR XORG_VERSION_MINOR XORG_VERSION_PATCH XORG_VERSION_SNAP | sed -e 's/ /./g' -e 's/^/Version\\\ /'` +# endif +#endif + +#if !defined(XorgDateString) && defined(XORG_DATE) +# define XorgDateString XORG_DATE +#endif + +#if !defined(XFree86DateString) && defined(XorgDateString) +# define XFree86DateString XorgDateString +#endif + +#ifndef BuildDateCmd +# define BuildDateCmd date +%Y%m%d +#endif + +#if !defined(BuildDate) +# define BuildDate `BuildDateCmd` +#endif + +#ifndef ChangelogDateCmd +# define ChangelogDateCmd if tail $(CHANGELOGFILE) 2>/dev/null | \ @@\ + fgrep '$$XdotOrg:' >/dev/null 2>&1; then \ @@\ + tail $(CHANGELOGFILE) | fgrep '$$XdotOrg:' | \ @@\ + sed s,'.* \([0-9][0-9]*\)/\([0-9][0-9]*\)/\([0-9][0-9]*\).*,\1\2\3,'; \ @@\ + else echo 0; fi +#endif + +#if !defined(ChangelogDate) +# define ChangelogDate `ChangelogDateCmd` +#endif + +#ifndef XVendorString +# define XVendorString "The X.Org Foundation" +#endif + +#ifndef XVendorRelease +# define XVendorRelease XorgVersion +#endif + +#ifndef XVendorManVersionString +#define XVendorManVersionString XorgManVersionString +#endif + +#ifndef XVendorManNameString +#define XVendorManNameString X.Org +#endif + +/* + * This enables some settings for developers. + */ + +#ifndef XFree86Devel +# if !defined(PatheticCpp) || !PatheticCpp +# if (XorgVersion % 1000) +# define XFree86Devel YES +# else +# define XFree86Devel NO +# endif +# else +# define XFree86Devel NO /* Assume the worst */ +# endif +#endif + +#ifndef BuildDebug +# define BuildDebug YES +#endif + +/* + * settings for the config file parser + */ + +#ifndef XConfigFile +#define XConfigFile xorg.conf +#endif +#ifndef XConfigDir +#define XConfigDir $(LIBDIR) +#endif +#ifndef XLogFile +#define XLogFile Xorg +#endif +#ifndef XServerName +# define XServerName Xorg +#endif + +/* + * BuildXFree86ConfigTools: + * + * Turning this on allows the XFree86 config tools to build when + * BuildServersOnly is YES. This requires more than the servonly CVS + * module. This cannot be used to disable building the config tools with + * a full build. + */ +#ifndef BuildXFree86ConfigTools +#ifdef BuildServersOnly +#define BuildXFree86ConfigTools !BuildServersOnly +#else +#define BuildXFree86ConfigTools YES +#endif +#endif + +#ifndef BuildLibrariesForConfigTools +#define BuildLibrariesForConfigTools BuildXFree86ConfigTools +#endif + +#if BuildXFree86ConfigTools && BuildLibrariesForConfigTools +#define BuildLibraries YES +#define BuildXKBlib YES +#endif + +/* + * When this is set, modules are always built separately from the libraries + * that statically link into an Xserver. This is for platforms where the + * module and native object formats are different (e.g., OS/2). + */ +#ifndef BuildModuleInSubdir +#define BuildModuleInSubdir NO +#endif + +/* + * Default settings for which X Servers to build. + */ + +/* OS.cf files may set this for OS-specific input drivers */ +#ifndef OSXInputDrivers +#define OSXInputDrivers /**/ +#endif + +/* This may be set in host.def for 3rd party input drivers */ +#ifndef ExtraXInputDrivers +#define ExtraXInputDrivers /**/ +#endif + +/* XInput drivers */ +#ifndef XInputDrivers +#define XInputDrivers mouse keyboard acecad calcomp citron \ + digitaledge dmc dynapro elographics tek4957 \ + microtouch mutouch penmount spaceorb summa \ + wacom void magellan /* magictouch */ hyperpen \ + jamstudio fpit \ + palmax OSXInputDrivers ExtraXInputDrivers +#endif + + +/* Deprecated keyboard driver */ +#ifndef UseDeprecatedKeyboardDriver +#define UseDeprecatedKeyboardDriver NO +#endif + +/* <linux/input.h> support mainly for USB support */ +#ifndef HasLinuxInput +# define HasLinuxInput NO +#endif + +/* + * Many architectures share common X Server pieces. List them here. + */ +#if defined(i386Architecture) || defined(ia64Architecture) || \ + defined(AMD64Architecture) || defined(SparcArchitecture) || \ + defined(Sparc64Architecture) || defined(MipsArchitecture) || \ + defined(AlphaArchitecture) || defined(PpcArchitecture) || \ + defined(Mc68020Architecture) || defined(Arm32Architecture) || \ + defined(SuperHArchitecture) +# ifndef XorgServer +# define XorgServer YES +# endif +/* 1bpp module */ +# ifndef XF1Bpp +# define XF1Bpp YES +# endif +/* 4bpp module */ +# ifndef XF4Bpp +# define XF4Bpp YES +# endif +/* 8/32bpp overlay module */ +# ifndef XF8_32Bpp +# define XF8_32Bpp YES +# endif +/* 8/16bpp dual fb module */ +# ifndef XF8_16Bpp +# define XF8_16Bpp YES +# endif +/* shadow fb module */ +# ifndef XFShadowFB +# define XFShadowFB YES +# endif +/* fbdevhw module */ +# ifndef XF86FBDevHw +# define XF86FBDevHw YES +# endif +/* XAA module */ +# ifndef XF86XAA +# define XF86XAA YES +# endif +/* Exa module */ +# ifndef XF86EXA +# define XF86EXA YES +# endif +/* ramdac module */ +# ifndef XF86Ramdac +# define XF86Ramdac YES +# endif +/* I2C module */ +# ifndef XF86I2C +# define XF86I2C YES +# endif +/* DDC module */ +# ifndef XF86DDC +# define XF86DDC YES +# endif +/* RAC (Resource Access Control) module */ +# ifndef XF86RAC +# define XF86RAC YES +# endif +/* int10 module */ +# ifndef XF86Int10 +# define XF86Int10 YES +# endif +/* vbe module */ +# ifndef XF86VBE +# define XF86VBE YES +# endif +#endif + +/* + * For Mips/Arc platforms, the default is to build all modules which + * are supported on this platform. + */ +#ifdef ArcArchitecture +# ifndef XorgServer +# define XorgServer YES +# endif +#endif + +#if BuildDebug +# define DebugDefines -DBUILDDEBUG +#else +# define DebugDefines /**/ +#endif + +#ifndef XorgServer +# define XorgServer NO +#endif + +/* + * Fbdev module defines. They are set to indicate the fb types supported + * on different architectures. + */ +#ifndef XF86AFB +# define XF86AFB NO +#endif +#ifndef XF86ILBM +# define XF86ILBM NO +#endif +#ifndef XF86IPLAN2P2 +# define XF86IPLAN2P2 NO +#endif +#ifndef XF86IPLAN2P4 +# define XF86IPLAN2P4 NO +#endif +#ifndef XF86IPLAN2P8 +# define XF86IPLAN2P8 NO +#endif +#if XF86AFB +AFB_DEFS = -DUSE_AFB +#endif +#if XF86ILBM +ILBM_DEFS = -DUSE_ILBM +#endif +#if XF86IPLAN2P2 +IPLAN2P2_DEFS = -DUSE_IPLAN2P2 +#endif +#if XF86IPLAN2P4 +IPLAN2P4_DEFS = -DUSE_IPLAN2P4 +#endif +#if XF86IPLAN2P8 +IPLAN2P8_DEFS = -DUSE_IPLAN2P8 +#endif +#ifndef FbdevDefines +# define FbdevDefines $(AFB_DEFS) $(ILBM_DEFS) $(IPLAN2P2_DEFS) \ + $(IPLAN2P4_DEFS) $(IPLAN2P8_DEFS) +#endif + +/* + * Build GLX server interface + * --- Doesn't work for 1-bit and 4-bit servers + */ +#ifndef BuildGlxExt +# define BuildGlxExt YES +#endif + +#if BuildGlxExt + +# define GlxCoreLibDefines -DGLX_USE_MESA + +# if defined(SparcArchitecture) \ + || defined (Sparc64Architecture) \ + || defined(ia64Architecture) \ + || defined(s390xArchitecture) \ + || defined(AMD64Architecture) +# define GlxArchDefines -D__GLX_ALIGN64 +# elif defined(AlphaArchitecture) +/* On the Alpha we need to ensure floating point accuracy for 3D */ +# define GlxArchDefines -D__GLX_ALIGN64 -mieee +# elif defined(DarwinArchitecture) +/* GLX contains lots of uninitialized globals, which can upset Darwin */ +# define GlxArchDefines -fno-common +# else +# define GlxArchDefines /**/ +# endif + +# ifndef GlxExtraDefines +# define GlxExtraDefines GlxCoreLibDefines GlxArchDefines +# endif + +#endif + +# ifndef UseX86Emu +# define UseX86Emu YES +# endif + +#define X86INT10_STUB 0 +#define X86EMU_GENERIC 1 +#define X86VM 2 +#define X86EMU_OS 3 + +#ifndef XF86INT10_BUILD +# if UseX86Emu +# define XF86INT10_BUILD X86EMU_GENERIC +# else +# define XF86INT10_BUILD X86INT10_STUB +# endif +#endif + +#ifndef BuildRECORDlib +# define BuildRECORDlib YES +#endif + +#ifndef BuildXKBlib +# define BuildXKBlib YES +#endif + +#ifndef HasXfont2 +# define HasXfont2 NO +#endif + +#ifndef BuildScreenSaverExt +# define BuildScreenSaverExt YES +#endif + +/* + * Build XInput support + */ +#ifndef BuildXInputExt +# define BuildXInputExt YES +#endif + +/* Build Xinerama (aka panoramiX) extension */ +#ifndef BuildXinerama +# define BuildXinerama YES +#endif + +/* Build Render extension */ +#ifndef BuildRender +# define BuildRender YES +#endif + +#if 0 +#ifndef JoystickSupport +# define JoystickSupport NO +#endif +#endif + +/* + * Build the XFree86-Bigfont extension + */ +#ifndef BuildXF86BigfontExt +# define BuildXF86BigfontExt YES +#endif + +/* + * Build the DPMS extension support + */ +#ifndef BuildDPMSExt +# define BuildDPMSExt YES +#endif + +/* + * Build the X Video Extension + */ +#ifndef BuildXvExt +# define BuildXvExt YES +#endif + +/* + * Build the X Video Motion Compensation Extension + */ +#ifndef BuildXvMCExt +# define BuildXvMCExt YES +#endif + +/* + * Build the X-Resource Extension + */ +#ifndef BuildXResExt +# define BuildXResExt YES +#endif + +#if Malloc0ReturnsNull +# ifndef XtMalloc0ReturnsNullDefines +# define XtMalloc0ReturnsNullDefines Malloc0ReturnsNullDefines -DXTMALLOC_BC +# endif +#endif + +#ifndef HasDlsymBug +# define HasDlsymBug NO +#endif + +#ifndef HasMTRRSupport +# define HasMTRRSupport NO +#endif + +/* + * Build scanpci? + */ +#ifndef SystemV +#define SystemV NO +#endif +#ifndef SystemV4 +#define SystemV4 NO +#endif +#ifndef BuildScanpci +# if SystemV || SystemV4 || \ + (defined(LinuxArchitecture) && !defined(Mc68020Architecture)) || \ + defined(i386BsdArchitecture) || \ + defined(GNUMachArchitecture) || \ + (defined(KFreeBSDArchitecture) && defined(i386Architecture)) +# define BuildScanpci YES +# else +# define BuildScanpci NO +# endif +#endif + +/* Disable stripping installed programs for this release. */ +#ifndef StripInstalledPrograms +# define StripInstalledPrograms NO +#endif + +#ifndef InstallJapaneseDocs +#define InstallJapaneseDocs NO +#endif + +#if BuildXvExt +# define XFree86XvDefines -DXvExtension +#else +# define XFree86XvDefines /**/ +#endif + +#if BuildXvMCExt +# define XFree86XvMCDefines -DXvMCExtension +#else +# define XFree86XvMCDefines /**/ +#endif + +#if BuildXResExt +# define XFree86XResDefines -DXResExtension +#else +# define XFree86XResDefines /**/ +#endif + +#ifndef DlopenHack +# define DlopenHack -DDLOPEN_HACK +#endif + +#ifndef ExtraLoaderDefines +# define ExtraLoaderDefines /**/ +#endif + +#ifndef HasBsdMake +#define HasBsdMake NO +#endif + +#ifndef MakeHasPosixVariableSubstitutions +# if !HasBsdMake && !defined(SunArchitecture) +# define MakeHasPosixVariableSubstitutions NO +# else +# define MakeHasPosixVariableSubstitutions YES +# endif +#endif + +/* Server defines required for all OSs */ +#ifndef XFree86ServerDefines +# define XFree86ServerDefines -DAVOID_GLYPHBLT -DPIXPRIV -DSINGLEDEPTH \ + XFree86XvDefines \ + -DXFree86Server \ + XFree86XvMCDefines \ + DebugDefines XFree86XResDefines \ + -DX_BYTE_ORDER=$(X_BYTE_ORDER) \ + VersionDefines +#endif + +#ifndef XFree86ServerOSDefines +# define XFree86ServerOSDefines -DDDXOSINIT -DSERVER_LOCK -DDDXOSFATALERROR \ + -DDDXOSVERRORF +#endif + +#ifndef XFree86ConsoleDefines +# if defined(i386BsdArchitecture) || defined(AlphaBsdArchitecture) || (defined(KFreeBSDArchitecture) && defined(i386Architecture)) +# define XFree86ConsoleDefines -DPCCONS_SUPPORT -DSYSCONS_SUPPORT -DPCVT_SUPPORT +# elif defined(KFreeBSDArchitecture) +# define XFree86ConsoleDefines -DSYSCONS_SUPPORT +# else +# define XFree86ConsoleDefines /**/ +# endif +#endif + +/* Support for USB mouse */ +#ifndef UsbMouseSupport +# define UsbMouseSupport NO +#endif +/* Does this OS have libusb ? */ +#ifndef HasLibUsb +# define HasLibUsb NO +#endif + +#ifndef UseServerLock +# define UseServerLock YES +#endif + +#ifndef ServerExtraDefines +# define ServerExtraDefines XFree86ServerDefines +#endif + +#ifndef ServerOSDefines +# define ServerOSDefines XFree86ServerOSDefines +#endif + +#ifndef DriverSDKDir +# define DriverSDKDir $(USRLIBDIR)/Server +#endif + +#ifndef DriverSDKModuleDir +# define DriverSDKModuleDir $(USRLIBDIR)/Server/modules +#endif + +#ifndef DriverSDKIncludeDir +# define DriverSDKIncludeDir $(USRLIBDIR)/Server/include +#endif + +DRIVERSDKDIR = DriverSDKDir +DRIVERSDKMODULEDIR = DriverSDKModuleDir +DRIVERSDKINCLUDEDIR = DriverSDKIncludeDir + +/* + * Some commonly refered to directories are defined here. + */ + + XF86SRC = $(SERVERSRC)/hw/xfree86 + XF86COMSRC = $(XF86SRC)/common + XF86PARSERSRC = $(XF86SRC)/parser + XF86OSSRC = $(XF86SRC)/os-support + XF86DRIVERSRC = $(XF86SRC)/drivers + DRIVERSRC = $(XF86DRIVERSRC) + +/* + * Installed location of the XFree86 documentation + */ + + XFREE86DOCDIR = $(DOCDIR) + XFREE86PSDOCDIR = $(DOCPSDIR) + XFREE86PDFDOCDIR = $(DOCPDFDIR) + XFREE86HTMLDOCDIR = $(DOCHTMLDIR) +XFREE86JAPANESEDOCDIR = $(DOCDIR)/Japanese + +/* + * Other stuff used in the X Server source. + */ + +#ifndef OtherIConfigFiles +# define OtherIConfigFiles $(IRULESRC)/xf86.rules +#endif + +#ifndef ManSuffix +# define ManSuffix 1 +#endif + +/* + * GNU Compiler stuff + */ +#ifndef HasGcc3 +# define HasGcc3 NO +#endif +#ifndef HasGcc2 +# define HasGcc2 HasGcc3 +#endif +#ifndef HasGcc +# define HasGcc HasGcc2 +#endif +#ifndef HasGcc2ForCplusplus +# define HasGcc2ForCplusplus HasGcc2 +#endif + +#if HasGcc +# ifndef Gcc28Warnings +# if (GccMajorVersion > 2) || \ + ((GccMajorVersion == 2) && (GccMinorVersion >= 8)) +# define Gcc28Warnings -Wundef +# else +# define Gcc28Warnings /* */ +# endif +# ifndef HasGcc34 +# if (((GccMajorVersion == 3) && (GccMinorVersion >= 4)) || \ + (GccMajorVersion > 3)) +# define HasGcc34 YES +# else +# define HasGcc34 NO +# endif +# endif +# endif +# ifndef GccWarningOptions +# if XFree86Devel +# define GccWarningOptions -Wall -Wpedantic -Wpointer-arith -Wstrict-prototypes \ + -Wmissing-prototypes -Wmissing-declarations \ + -Wredundant-decls -Wnested-externs Gcc28Warnings +# else +# define GccWarningOptions -Wall -Wpedantic -Wpointer-arith Gcc28Warnings +# endif +# endif +# ifndef DefaultCCOptions +# if defined(UseInstalled) +# define DefaultCCOptions /* -std=c99 */ +# else +# define DefaultCCOptions -std=c99 GccWarningOptions +# endif +# endif +# if defined(UseInstalled) +# ifndef UseGccMakeDepend +# define UseGccMakeDepend YES +# endif +# endif +#endif + +/* Make imake noisier. Note that this is ineffective for 3.0 <= GCC <= 3.2 */ +#ifndef ImakeWarningFlags +# ifdef Gcc28Warnings +# define ImakeWarningFlags Gcc28Warnings +# else +# define ImakeWarningFlags /* */ +# endif +#endif + +#if ((GccMajorVersion == 3) && (GccMinorVersion >= 1)) || (GccMajorVersion > 3) +# define GccAliasingArgs -fno-strict-aliasing +#else +# define GccAliasingArgs /* */ +#endif + +#if HasGcc2 && defined(i386Architecture) +# ifndef DefaultGcc2i386Opt +# define DefaultGcc2i386Opt -O2 -fno-strength-reduce GccAliasingArgs +# endif +#endif + +#if HasGcc2 && defined(AMD64Architecture) +# ifndef DefaultGcc2AMD64Opt +# define DefaultGcc2AMD64Opt -O2 -fno-strength-reduce GccAliasingArgs +# endif +#endif + +#if HasGcc2 && defined(AlphaArchitecture) +# ifndef DefaultGcc2AxpOpt +# define DefaultGcc2AxpOpt -O2 GccAliasingArgs +# endif +#endif + +#if HasGcc2 && defined(Ppc64Architecture) +# ifndef DefaultGcc2Ppc64Opt +# define DefaultGcc2Ppc64Opt -O2 GccAliasingArgs +# endif +#endif + +#if HasGcc2 && defined(MipsArchitecture) +# ifndef DefaultGcc2MipsOpt +# define DefaultGcc2MipsOpt -O2 GccAliasingArgs +# endif +#endif + +#if HasGcc2 && defined(PpcArchitecture) +# ifndef DefaultGcc2PpcOpt +# define DefaultGcc2PpcOpt -O2 GccAliasingArgs +# endif +#endif + +#ifndef DefaultGcc2DebugOpt +# define DefaultGcc2DebugOpt -g +#endif + +#ifndef DebuggableLibraries +# define DebuggableLibraries NO +#endif + +#if HasGcc2 && DebuggableLibraries +# define LibraryDebugOpt DefaultGcc2DebugOpt +#endif + +/* + * Some versions of gcc have optimisation bugs that cause problems building + * some files. The definitions here cover those. + */ + +#ifndef Egcs112Bug + /* Not exactly precise, but it'll do for now... */ +# if HasGcc2 && defined(i386Architecture) && \ + (GccMajorVersion == 2) && (GccMinorVersion > 8) +# define Egcs112Bug YES +# else +# define Egcs112Bug NO +# endif +#endif + +#ifdef i386Architecture +# ifndef HasX86Support +# define HasX86Support YES +# endif +# ifndef HasMMXSupport +# define HasMMXSupport YES +# endif +# ifndef HasSSESupport +# define HasSSESupport NO +# endif +# ifndef Has3DNowSupport +# define Has3DNowSupport NO +# endif +#elif defined (AMD64Architecture) +# ifndef HasX86Support +# define HasX86Support NO +# endif +# ifndef HasMMXSupport +# define HasMMXSupport NO +# endif +# ifndef HasSSESupport +# define HasSSESupport NO +# endif +# ifndef Has3DNowSupport +# define Has3DNowSupport NO +# endif +#else +# ifndef HasX86Support +# define HasX86Support NO +# endif +# ifndef HasMMXSupport +# define HasMMXSupport NO +# endif +# ifndef HasSSESupport +# define HasSSESupport NO +# endif +# ifndef Has3DNowSupport +# define Has3DNowSupport NO +# endif +#endif + +#ifndef StaticNeedsPicForShared +# if defined (AMD64Architecture)\ + || defined (AlphaArchitecture) \ + || defined (ia64Architecture) \ + || defined (PpcArchitecture) \ + || defined (SparcArchitecture) \ + || defined (s390xArchitecture) +# define StaticNeedsPicForShared YES +# else +# define StaticNeedsPicForShared NO +# endif +#endif + +#if (defined(SparcArchitecture) || defined(Sparc64Architecture)) \ + && !defined(LargePositionIndependentCFlags) \ + && defined(HasGcc) +# define LargePositionIndependentCFlags -fPIC +#endif + + +#ifndef XF8_32Wid +# define XF8_32Wid NO +#endif + +#if CrossCompiling +#include <cross.def> +#endif +#include <xf86.rules> diff --git a/nx-X11/config/cf/xorg.tmpl b/nx-X11/config/cf/xorg.tmpl new file mode 100644 index 000000000..2737ebdf9 --- /dev/null +++ b/nx-X11/config/cf/xorg.tmpl @@ -0,0 +1,67 @@ +#ifndef ConfigDefines +# define ConfigDefines -D__XCONFIGFILE__='"$(XCONFIGFILE)"' \ + -D__XCONFIGDIR__='"$(XCONFIGDIR)"' -D__XLOGFILE__='"$(XLOGFILE)"' \ + -D__XSERVERNAME__='"$(XSERVERNAME)"' +#endif + +CONFIG_DEFINES = ConfigDefines + +#ifndef ServerDefines +#define ServerDefines StandardDefines VersionDefines +#endif + +#ifdef BuilderEMailAddr +BUILDERADDR = BuilderEMailAddr +#else +BUILDERADDR = "xorg@lists.freedesktop.org" +#endif +#ifdef VendorSupportAddress + VENDORSUPPORT = VendorSupportAddress + BUGMSG = -DBUILDERADDR='$(BUILDERADDR)' -DVENDORSUPPORT='$(VENDORSUPPORT)' +#else + BUGMSG = -DBUILDERADDR='$(BUILDERADDR)' +#endif + +#if defined(XF86DriverSDK) + BUILDMODULEDIR = $(DRIVERSDKMODULEDIR) + BUILDMODULETOP = .. + TOP_INCLUDES = TopIncludes + IMAKE_DEFINES = -DXF86DriverSDK=1 +#ifdef UseInstalled + IMAKE_CMD = $(IMAKE) -DUseInstalled -I$(TOP) -I$(IRULESRC) \ + $(IMAKE_DEFINES) $(IMAKE_WARNINGS) +#else + IMAKE_CMD = $(IMAKE) -I$(TOP) -I$(IRULESRC) \ + $(IMAKE_DEFINES) $(IMAKE_WARNINGS) +#endif + +#undef ImakeSubCmdHelper +#ifdef UseInstalled +#define ImakeSubCmdHelper $(IMAKE) -DUseInstalled -I$(IMAKETOP) \ + -I$(IRULESRC) $(IMAKE_DEFINES) $(IMAKE_WARNINGS) +#else +#define ImakeSubCmdHelper $(IMAKEPREFIX)$(IMAKE) -I$(IMAKETOP) \ + $(IMAKE_DEFINES) $(IMAKE_WARNINGS) \ + -I$(IMAKEPREFIX)$(IRULESRC) +#endif +#endif + +#ifndef JoystickSupport +#define JoystickSupport NO +#endif + +/* + * Module support: These overrides must be here, not in xf86.rules, + * because they will replace rules after having seen the first lines + * of Imakefile (include <Server.tmpl>) + */ + +#ifndef ProPoliceSupport +#define ProPoliceSupport O +#endif + +#ifndef HasGccMergeConstants +#define HasGccMergeConstants NO +#endif + +MODULE_CFLAGS = $(MODULE_PIC_FLAGS) $(MODULE_GCC_FLAGS) diff --git a/nx-X11/config/cf/xorgsite.def b/nx-X11/config/cf/xorgsite.def new file mode 100644 index 000000000..f735495f8 --- /dev/null +++ b/nx-X11/config/cf/xorgsite.def @@ -0,0 +1,378 @@ +/******************************************************************************/ +/* + * This file is to provide a quick method for most people to change the + * behaviour of their Xorg installation without having to fully + * understand the workings of site.def and all the various '.cf' files. + * + * In the vast majority of cases, it should not be necessary to use this + * file at all or change it in any way. + * + * This file is divided into two sections. The first contains settings + * that end-users might reasonably change. The second contains settings + * that developers might want to change. + * + * IMPORTANT NOTE: In all cases changing the defaults may cause problems + * and/or unexpected side-effects. If you don't understand what a setting + * does, then it's best to not change it. If you make changes and have + * problems, verify that those problems are also present when using an + * empty host.def file and unchanged version of this file before reporting + * them. + * + * A good way to use this file is to copy it to host.def, and make the + * changes there. That way, future patches to this file won't fail. + * The host.def file will never be patched. + * + * The distributed version of this file MUST contain no uncommented + * definitions. Default definitions belong in xorg.cf, or <vendor>.cf + * files. + */ +/******************************************************************************/ + +/* + * If you have build-specific modifications in your host.def file, but + * want an empty host.def file installed when doing 'make install', + * uncomment the following + * +#define InstallEmptyHostDef + */ + +/* + * Which servers to build. There is only Xorg server. + * It can be disabled by the following. + * +#define XorgServer NO + */ + +/* + * Set the default server (ie the one that gets the sym-link to "X") + * +#define ServerToInstall Xorg + */ + +/* + * Server configuration parameters. The defaults are shown here: + */ + +/* + * Select the XInput devices you want by uncommenting this. + * +#define XInputDrivers mouse keyboard acecad calcomp citron \ + digitaledge dmc dynapro elographics \ + microtouch mutouch penmount spaceorb summa \ + wacom void magictouch aiptek + */ + +/* + * To use the deprecated, old keyboard driver, uncomment this. But + * even better, make the new keyboard driver (hw/xfree86/input/keyboard) + * work for your architechture. The old driver will be removed in the + * next release. + * +#define UseDeprecatedKeyboardDriver YES + */ + +/* + * To build only the servers with a cut-down source tree, uncomment + * this. + * +#define BuildServersOnly YES + */ + +/* + * Undefine the following if you don't want to have config files and + * app-defaults installed in a separate directory (i.e. /etc/X11). + * +#define UseSeparateConfDir NO + */ + +/* + * Unless you're a developer you shouldn't need to change anything + * beyond this point. + */ + +/* + * If you want to enable some developer settings, like more verbose + * compiler warnings, uncomment this. + * +#define XFree86Devel YES +*/ + +/* + * The default optimisation flags for GCC 2.x. -fno-strength-reduce is + * here to work around a bug in -O2 for GCC 2.x on i386 platforms. + * If you are using a version that doesn't have this bug, you can + * uncomment the following line, and remove '-fno-strength-reduce' + * If you are building binaries for a 486, it may be beneficial to add + * -m486 + * +#define DefaultGcc2i386Opt -O2 -fno-strength-reduce + */ + +/* + * This allows the GCC warning flags to be set. The default is shown here. + * +#define GccWarningOptions -Wall -Wpedantic -Wpointer-arith -Wstrict-prototypes \ + -Wmissing-prototypes -Wmissing-declarations \ + -Wredundant-decls -Wnested-externs + */ + +/* + * Sun Compiler stuff.. + * +#define HasSunC YES +#define HasSunCplusplus YES +#define CplusplusCompilerMajorVersion 5 +#define CplusplusCompilerMinorVersion 0 +#define CCompilerMajorVersion 5 +#define CCompilerMinorVersion 0 + */ + +/* + * Optimized Sun Compiler Build. + * +#define DefaultCDebugFlags -xO4 -xtarget=pentium_pro +#define OptimizedCDebugFlags -xO4 -xtarget=pentium_pro + */ + +/* + * Debuggable Sun Compiler Build. + * Note: This builds _EVERYTHING_ as debuggable + * +#define DefaultCDebugFlags -g -xs +#define OptimizedCDebugFlags -g -xs + */ + +/* + * For Linux, this should match the Binutils version you have. This example + * is for 2.6.0.7. See linux.cf for the default setting. + * + * This should automatically get set correctly by imake. + * +#define LinuxBinUtilsMajorVersion 26 + */ + +/* + * For Linux, these should match the libc version you have. This example + * is for libc.5.4.x. See linux.cf for the default setting. + * + * This should automatically get set correctly by imake. + * +#define LinuxCLibMajorVersion 5 +#define LinuxClibMinorVersion 4 + */ + +/* + * Some Linux releases don't have a libtermcap. In this case you may need + * to uncomment the following + * +#define TermcapLibrary -lncurses + */ + +/* + * Build XAA. This can be disabled with: + * +#define XF86XAA NO + */ + +/* + * Build vgahw. This can be disabled with: + * +#define XF86VgaHw NO + */ + +/* + * Build xf1bpp. This can be disabled with: + * +#define XF1Bpp NO + */ + +/* + * Build xf4bpp. This can be disabled with: + * +#define XF4Bpp NO + */ + + +/* + * BSD Console driver support (for FreeBSD and NetBSD). + * + * By default, support is included for pccons and pcvt for NetBSD, and + * pccons, syscons and pcvt for FreeBSD. + * + * To change the list of supported drivers, set the following parameter. + * Possible values are -DPCCONS_SUPPORT, -DSYSCONS_SUPPORT, -DPCVT_SUPPORT. + * The following example includes support for syscons and pcvt only. + * +#define XFree86ConsoleDefines -DSYSCONS_SUPPORT -DPCVT_SUPPORT + */ + +/* + * To disable building XInput support, uncomment this + * +#define BuildXInputExt NO + */ + +/* + * Uncomment this for joystick support. + * + * Note: Joystick support is broken, so don't enable this. + * +#define JoystickSupport YES + */ + +/* + * To disable the ScreenSaver Extension, uncomment this line. + * +#define BuildScreenSaverExt NO + */ + +/* + * If you don't want to build Xinerama support, uncomment this. + * +#define BuildXinerama NO + */ + +/* + * If you don't want to build support for the GLX extension, uncomment this. + * +#define BuildGlxExt NO + */ + +/* + * If you are running NetBSD 0.9C or later, and have the aperture driver + * installed, uncomment this. + * +#define HasNetBSDApertureDriver YES + */ + +/* + * If you are running SVR3 and have the mmap driver installed (for linear + * framebuffer access) uncomment this. + * +#define HasSVR3mmapDrv YES + */ + +/* + * If you are using an SVR3 (like ISC 4.x) which supports long file names, + * you can uncomment this to have manual pages installed under their + * full names + * +#define ExpandManNames YES + */ + +/* + * For a POSIXized build on Interactive uncomment this + * Could be used with gcc 'till Version 2.6.3 + * Should be used with gcc 2.7.2. + * +#define UsePosix YES + */ + +/* + * If you don't want XDMAUTH support (if you don't have Wraphelp.c), + * comment this out. + * + */ +#define HasXdmAuth YES + +/* + * To build static and shared libraries with debugging information, uncomment + * this. Assumes you have Gcc2. + * (If you don't have Gcc2, you can use the DebugLib{X11,...} variables + * to build debugging versions of the libraries separately.) + * +#define DebuggableLibraries YES +*/ + +/* + * To forceably build static libraries in addition to shared libraries, + * uncomment this. + * +#define ForceNormalLib YES + */ + +/* + * Uncomment this if your default tools (eg, gcc, ld, as, etc) are + * not the Linux ELF versions. + * +#define LinuxElfDefault NO + */ + +/* + * To use ELF format shared libraries for supported OSs, uncomment this. + * + * For Linux the default setting of this is the same as the setting of + * LinuxElfDefault. + * + * For FreeBSD this should automatically be set correctly by imake. Only + * change it here if you need to override the automatic setting. + * +#define UseElfFormat YES + */ + +/* + * For FreeBSD/ELF (FreeBSD 3.0) it is possible to also build and install + * a.out compatibility libraries. To enable that, uncomment this. + * +#define BuildAoutLibraries YES + */ + +/* + * If you have trouble with make bombing out in Xlib, try uncommenting this. + * You will not get dependencies as a result, but better than nothing. + * +#define MakeHashTableBug YES + */ + +/* + * If you do not want your man pages compress under SVR3 systems that + * support it, uncomment this. + * +#define CompressManPages NO + */ + +/* + * If you have sgmlfmt (the XFree86 doctools package) and want to build + * formatted docs from the SGML source, uncomment this. + * +#define HasSgmlFmt YES + */ + +/* + * To disable building some document formats, uncomment some of these. + * +#define BuildLinuxDocText NO +#define BuildLinuxDocHtml NO +#define BuildLinuxDocPS NO + */ + +/* + * To install Japanese versions of the documentation uncomment this. + * Note: The Japanese documentation consists of a subset of the + * XFree86 3.1 docs. + * +#define InstallJapaneseDocs YES + */ + +/* + * To build/install X specs docs, uncomment the following. + * The SpecsDocDirs setting here is recommended because it covers + * the docs that XFree86 has changed or added. + * +#define BuildSpecsDocs YES +#define SpecsDocDirs CTEXT GL ICCCM X11 Xext Xmu Xv XvMC i18n + */ + +/* + * To build all specs docs, not just those listed in SpecsDocDirs, uncomment + * the following. + * +#define BuildAllSpecsDocs YES + */ + +/* + * If your system doesn't support vm86() mode and you have + * libx86emu set library path here + * +#define X86EMU_LIBPATH /usr/local/lib + */ diff --git a/nx-X11/config/cf/xorgversion.def b/nx-X11/config/cf/xorgversion.def new file mode 100644 index 000000000..f630100fa --- /dev/null +++ b/nx-X11/config/cf/xorgversion.def @@ -0,0 +1,5 @@ +#define XORG_VERSION_MAJOR 6 +#define XORG_VERSION_MINOR 9 +#define XORG_VERSION_PATCH 0 +#define XORG_VERSION_SNAP 0 +#define XORG_DATE "21 December 2005" |