1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660
|
/*
* generic imake template
*/
#ifndef XCOMM
#define XCOMM #
#endif
XCOMM -------------------------------------------------------------------------
XCOMM Makefile generated from IMAKE_TEMPLATE and INCLUDE_IMAKEFILE
XCOMM $XConsortium: Imake.tmpl,v 1.139 91/09/16 08:52:48 rws Exp $
XCOMM
XCOMM Platform-specific parameters may be set in the appropriate <vendor>.cf
XCOMM configuration files. Site-specific parameters should be set in the file
XCOMM site.def. Full rebuilds are recommended if any parameters are changed.
XCOMM
XCOMM If your C preprocessor does not define any unique symbols, you will need
XCOMM to set BOOTSTRAPCFLAGS when rebuilding imake (usually when doing
XCOMM "make World" the first time).
XCOMM
#define YES 1
#define NO 0
XCOMM Select a vendor block
#include <Imake.vb>
/*****************************************************************************
* *
* DO NOT MODIFY BELOW THIS LINE *
* *
*****************************************************************************/
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
XCOMM -------------------------------------------------------------------------
XCOMM platform-specific configuration parameters - edit MacroFile to change
#include MacroIncludeFile
/* It is a kludge to put these two macros here,
* but Project.tmpl needs them and it is not clear there is a better place.
*/
/*
* Concat - concatenates two strings.
*/
#ifndef Concat
#if __STDC__ && !defined(UnixCpp)
#define Concat(a,b)a##b
#else
#define Concat(a,b)a/**/b
#endif
#endif
/*
* Concat3 - concatenates three strings.
*/
#ifndef Concat3
#if __STDC__ && !defined(UnixCpp)
#define Concat3(a,b,c)a##b##c
#else
#define Concat3(a,b,c)a/**/b/**/c
#endif
#endif
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
*/
#ifndef SystemV
#define SystemV NO /* SYSV (R3) */
#endif
#ifndef SystemV4
#define SystemV4 NO /* SVR4 */
#endif
#ifndef OSMajorVersion
#define OSMajorVersion 0
#endif
#ifndef OSMinorVersion
#define OSMinorVersion 0
#endif
#ifndef UnalignedReferencesAllowed
#define UnalignedReferencesAllowed NO /* if arbitrary deref is okay */
#endif
#ifndef ExecableScripts
#if SystemV
#define ExecableScripts NO
#else
#define ExecableScripts YES /* kernel exec() can handle #! */
#endif
#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 HasLargeTmp
#define HasLargeTmp NO /* be paranoid */
#endif
#ifndef HasSockets
#if SystemV || SystemV4
#define HasSockets NO /* do not assume it has them */
#else
#define HasSockets YES /* bsd does have them */
#endif
#endif
#ifndef HasVFork
#if SystemV
#define HasVFork NO /* not yet... */
#else
#define HasVFork YES
#endif
#endif
#ifndef HasPutenv
#define HasPutenv NO /* assume not */
#endif
#ifndef HasVoidSignalReturn
#define HasVoidSignalReturn YES /* assume yes */
#endif
#ifndef HasBsearch
#define HasBsearch YES /* assume yes */
#endif
#ifndef HasSaberC
#define HasSaberC NO /* for people unclear on the concept */
#endif
#ifndef HasNdbm
#define HasNdbm NO
#endif
#ifndef HasSecureRPC
#define HasSecureRPC NO /* if you have Secure RPC */
#endif
#ifndef HasShm
#if SystemV || SystemV4
#define HasShm YES
#else
#define HasShm NO
#endif
#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 UsrLibDir
#ifdef ProjectRoot
#define UsrLibDir Concat(ProjectRoot,/lib)
#ifndef AlternateUsrLibDir
#define AlternateUsrLibDir YES
#endif
#else
#define UsrLibDir /usr/lib
#ifndef AlternateUsrLibDir
#define AlternateUsrLibDir NO
#endif
#endif
#else
#ifndef AlternateUsrLibDir
#define AlternateUsrLibDir YES
#endif
#endif
#ifndef IncRoot
#ifdef ProjectRoot
#define IncRoot Concat(ProjectRoot,/include)
#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 UNCOMPRESSPATH
#define UNCOMPRESSPATH /usr/ucb/uncompress
#endif
#ifndef OptimizedCDebugFlags
#define OptimizedCDebugFlags /* as nothing */
#endif
#ifndef DebuggableCDebugFlags
#define DebuggableCDebugFlags -g
#endif
#ifndef NoOpCDebugFlags
#define NoOpCDebugFlags /* as nothing */
#endif
#ifndef DefaultCDebugFlags
#define DefaultCDebugFlags OptimizedCDebugFlags
#endif
#ifndef DefaultCCOptions
#define DefaultCCOptions /* as nothing: this is for floating point, etc. */
#endif
#ifndef InstStrip
#define InstStrip -s
#endif
#ifndef InstProgMode
#define InstProgMode -m 0755
#endif
#ifndef InstScriptMode
#define InstScriptMode -m 0755
#endif
#ifndef InstLibMode
#define InstLibMode -m 0444
#endif
#ifndef InstDatMode
#define InstDatMode -m 0444
#endif
#ifndef InstManMode
#define InstManMode -m 0444
#endif
#ifndef InstOwner
#define InstOwner /* as nothing */
#endif
#ifndef InstGroup
#define InstGroup /* as nothing */
#endif
#ifndef ArCmd
#if HasLargeTmp | SystemV4
#define ArCmd ar cq /* do nothing special */
#else
#define ArCmd ar clq /* use local dir for temp files */
#endif
#endif
#ifndef BootstrapCFlags
#define BootstrapCFlags /**/
#endif
#ifndef HasGcc
#define HasGcc NO
#endif
#ifndef CcCmd
#if HasGcc
#define CcCmd gcc -fstrength-reduce -fpcc-struct-return
#else
#define CcCmd cc
#endif
#endif
#ifndef AsCmd
#define AsCmd as
#endif
#ifndef CompressCmd
#define CompressCmd compress
#endif
#ifndef CppCmd
#define CppCmd /lib/cpp
#endif
#ifndef PreProcessCmd
#define PreProcessCmd CcCmd -E
#endif
#ifndef InstallCmd
#if SystemV || SystemV4
#define InstallCmd bsdinst
#else
#define InstallCmd install
#endif
#endif
#ifndef LdCmd
#define LdCmd ld
#endif
#ifndef LoadOpts
#define LoadOpts /* as nothing */
#endif
#ifndef LoadLibs
#define LoadLibs /* as nothing */
#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 LintLibs
#define LintLibs /* as nothing */
#endif
#ifndef CpCmd
#define CpCmd cp
#endif
#ifndef LnCmd
#if SystemV
#define LnCmd ln /* or even cp */
#else
#define LnCmd ln -s
#endif
#endif
#ifndef MakeCmd
#define MakeCmd make
#endif
#ifndef MvCmd
#define MvCmd mv
#endif
#ifndef DoRanlibCmd
#if SystemV || SystemV4
#define DoRanlibCmd NO
#else
#define DoRanlibCmd YES
#endif
#endif
#ifndef RanlibCmd
#define RanlibCmd ranlib
#endif
#ifndef RanlibInstFlags
#define RanlibInstFlags /**/
#endif
#ifndef RmCmd
#define RmCmd rm -f
#endif
#ifndef StandardIncludes
#define StandardIncludes /**/ /* for platform-specifics */
#endif
#ifndef StandardDefines
#if SystemV
#define StandardDefines -DSYSV
#else
#if SystemV4
#define StandardDefines -DSVR4
#else
#define StandardDefines /**/
#endif
#endif
#endif
#ifndef StandardCppDefines
#define StandardCppDefines StandardDefines
#endif
#ifndef Malloc0ReturnsNull
#define Malloc0ReturnsNull NO
#endif
#ifndef NdbmDefines
#if HasNdbm
#define NdbmDefines -DNDBM
#else
#define NdbmDefines /**/
#endif
#endif
#ifndef ExtraLibraries
#if SystemV4
#if HasSockets
#define ExtraLibraries -lsocket -lnsl
#else
#define ExtraLibraries -lnsl
#endif
#else
#define ExtraLibraries /**/
#endif
#endif
#ifndef ExtraLoadFlags
#define ExtraLoadFlags /**/
#endif
#ifndef LdCombineFlags
#if SystemV4
#define LdCombineFlags -r
#else
#define LdCombineFlags -X -r
#endif
#endif
#ifndef TagsCmd
#define TagsCmd ctags
#endif
#ifndef LoaderLibPrefix
#define LoaderLibPrefix /**/ /* cray does -l libX11.a */
#endif
#ifndef DependFlags
#define DependFlags /**/
#endif
#ifndef TroffCmd
#define TroffCmd psroff
#endif
#ifndef MsMacros
#define MsMacros -ms
#endif
#ifndef TblCmd
#define TblCmd tbl
#endif
#ifndef EqnCmd
#define EqnCmd eqn
#endif
#ifndef ExpandManNames
#if SystemV
#define ExpandManNames NO
#else
#define ExpandManNames YES
#endif
#endif
#ifndef TOPDIR
#define TOPDIR .
#endif
#ifndef CURDIR
#define CURDIR .
#endif
#ifndef ExtraFilesToClean
#define ExtraFilesToClean /**/
#endif
#ifndef FilesToClean
#define FilesToClean *.CKP *.ln *.BAK *.bak *.o core errs ,* *~ *.a .emacs_* tags TAGS make.log MakeOut
#endif
SHELL = BourneShell
TOP = TOPDIR
CURRENT_DIR = CURDIR
AR = ArCmd
BOOTSTRAPCFLAGS = BootstrapCFlags /* set if cpp does not have uniq sym */
CC = CcCmd
AS = AsCmd
COMPRESS = CompressCmd
CPP = CppCmd $(STD_CPP_DEFINES) /* simple filters */
PREPROCESSCMD = PreProcessCmd $(STD_CPP_DEFINES) /* prefered; mdep */
INSTALL = InstallCmd
LD = LdCmd
LOADOPTS = LoadOpts
LOADLIBS = LoadLibs
LINT = LintCmd
LINTLIBFLAG = LintLibFlag
LINTOPTS = LintOpts
LINTLIBS = LintLibs
LN = LnCmd
MAKE = MakeCmd
MV = MvCmd
CP = CpCmd
#if DoRanlibCmd
RANLIB = RanlibCmd
RANLIBINSTFLAGS = RanlibInstFlags
#endif
RM = RmCmd
TROFF = TroffCmd
MSMACROS = MsMacros
TBL = TblCmd
EQN = EqnCmd
STD_INCLUDES = StandardIncludes
STD_CPP_DEFINES = StandardCppDefines
STD_DEFINES = StandardDefines
EXTRA_LOAD_FLAGS = ExtraLoadFlags
EXTRA_LIBRARIES = ExtraLibraries
TAGS = TagsCmd
#if ConstructMFLAGS
MFLAGS = -$(MAKEFLAGS)
#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
INSTSTRIP = InstStrip
INSTPROGMODE = InstProgMode
INSTSCRIPTMODE = InstScriptMode
INSTLIBMODE = InstLibMode
INSTDATMODE = InstDatMode
INSTMANMODE = InstManMode
INSTOWNER = InstOwner
INSTGROUP = InstGroup
INSTPROGFLAGS = $(INSTOWNER) $(INSTGROUP) $(INSTSTRIP) $(INSTPROGMODE)
INSTSCRIPTFLAGS = $(INSTOWNER) $(INSTGROUP) $(INSTSCRIPTMODE)
INSTLIBFLAGS = $(INSTOWNER) $(INSTGROUP) $(INSTLIBMODE)
INSTDATFLAGS = $(INSTOWNER) $(INSTGROUP) $(INSTDATMODE)
INSTMANFLAGS = $(INSTOWNER) $(INSTGROUP) $(INSTMANMODE)
#ifdef ProjectRoot
PROJECTROOT = ProjectRoot
#endif
#ifdef UseInstalled
#if AlternateIncRoot
TOP_INCLUDES = -I$(INCROOT) /* def: for alternative /usr/include */
#endif
#else
TOP_INCLUDES = -I$(TOP) /* def: for builds within tree */
#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) $(STD_INCLUDES)
ALLDEFINES = $(ALLINCLUDES) $(STD_DEFINES) $(EXTRA_DEFINES) $(PROTO_DEFINES) $(DEFINES)
CFLAGS = $(CDEBUGFLAGS) $(CCOPTIONS) $(ALLDEFINES)
LINTFLAGS = $(LINTOPTS) -DLINT $(ALLDEFINES)
#if AlternateUsrLibDir && !defined(UseInstalled)
LDLIBS = -L$(USRLIBDIR) $(SYS_LIBRARIES) $(EXTRA_LIBRARIES)
#else
LDLIBS = $(SYS_LIBRARIES) $(EXTRA_LIBRARIES)
#endif
#if AlternateUsrLibDir && defined(UseInstalled)
LDOPTIONS = $(CDEBUGFLAGS) $(CCOPTIONS) $(LOCAL_LDFLAGS) -L$(USRLIBDIR)
#else
LDOPTIONS = $(CDEBUGFLAGS) $(CCOPTIONS) $(LOCAL_LDFLAGS)
#endif
LDCOMBINEFLAGS = LdCombineFlags
DEPENDFLAGS = DependFlags
MACROFILE = MacroFile
RM_CMD = $(RM) FilesToClean ExtraFilesToClean
IMAKE_DEFINES = /* leave blank, for command line use only */
#ifdef UseInstalled
IRULESRC = $(CONFIGDIR) /* used in rules file */
IMAKE_CMD = $(IMAKE) -DUseInstalled -I$(IRULESRC) $(IMAKE_DEFINES)
#else
IRULESRC = $(CONFIGSRC)
IMAKE_CMD = $(IMAKE) -I$(NEWTOP)$(IRULESRC) $(IMAKE_DEFINES)
#endif
ICONFIGFILES = $(IRULESRC)/Imake.tmpl $(IRULESRC)/Imake.rules \
$(IRULESRC)/Project.tmpl $(IRULESRC)/site.def \
$(IRULESRC)/$(MACROFILE) $(EXTRA_ICONFIGFILES)
/*
* get project-specific configuration and rules
*/
#include <Project.tmpl>
#include <Imake.rules>
XCOMM -------------------------------------------------------------------------
XCOMM start of Imakefile
#include INCLUDE_IMAKEFILE
XCOMM -------------------------------------------------------------------------
XCOMM common rules for all Makefiles - do not edit
/*
* These need to be here so that rules in Imakefile occur first; the blank
* all is to make sure that an empty Imakefile does not default to make clean.
*/
emptyrule::
CleanTarget()
MakefileTarget()
TagsTarget()
#if HasSaberC
saber:
XCOMM load $(ALLDEFINES) $(SRCS)
osaber:
XCOMM load $(ALLDEFINES) $(OBJS)
#endif
#ifdef IHaveSubdirs
XCOMM -----------------------------
XCOMM rules for building in SUBDIRS
MakeSubdirs($(SUBDIRS))
DependSubdirs($(SUBDIRS))
InstallSubdirs($(SUBDIRS))
InstallManSubdirs($(SUBDIRS))
CleanSubdirs($(SUBDIRS))
TagSubdirs($(SUBDIRS))
MakefileSubdirs($(SUBDIRS))
IncludesSubdirs($(SUBDIRS))
#else
XCOMM ----------------------------------------------------
XCOMM empty rules for directories that do not have SUBDIRS
all::
depend::
install::
@echo "install in $(CURRENT_DIR) done"
install.man::
@echo "install.man in $(CURRENT_DIR) done"
Makefiles::
includes::
#endif /* if subdirectory rules are needed */
XCOMM -------------------------------------------------------------------------
XCOMM dependencies generated by makedepend
|