1/* 2 * generic imake template 3 */ 4 5#ifndef XCOMM 6#define XCOMM # 7#endif 8XCOMM ------------------------------------------------------------------------- 9XCOMM Makefile generated from IMAKE_TEMPLATE and INCLUDE_IMAKEFILE 10XCOMM $XFree86: mit/config/Imake.tmpl,v 2.6 1993/10/02 07:11:59 dawes Exp $ 11XCOMM $XConsortium: Imake.tmpl,v 1.139 91/09/16 08:52:48 rws Exp $ 12XCOMM 13XCOMM Platform-specific parameters may be set in the appropriate <vendor>.cf 14XCOMM configuration files. Site-specific parameters should be set in the file 15XCOMM site.def. Full rebuilds are recommended if any parameters are changed. 16XCOMM 17XCOMM If your C preprocessor does not define any unique symbols, you will need 18XCOMM to set BOOTSTRAPCFLAGS when rebuilding imake (usually when doing 19XCOMM "make World" the first time). 20XCOMM 21 22#define YES 1 23#define NO 0 24 25 26/* 27 * To add support for another platform: 28 * 29 * 1. Identify a machine-specific cpp symbol. If your preprocessor 30 * does not have any built in, you will need to add the symbol to the 31 * cpp_argv table in config/imakemdep.h and rebuild imake with the 32 * BOOTSTRAPCFLAGS variable set (see the macII for an example). 33 * 34 * 2. Add all machine-specific cpp symbols (either defined by you or by 35 * the preprocessor or compiler) to the predefs table in 36 * config/imakemdep.h. 37 * 38 * 3. But a new #ifdef block below that defines MacroIncludeFile and 39 * MacroFile for your new platform and then #undefs the machine- 40 * specific preprocessor symbols (to avoid problems with file names). 41 * 42 * 4. Create a .cf file with the name given by MacroFile. 43 */ 44 45#ifndef INCLUDE_PLATFORM 46#define INCLUDE_PLATFORM <noop.rules> 47#endif 48#include INCLUDE_PLATFORM 49 50#ifndef MacroIncludeFile 51/* If INCLUDE_PLATFORM was included, both MacroFile and MacroIncludeFile 52 * will already be defined. 53 */ 54 55#ifdef ultrix 56#define MacroIncludeFile <ultrix.cf> 57#define MacroFile ultrix.cf 58#ifdef vax 59#undef vax 60#define VaxArchitecture 61#endif 62#ifdef mips 63#undef mips 64#define MipsArchitecture 65#endif 66#undef ultrix 67#define UltrixArchitecture 68#endif 69 70#if defined(vax) && !defined(UltrixArchitecture) 71#define MacroIncludeFile <bsd.cf> 72#define MacroFile bsd.cf 73#undef vax 74#define VaxArchitecture 75#endif 76 77#ifdef sun 78#define MacroIncludeFile <sun.cf> 79#define MacroFile sun.cf 80#undef sun 81#define SunArchitecture 82#endif /* sun */ 83 84#ifdef hpux 85#define MacroIncludeFile <hp.cf> 86#define MacroFile hp.cf 87#undef hpux 88#define HPArchitecture 89#endif /* hpux */ 90 91#ifdef att 92#define MacroIncludeFile <att.cf> 93#define MacroFile att.cf 94#undef att 95#define ATTArchitecture 96#endif /* att */ 97 98#ifdef apollo 99#define MacroIncludeFile <apollo.cf> 100#define MacroFile apollo.cf 101#undef apollo 102#define ApolloArchitecture 103#endif /* apollo */ 104 105#ifdef sony 106#define MacroIncludeFile <sony.cf> 107#define MacroFile sony.cf 108#undef sony 109#undef sony_news 110#define SonyArchitecture 111#ifdef mc68020 112#undef mc68020 113#undef mc68030 114#define Mc68020Architecture 115#endif 116#ifdef mips 117#undef mips 118#define MipsArchitecture 119#endif 120#if !defined(bsd43) || defined(SYSTYPE_SYSV) 121#define SonySysvArchitecture 122#else 123#define SonyBsdArchitecture 124#endif 125#endif /* sony */ 126 127#ifdef M4310 128#define MacroIncludeFile <pegasus.cf> 129#define MacroFile pegasus.cf 130#undef M4310 131#define PegasusArchitecture 132#endif /* M4310 */ 133 134#ifdef M4330 135#define MacroIncludeFile <m4330.cf> 136#define MacroFile m4330.cf 137#undef M4330 138#define M4330Architecture 139#endif /* M4330 */ 140 141#ifdef macII 142/* A/UX cpp has no unique symbol: build imake with BOOTSTRAPCFLAGS=-DmacII */ 143#define MacroIncludeFile <macII.cf> 144#define MacroFile macII.cf 145#undef macII 146#define MacIIArchitecture 147#endif /* macII */ 148 149#ifdef CRAY 150#define MacroIncludeFile <cray.cf> 151#define MacroFile cray.cf 152#undef cray 153#define CrayArchitecture 154#endif /* CRAY */ 155 156#ifdef sgi 157#define MacroIncludeFile <sgi.cf> 158#define MacroFile sgi.cf 159#undef sgi 160#define SGIArchitecture 161#undef mips 162#define MipsArchitecture 163#endif 164 165#ifdef stellar 166#define MacroIncludeFile <stellar.cf> 167#define MacroFile stellar.cf 168#undef stellar 169#define StellarArchitecture 170#endif 171 172#if defined(ibm) || defined(_IBMR2) || defined(ibm032) || defined(aix) 173#define MacroIncludeFile <ibm.cf> 174#define MacroFile ibm.cf 175#ifdef ibm 176#undef ibm 177#endif 178#define IBMArchitecture 179#ifdef i386 180#undef i386 181#define PS2Architecture 182#endif 183#ifdef ibm032 184#undef ibm032 185#define RtArchitecture 186#endif 187#ifdef aix 188#undef aix 189#define AIXArchitecture 190#endif 191#ifdef _IBMR2 192#undef _IBMR2 193#define RsArchitecture 194#endif 195#endif /* ibm */ 196 197#ifdef luna 198#undef luna 199#define MacroIncludeFile <luna.cf> 200#define MacroFile luna.cf 201#ifdef mc68000 202#undef mc68000 203#define Mc68000Architecture 204#else 205#undef mc88000 206#define Mc88000Architecture 207#endif 208#endif 209 210#ifdef Mips 211# define MacroIncludeFile "Mips.cf" 212# define MacroFile Mips.cf 213# undef Mips 214# if defined(SYSTYPE_BSD43) || defined(BSD) || defined(BSD43) 215# define MipsBsdArchitecture 216# else /* BSD */ 217# define MipsSysvArchitecture 218# endif /* BSD */ 219#endif /* Mips */ 220 221#ifdef MOTOROLA 222# define MacroIncludeFile <moto.cf> 223# define MacroFile moto.cf 224# undef MOTOROLA 225# ifdef SYSV 226# define MotoR3Architecture 227# endif 228# ifdef SVR4 229# define MotoR4Architecture 230# endif 231#endif /* MOTOROLA */ 232 233#ifdef SYSV386 234# define MacroIncludeFile <x386.cf> 235# define MacroFile x386.cf 236# undef i386 237# ifdef SVR4 238# undef SVR4 239# define i386SVR4Architecture 240# ifdef NCR 241# define i386Ncr 242# undef NCR 243# endif 244# else 245# define i386SVR3Architecture 246# ifdef SCO 247# define i386Sco 248# undef SCO 249# ifdef SCO324 250# define ScoVersion 324 251# undef SCO324 252# else 253# define ScoVersion 322 254# endif /* SCO324 */ 255# endif /* SCO */ 256# ifdef ISC 257# define i386Isc 258# undef ISC 259# ifdef ISC202 260# define IscVersion 202 261# undef ISC202 262# else 263# ifdef ISC30 264# define IscVersion 300 265# undef ISC30 266# else 267# ifdef ISC40 268# define IscVersion 400 269# undef ISC40 270# else 271# define IscVersion 221 272# endif /* ISC40 */ 273# endif /* ISC30 */ 274# endif /* ISC202 */ 275# endif /* ISC */ 276# ifdef ESIX 277# define i386Esix 278# undef ESIX 279# endif /* ESIX */ 280# ifdef ATT 281# define i386Att 282# undef ATT 283# endif /* ATT */ 284# endif /* SVR4 */ 285#endif /* SYSV386 */ 286 287#if defined(__386BSD__) || defined(__NetBSD__) 288# define MacroIncludeFile <x386.cf> 289# define MacroFile x386.cf 290# define i386BsdArchitecture 291# undef __386BSD__ 292# ifdef __NetBSD__ 293# define i386NetBsd 294# undef __NetBSD__ 295# endif /* __NetBSD */ 296# ifdef NetBSD 297# undef NetBSD 298# endif /* NetBSD */ 299# ifdef FreeBSD 300# define i386FreeBsd 301# undef FreeBSD 302# endif /* FreeBSD */ 303#endif /* __386BSD__ || __NetBSD__ */ 304 305#ifdef __bsdi__ 306# define MacroIncludeFile <x386.cf> 307# define MacroFile x386.cf 308# define i386BsdArchitecture 309# define i386Bsdi 310# undef __bsdi__ 311# ifdef bsdi 312# undef bsdi 313# endif /* bsdi */ 314#endif /* __bsdi__ */ 315 316#if defined(__OSF__) || defined(OSF) 317# define MacroIncludeFile <x386.cf> 318# define MacroFile x386.cf 319# define OsfArchitecture 320# undef OSF 321#endif 322 323#ifdef DGUX 324#define MacroIncludeFile <DGUX.cf> 325#define MacroFile DGUX.cf 326#undef DGUX 327#define DguxArchitecture 328#endif 329 330#ifdef __convex__ 331# define MacroIncludeFile <convex.cf> 332# define MacroFile convex.cf 333# ifdef convex 334# undef convex 335# endif 336# define ConvexArchitecture 337#endif 338 339#ifdef linux 340# define MacroIncludeFile <x386.cf> 341# define MacroFile x386.cf 342# undef linux 343# define LinuxArchitecture 344#endif /* linux */ 345 346#ifdef MACH 347# ifdef i386 348# undef i386 349# define i386MachArchitecture 350# define i386Mach_BsdTree 351# define MacroIncludeFile <x386.cf> 352# define MacroFile x386.cf 353# endif 354# ifdef CMU 355# undef CMU 356# endif 357#endif 358 359#ifndef MacroIncludeFile 360XCOMM WARNING: Imake.tmpl not configured; guessing at definitions!!! 361XCOMM This might mean that BOOTSTRAPCFLAGS was not set when building imake. 362#define MacroIncludeFile <generic.cf> 363#define MacroFile generic.cf 364#endif 365 366#endif /* MacroIncludeFile */ 367 368/***************************************************************************** 369 * * 370 * DO NOT MODIFY BELOW THIS LINE * 371 * * 372 *****************************************************************************/ 373 374 375XCOMM ------------------------------------------------------------------------- 376XCOMM site-specific configuration parameters that need to come before 377XCOMM the platform-specific parameters - edit site.def to change 378#define BeforeVendorCF 379#include <site.def> 380#undef BeforeVendorCF 381 382XCOMM ------------------------------------------------------------------------- 383XCOMM platform-specific configuration parameters - edit MacroFile to change 384#include MacroIncludeFile 385 386/* It is a kludge to put these two macros here, 387 * but Project.tmpl needs them and it is not clear there is a better place. 388 */ 389 390/* 391 * Concat - concatenates two strings. 392 */ 393#ifndef Concat 394#if __STDC__ && !defined(UnixCpp) 395#define Concat(a,b)a##b 396#else 397#define Concat(a,b)a/**/b 398#endif 399#endif 400 401/* 402 * Concat3 - concatenates three strings. 403 */ 404#ifndef Concat3 405#if __STDC__ && !defined(UnixCpp) 406#define Concat3(a,b,c)a##b##c 407#else 408#define Concat3(a,b,c)a/**/b/**/c 409#endif 410#endif 411 412XCOMM ------------------------------------------------------------------------- 413XCOMM site-specific configuration parameters that go after 414XCOMM the platform-specific parameters - edit site.def to change 415#define AfterVendorCF 416#include <site.def> 417#undef AfterVendorCF 418 419/* 420 * defaults for various generic parameters; set in site.def if needed 421 */ 422 423#ifndef HasSharedLibraries 424#define HasSharedLibraries NO 425#endif 426#ifndef SystemV 427#define SystemV NO /* SYSV (R3) */ 428#endif 429#ifndef SystemV4 430#define SystemV4 NO /* SVR4 */ 431#endif 432#ifndef i386Bsd 433#define i386Bsd NO 434#endif 435#ifndef i386Mach 436#define i386Mach NO 437#endif 438#ifndef OSMajorVersion 439#define OSMajorVersion 0 440#endif 441#ifndef OSMinorVersion 442#define OSMinorVersion 0 443#endif 444#ifndef UnalignedReferencesAllowed 445#define UnalignedReferencesAllowed NO /* if arbitrary deref is okay */ 446#endif 447#ifndef ExecableScripts 448#if SystemV 449#define ExecableScripts NO 450#else 451#define ExecableScripts YES /* kernel exec() can handle #! */ 452#endif 453#endif 454 455#ifndef BourneShell /* to force shell in makefile */ 456#define BourneShell /bin/sh 457#endif 458#ifndef ConstructMFLAGS 459#if SystemV 460#define ConstructMFLAGS YES /* build MFLAGS from MAKEFLAGS */ 461#else 462#define ConstructMFLAGS NO /* build MFLAGS from MAKEFLAGS */ 463#endif 464#endif 465 466#ifndef HasLargeTmp 467#define HasLargeTmp NO /* be paranoid */ 468#endif 469#ifndef HasSockets 470#if SystemV || SystemV4 471#define HasSockets NO /* do not assume it has them */ 472#else 473#define HasSockets YES /* bsd does have them */ 474#endif 475#endif 476#ifndef HasVFork 477#if SystemV 478#define HasVFork NO /* not yet... */ 479#else 480#define HasVFork YES 481#endif 482#endif 483#ifndef HasPutenv 484#define HasPutenv NO /* assume not */ 485#endif 486#ifndef HasVoidSignalReturn 487#define HasVoidSignalReturn YES /* assume yes */ 488#endif 489#ifndef HasBsearch 490#define HasBsearch YES /* assume yes */ 491#endif 492#ifndef HasSaberC 493#define HasSaberC NO /* for people unclear on the concept */ 494#endif 495#ifndef HasFortran 496#define HasFortran NO 497#endif 498#ifndef HasNdbm 499#define HasNdbm NO 500#endif 501#ifndef HasSecureRPC 502#define HasSecureRPC NO /* if you have Secure RPC */ 503#endif 504#ifndef HasShm 505#if SystemV || SystemV4 506#define HasShm YES 507#else 508#define HasShm NO 509#endif 510#endif 511#ifndef NeedConstPrototypes 512#define NeedConstPrototypes NO 513#endif 514#ifndef NeedVarargsPrototypes 515#define NeedVarargsPrototypes NO 516#endif 517#ifndef NeedNestedPrototypes 518#define NeedNestedPrototypes NO 519#endif 520#ifndef NeedFunctionPrototypes 521#define NeedFunctionPrototypes (NeedVarargsPrototypes || NeedNestedPrototypes) 522#endif 523#ifndef NeedWidePrototypes 524#define NeedWidePrototypes YES /* mix and match ANSI-C, non-ANSI */ 525#endif 526 527#ifndef StripInstalledPrograms 528#define StripInstalledPrograms NO /* leave symbol table just in case */ 529#endif 530 531#ifndef UsrLibDir 532#ifdef ProjectRoot 533#define UsrLibDir Concat(ProjectRoot,/lib) 534#ifndef AlternateUsrLibDir 535#define AlternateUsrLibDir YES 536#endif 537#else 538#define UsrLibDir /usr/lib 539#ifndef AlternateUsrLibDir 540#define AlternateUsrLibDir NO 541#endif 542#endif 543#else 544#ifndef AlternateUsrLibDir 545#define AlternateUsrLibDir YES 546#endif 547#endif 548#ifndef IncRoot 549#ifdef ProjectRoot 550#define IncRoot Concat(ProjectRoot,/include) 551#ifndef AlternateIncRoot 552#define AlternateIncRoot YES 553#endif 554#else 555#define IncRoot /usr/include 556#ifndef AlternateIncRoot 557#define AlternateIncRoot NO 558#endif 559#endif 560#else 561#ifndef AlternateIncRoot 562#define AlternateIncRoot YES 563#endif 564#endif 565#ifndef UNCOMPRESSPATH 566#define UNCOMPRESSPATH /usr/ucb/uncompress 567#endif 568#ifndef OptimizedCDebugFlags 569#define OptimizedCDebugFlags -O 570#endif 571#ifndef DebuggableCDebugFlags 572#define DebuggableCDebugFlags -g 573#endif 574#ifndef NoOpCDebugFlags 575#define NoOpCDebugFlags /* as nothing */ 576#endif 577#ifndef DefaultCDebugFlags 578#define DefaultCDebugFlags OptimizedCDebugFlags 579#endif 580#ifndef DefaultCCOptions 581#define DefaultCCOptions /* as nothing: this is for floating point, etc. */ 582#endif 583#ifndef AnsiCCOptions 584#define AnsiCCOptions /* as nothing */ 585#endif 586#ifndef InstPgmFlags 587#define InstPgmFlags -s 588#endif 589#ifndef InstBinFlags 590#define InstBinFlags -m 0755 591#endif 592#ifndef InstUidFlags 593#define InstUidFlags -m 4755 594#endif 595#ifndef InstLibFlags 596#define InstLibFlags -m 0644 597#endif 598#ifndef InstIncFlags 599#define InstIncFlags -m 0444 600#endif 601#ifndef InstManFlags 602#define InstManFlags -m 0444 603#endif 604#ifndef InstDatFlags 605#define InstDatFlags -m 0444 606#endif 607#ifndef InstKmemFlags 608#define InstKmemFlags InstUidFlags /* put -g kmem -m 2755 in site.def... */ 609#endif 610#ifndef ArCmd 611#if HasLargeTmp | SystemV4 612#define ArCmd ar cq /* do nothing special */ 613#else 614#define ArCmd ar clq /* use local dir for temp files */ 615#endif 616#endif 617#ifndef BootstrapCFlags 618#define BootstrapCFlags /**/ 619#endif 620#ifndef HasGcc 621#define HasGcc NO 622#endif 623#ifndef CcCmd 624#if HasGcc 625#define CcCmd gcc -fstrength-reduce -fpcc-struct-return 626#else 627#define CcCmd cc 628#endif 629#endif 630#if HasFortran 631#ifndef FortranCmd 632#define FortranCmd f77 633#endif 634#ifndef FortranFlags 635#define FortranFlags /**/ 636#endif 637#ifndef FortranDebugFlags 638#define FortranDebugFlags /**/ /* for -O or -g */ 639#endif 640#endif 641#ifndef AsCmd 642#define AsCmd as 643#endif 644#ifndef YaccCmd 645#define YaccCmd yacc 646#endif 647#ifndef CompressCmd 648#define CompressCmd compress 649#endif 650#ifndef CppCmd 651#define CppCmd /lib/cpp 652#endif 653#ifndef PreProcessCmd 654#define PreProcessCmd CcCmd -E 655#endif 656#ifndef InstallCmd 657#if SystemV | SystemV4 658#ifdef UseInstalled 659#define InstallCmd $(BINDIR)/bsdinst /* hack should be in project */ 660#else 661#define InstallCmd $(SCRIPTSRC)/bsdinst.sh /* hack should be in project */ 662#endif 663#else 664#define InstallCmd install 665#endif 666#endif 667#ifndef LdCmd 668#define LdCmd ld 669#endif 670#ifndef LintCmd 671#define LintCmd lint 672#endif 673#ifndef LintLibFlag 674#if SystemV || SystemV4 675#define LintLibFlag -o 676#else 677#define LintLibFlag -C 678#endif 679#endif 680#ifndef LintOpts 681#if SystemV || SystemV4 682#define LintOpts -ax 683#else 684#define LintOpts -axz 685#endif 686#endif 687#ifndef CpCmd 688#define CpCmd cp 689#endif 690#ifndef LnCmd 691#if SystemV 692#define LnCmd ln /* or even cp */ 693#else 694#define LnCmd ln -s 695#endif 696#endif 697#ifndef MakeCmd 698#define MakeCmd make 699#endif 700#ifndef MvCmd 701#define MvCmd mv 702#endif 703#ifndef DoRanlibCmd 704#if SystemV || SystemV4 705#define DoRanlibCmd 0 706#else 707#define DoRanlibCmd 1 708#endif 709#endif 710#ifndef RanlibCmd 711#define RanlibCmd ranlib 712#endif 713#ifndef RanlibInstFlags 714#define RanlibInstFlags /**/ 715#endif 716#ifndef RmCmd 717#define RmCmd rm -f 718#endif 719#ifndef StandardIncludes 720#define StandardIncludes /**/ /* for platform-specifics */ 721#endif 722#ifndef StandardDefines 723#if SystemV 724#define StandardDefines -DSYSV 725#else 726#if SystemV4 727#define StandardDefines -DSVR4 728#else 729#define StandardDefines /**/ 730#endif 731#endif 732#endif 733#ifndef StandardCppDefines 734#define StandardCppDefines StandardDefines 735#endif 736#ifndef Malloc0ReturnsNull 737#define Malloc0ReturnsNull NO 738#endif 739#ifndef NdbmDefines 740#if HasNdbm 741#define NdbmDefines -DNDBM 742#else 743#define NdbmDefines /**/ 744#endif 745#endif 746#ifndef OSLibraries 747#define OSLibraries /**/ 748#endif 749#ifndef ExtraLibraries 750#if SystemV4 751#if HasSockets 752#define ExtraLibraries -lsocket -lnsl 753#else 754#define ExtraLibraries -lnsl 755#endif 756#else 757#define ExtraLibraries /**/ 758#endif 759#endif 760#ifndef ExtraLoadFlags 761#define ExtraLoadFlags /**/ 762#endif 763#ifndef LdCombineFlags 764#if SystemV4 765#define LdCombineFlags -r 766#else 767#define LdCombineFlags -X -r 768#endif 769#endif 770#ifndef TagsCmd 771#define TagsCmd ctags 772#endif 773#ifndef LoaderLibPrefix 774#define LoaderLibPrefix /**/ /* cray does -l libX11.a */ 775#endif 776#ifndef DependFlags 777#define DependFlags /**/ 778#endif 779#ifndef TroffCmd 780#define TroffCmd psroff 781#endif 782#ifndef MsMacros 783#define MsMacros -ms 784#endif 785#ifndef TblCmd 786#define TblCmd tbl 787#endif 788#ifndef EqnCmd 789#define EqnCmd eqn 790#endif 791#ifndef NroffCmd 792#define NroffCmd nroff 793#endif 794#ifndef NeqnCmd 795#define NeqnCmd neqn 796#endif 797#ifndef ExpandManNames 798#if SystemV 799#define ExpandManNames NO 800#else 801#define ExpandManNames YES 802#endif 803#endif 804#ifndef TOPDIR 805#define TOPDIR . 806#endif 807#ifndef CURDIR 808#define CURDIR . 809#endif 810#ifndef ExtraFilesToClean 811#define ExtraFilesToClean /**/ 812#endif 813#ifndef FilesToClean 814#define FilesToClean *.CKP *.ln *.BAK *.bak *.o core errs ,* *~ *.a .emacs_* tags TAGS make.log MakeOut 815#endif 816#ifdef i386SVR3Architecture 817.NOEXPORT: 818#endif 819 820 SHELL = BourneShell 821 822 TOP = TOPDIR 823 CURRENT_DIR = CURDIR 824 825 AR = ArCmd 826 BOOTSTRAPCFLAGS = BootstrapCFlags /* set if cpp does not have uniq sym */ 827 CC = CcCmd 828 AS = AsCmd 829#ifdef LexCmd 830 LEX = LexCmd 831#endif 832#ifdef YaccCmd 833 YACC = YaccCmd 834#endif 835#if HasFortran 836 FC = FortranCmd 837 FDEBUGFLAGS = FortranDebugFlags 838 FCFLAGS = FortranFlags $(FDEBUGFLAGS) 839#endif 840 COMPRESS = CompressCmd 841 CPP = CppCmd $(STD_CPP_DEFINES) /* simple filters */ 842 PREPROCESSCMD = PreProcessCmd $(STD_CPP_DEFINES) /* prefered; mdep */ 843 INSTALL = InstallCmd 844 LD = LdCmd 845 LINT = LintCmd 846 LINTLIBFLAG = LintLibFlag 847 LINTOPTS = LintOpts 848 LN = LnCmd 849 MAKE = MakeCmd 850 MV = MvCmd 851 CP = CpCmd 852#if DoRanlibCmd 853 RANLIB = RanlibCmd 854 RANLIBINSTFLAGS = RanlibInstFlags 855#endif 856 RM = RmCmd 857 TROFF = TroffCmd 858 MSMACROS = MsMacros 859 TBL = TblCmd 860 EQN = EqnCmd 861 NROFF = NroffCmd 862 NEQN = NeqnCmd 863 STD_INCLUDES = StandardIncludes 864 STD_CPP_DEFINES = StandardCppDefines 865 STD_DEFINES = StandardDefines 866 EXTRA_LOAD_FLAGS = ExtraLoadFlags 867 EXTRA_LIBRARIES = ExtraLibraries 868 OS_LIBRARIES = OSLibraries 869 TAGS = TagsCmd 870#if ConstructMFLAGS 871 MFLAGS = -$(MAKEFLAGS) 872#endif 873#if HasSharedLibraries 874 SHAREDCODEDEF = SharedCodeDef 875 SHLIBDEF = SharedLibraryDef 876#endif 877#if !HasVoidSignalReturn 878 SIGNAL_DEFINES = -DSIGNALRETURNSINT 879#endif 880/* 881 * The following supports forcing of function prototypes 882 */ 883#if NeedFunctionPrototypes && NeedVarargsPrototypes && NeedConstPrototypes && NeedNestedPrototypes 884#define _funcprotodef -DFUNCPROTO=15 885#else 886#if NeedFunctionPrototypes && NeedVarargsPrototypes && NeedNestedPrototypes 887#define _funcprotodef -DFUNCPROTO=11 888#else 889#if NeedFunctionPrototypes && NeedNestedPrototypes 890#define _funcprotodef -DFUNCPROTO=9 891#else 892#if NeedFunctionPrototypes && NeedVarargsPrototypes && NeedConstPrototypes 893#define _funcprotodef -DFUNCPROTO=7 894#else 895#if NeedFunctionPrototypes && NeedConstPrototypes 896#define _funcprotodef -DFUNCPROTO=5 897#else 898#if NeedFunctionPrototypes && NeedVarargsPrototypes 899#define _funcprotodef -DFUNCPROTO=3 900#else 901#if NeedFunctionPrototypes 902#define _funcprotodef -DFUNCPROTO 903#else 904#define _funcprotodef /**/ 905#endif 906#endif 907#endif 908#endif 909#endif 910#endif 911#endif 912#if NeedWidePrototypes 913#define _wideprotodef /**/ 914#else 915#define _wideprotodef -DNARROWPROTO 916#endif 917 PROTO_DEFINES = _funcprotodef _wideprotodef 918#undef _funcprotodef 919#undef _wideprotodef 920 921#if StripInstalledPrograms 922 INSTPGMFLAGS = InstPgmFlags /* install flags for stripping */ 923#else 924 INSTPGMFLAGS = 925#endif 926 INSTBINFLAGS = InstBinFlags /* install flags for programs */ 927 INSTUIDFLAGS = InstUidFlags /* install flags for setuid programs */ 928 INSTLIBFLAGS = InstLibFlags /* install flags for libraries */ 929 INSTINCFLAGS = InstIncFlags /* install flags for headers */ 930 INSTMANFLAGS = InstManFlags /* install flags for man pages */ 931 INSTDATFLAGS = InstDatFlags /* install flags for data files */ 932 INSTKMEMFLAGS = InstKmemFlags /* install flags for /dev/kmem progs */ 933 934#ifdef ProjectRoot 935 PROJECTROOT = ProjectRoot 936#endif 937#ifdef UseInstalled 938#if AlternateIncRoot 939 TOP_INCLUDES = -I$(INCROOT) /* def: for alternative /usr/include */ 940#endif 941#else 942 TOP_INCLUDES = -I$(TOP) /* def: for builds within tree */ 943#endif 944 CDEBUGFLAGS = DefaultCDebugFlags 945 CCOPTIONS = DefaultCCOptions /* to distinguish from param flags */ 946 ANSICCOPTIONS = AnsiCCOptions 947/* 948 * STD_INCLUDES contains system-specific includes 949 * TOP_INCLUDES specifies how to get to /usr/include or its build substitute 950 * EXTRA_INCLUDES contains project-specific includes set in project incfiles 951 * INCLUDES contains client-specific includes set in Imakefile 952 * LOCAL_LDFLAGS contains client-specific ld flags flags set in Imakefile 953 */ 954 ALLINCLUDES = $(INCLUDES) $(EXTRA_INCLUDES) $(TOP_INCLUDES) $(STD_INCLUDES) 955 ALLDEFINES = $(ALLINCLUDES) $(STD_DEFINES) $(EXTRA_DEFINES) $(PROTO_DEFINES) $(DEFINES) 956 CFLAGS = $(ANSICCOPTIONS) $(CDEBUGFLAGS) $(CCOPTIONS) $(ALLDEFINES) 957 LINTFLAGS = $(LINTOPTS) -DLINT $(ALLDEFINES) 958#ifdef Amoeba 959 LDLIBS = $(SYS_LIBRARIES) $(OS_LIBRARIES) $(EXTRA_LIBRARIES) 960#else 961#if AlternateUsrLibDir && !defined(UseInstalled) 962 LDLIBS = -L$(USRLIBDIR) $(OS_LIBRARIES) $(SYS_LIBRARIES) $(EXTRA_LIBRARIES) 963#else 964 LDLIBS = $(OS_LIBRARIES) $(SYS_LIBRARIES) $(EXTRA_LIBRARIES) 965#endif 966#endif 967#if !CrossCompiling 968#if AlternateUsrLibDir && defined(UseInstalled) 969 LDOPTIONS = $(ANSICCOPTIONS) $(CDEBUGFLAGS) $(CCOPTIONS) $(LOCAL_LDFLAGS) -L$(USRLIBDIR) 970#else 971 LDOPTIONS = $(ANSICCOPTIONS) $(CDEBUGFLAGS) $(CCOPTIONS) $(LOCAL_LDFLAGS) 972#endif 973#else 974 LDOPTIONS = 975#endif 976 LDCOMBINEFLAGS = LdCombineFlags 977 DEPENDFLAGS = DependFlags 978 979 MACROFILE = MacroFile 980 RM_CMD = $(RM) FilesToClean ExtraFilesToClean 981 982 IMAKE_DEFINES = /* leave blank, for command line use only */ 983#ifdef UseInstalled 984 IRULESRC = $(CONFIGDIR) /* used in rules file */ 985 IMAKE_CMD = $(IMAKE) -DUseInstalled -I$(IRULESRC) $(IMAKE_DEFINES) 986#else 987 IRULESRC = $(CONFIGSRC) 988 IMAKE_CMD = $(NEWTOP)$(IMAKE) -I$(NEWTOP)$(IRULESRC) $(IMAKE_DEFINES) 989#endif 990 ICONFIGFILES = $(IRULESRC)/Imake.tmpl $(IRULESRC)/Imake.rules \ 991 $(IRULESRC)/Project.tmpl $(IRULESRC)/site.def \ 992 $(IRULESRC)/$(MACROFILE) $(EXTRA_ICONFIGFILES) 993 994/* 995 * get project-specific configuration and rules 996 */ 997 998#include <Project.tmpl> 999 1000#include <Imake.rules> 1001 1002XCOMM ------------------------------------------------------------------------- 1003XCOMM start of Imakefile 1004#include INCLUDE_IMAKEFILE 1005 1006#ifdef INoCrossCompilation 1007/* When we are crosscompiling, the programs that are to run on the local host 1008 * (like makedepend, imake(!), ..) should be compiled by the host's compiler. 1009 * If this is the case, insert a define of INoCrossCompilation in the 1010 * Imakefile. The following include will then take care of redefining 1011 * parameters like CC. 1012 */ 1013#include "hostcc.def" 1014 OS_LIBRARIES = 1015#endif 1016 1017 1018XCOMM ------------------------------------------------------------------------- 1019XCOMM common rules for all Makefiles - do not edit 1020/* 1021 * These need to be here so that rules in Imakefile occur first; the blank 1022 * all is to make sure that an empty Imakefile does not default to make clean. 1023 */ 1024emptyrule:: 1025 1026CleanTarget() 1027 1028#ifndef IHaveSpecialMakefileTarget 1029MakefileTarget() 1030#endif 1031 1032TagsTarget() 1033#ifdef MakefileAdditions 1034MakefileAdditions() 1035#endif 1036 1037#if HasSaberC 1038saber: 1039 XCOMM load $(ALLDEFINES) $(SRCS) 1040 1041osaber: 1042 XCOMM load $(ALLDEFINES) $(OBJS) 1043#endif 1044 1045 1046#ifdef IHaveSubdirs 1047XCOMM ------------------------------------------------------------------------- 1048XCOMM rules for building in SUBDIRS - do not edit 1049 1050InstallSubdirs($(SUBDIRS)) 1051InstallManSubdirs($(SUBDIRS)) 1052InstallLinkKitSubdirs($(SUBDIRS)) 1053CleanSubdirs($(SUBDIRS)) 1054TagSubdirs($(SUBDIRS)) 1055MakefileSubdirs($(SUBDIRS)) 1056IncludesSubdirs($(SUBDIRS)) 1057 1058#else 1059XCOMM ------------------------------------------------------------------------- 1060XCOMM empty rules for directories that do not have SUBDIRS - do not edit 1061 1062install:: 1063 @echo "install in $(CURRENT_DIR) done" 1064 1065install.man:: 1066 @echo "install.man in $(CURRENT_DIR) done" 1067 1068install.linkkit:: 1069 @echo "install.linkkit in $(CURRENT_DIR) done" 1070 1071Makefiles:: 1072 1073includes:: 1074 1075#endif /* if subdirectory rules are needed */ 1076 1077XCOMM ------------------------------------------------------------------------- 1078XCOMM dependencies generated by makedepend 1079