1 XCOMM ----------------------------------------------------------------------
2 XCOMM Makefile generated from IMAKE_TEMPLATE and INCLUDE_IMAKEFILE
3 XCOMM $TOG: Imake.tmpl /main/249 1997/10/13 15:28:56 kaleb $
7 * generic imake template
11 * Modify Imake.cf when adding a new architecture, do not modify this file.
12 * Platform-specific parameters may be set in the appropriate <vendor>.cf
13 * configuration files. Site-specific parameters should be set in the file
14 * site.def. Full rebuilds are recommended if any parameters are changed.
15 * If your C preprocessor does not define any unique symbols, you will need
16 * to set BOOTSTRAPCFLAGS when rebuilding imake (usually when doing
17 * "make World" the first time).
20 #define ImakeConfigRelease 6
25 /* Ensure that "all" is the default target in the Makefile. */
32 XCOMM -----------------------------------------------------------------------
33 XCOMM site-specific configuration parameters that need to come before
34 XCOMM the platform-specific parameters - edit site.def to change
35 #define BeforeVendorCF
39 #if defined(HasGcc2) && !defined(HasGcc)
40 # define HasGcc HasGcc2
44 # define HasClearmake NO
48 * ClearmakeOSName - insert the current OS type into the clearmake
49 * build script, so .o files from different platforms cannot be winked in.
50 * If clearmake finds the build script for two .o files is the same, it
51 * will share the .o, even across different architectures. Inserting the
52 * O/S name into the build script in a comment prevents unwanted sharing.
53 * Note the trailing double-@ in the macro: end a line using this macro
54 * with backslash without the double-@ usually used.
57 * #define SomeRule() @@\
58 * something or other @@\
63 #ifndef ClearmakeOSName
65 # define ClearmakeOSName @ XCOMM $(OSNAME) @@
67 # define ClearmakeOSName /**/
73 # define MakeCmd clearmake
78 XCOMM ----------------------------------------------------------------------
80 ClearmakeOSName $(CC) -c $(CFLAGS) $*.c
83 XCOMM ----------------------------------------------------------------------
84 XCOMM platform-specific configuration parameters - edit MacroFile to change
85 #include MacroIncludeFile
87 XCOMM ----------------------------------------------------------------------
88 XCOMM site-specific configuration parameters that go after
89 XCOMM the platform-specific parameters - edit site.def to change
95 * defaults for various generic parameters; set in site.def if needed
98 /* the following are needed before we can include Imake.rules */
101 #define SystemV NO /* SYSV (R3) */
104 #define SystemV4 NO /* SVR4 */
106 #ifndef HasCodeCenter
107 #define HasCodeCenter NO
110 #define HasSentinel NO
115 #ifndef HasTestCenter
116 #define HasTestCenter NO
118 #ifndef RemoveTargetProgramByMoving
119 #define RemoveTargetProgramByMoving NO
122 #if SystemV || SystemV4
123 #define DoRanlibCmd NO
125 #define DoRanlibCmd YES
128 #ifndef ExecableScripts
130 #define ExecableScripts NO
132 #define ExecableScripts YES /* kernel exec() can handle #! */
136 #ifndef HasMakefileSafeInclude /* -include or sinclude in a Makefile */
138 #define HasMakefileSafeInclude YES
140 #define HasMakefileSafeInclude NO /* see also vendor-specific .cf files */
144 #ifndef HasVarDirectory
145 #define HasVarDirectory YES
148 #include <Imake.rules>
150 #ifndef HasSharedLibraries
151 #define HasSharedLibraries NO
153 #ifndef OSMajorVersion
154 #define OSMajorVersion 0
156 #ifndef OSMinorVersion
157 #define OSMinorVersion 0
159 #ifndef UnalignedReferencesAllowed
160 #define UnalignedReferencesAllowed NO /* if arbitrary deref is okay */
162 #ifndef AvoidNullMakeCommand
163 #define AvoidNullMakeCommand NO
165 #if AvoidNullMakeCommand
166 #ifndef NullMakeCommand
167 #define NullMakeCommand @ echo -n
170 * An obscure bug in BSD4.3's original make causes it not to recognize a
171 * macro definition if the macro name starts with a non-alpha and in
174 _NULLCMD_ = NullMakeCommand
177 #ifndef CrossCompiling
178 #define CrossCompiling NO
180 #ifndef BourneShell /* to force shell in makefile */
181 #define BourneShell /bin/sh
183 #ifndef ConstructMFLAGS
185 #define ConstructMFLAGS YES /* build MFLAGS from MAKEFLAGS */
187 #define ConstructMFLAGS NO /* build MFLAGS from MAKEFLAGS */
191 #ifndef ConstructMAKEFLAGS /* needed on old BSD-based? */
192 #define ConstructMAKEFLAGS NO /* build MAKEFLAGS from MFLAGS */
196 #define HasLargeTmp NO /* be paranoid */
199 #ifndef HasBSD44Sockets
200 #define HasBSD44Sockets NO
203 #define HasSockets YES
206 #define HasStreams !HasSockets
212 #if SystemV || SystemV4
220 #define HasVFork NO /* not yet... */
225 #ifndef HasSetUserContext
226 #define HasSetUserContext NO
229 #define HasLibCrypt NO
232 #define HasPutenv NO /* assume not */
234 #ifndef HasVoidSignalReturn
235 #define HasVoidSignalReturn YES /* assume yes */
238 #define HasBsearch YES /* assume yes */
241 #define HasFortran NO
244 #if HasGcc2ForCplusplus
245 #define HasCplusplus YES
247 #define HasCplusplus NO
254 #define HasSecureRPC NO /* if you have Secure RPC */
257 #define HasKrb5 NO /* if you have Kerberos V5 */
263 #if SystemV || SystemV4
280 #define Krb5Includes -I/krb5/include
282 #ifndef Krb5Libraries
283 #define Krb5Libraries -L/krb5/lib -L/usr/isode/lib -lkrb5 -lcrypto -lisode -lcom_err -ldbm
287 #define Krb5Includes /**/
289 #define Krb5Libraries /**/
291 #ifndef NeedConstPrototypes
292 #define NeedConstPrototypes NO
294 #ifndef NeedVarargsPrototypes
295 #define NeedVarargsPrototypes NO
297 #ifndef NeedNestedPrototypes
298 #define NeedNestedPrototypes NO
300 #ifndef NeedFunctionPrototypes
301 #define NeedFunctionPrototypes (NeedVarargsPrototypes || NeedNestedPrototypes)
303 #ifndef NeedWidePrototypes
304 #define NeedWidePrototypes YES /* mix and match ANSI-C, non-ANSI */
307 #ifndef StripInstalledPrograms
308 #define StripInstalledPrograms NO /* leave symbol table just in case */
310 #ifndef UseCCMakeDepend /* use slow cc -E script */
311 #define UseCCMakeDepend NO
314 /* DefaultUsrBin is independent of ProjectRoot.
315 This is a directory where programs will be found even if PATH
316 is not set, for example when coming in remotely via rsh. */
317 #ifndef DefaultUsrBin
318 #define DefaultUsrBin /usr/bin
323 #define UsrLibDir Concat(ProjectRoot,/lib)
324 #ifndef AlternateUsrLibDir
325 #define AlternateUsrLibDir YES
328 #define UsrLibDir /usr/lib
329 #ifndef AlternateUsrLibDir
330 #define AlternateUsrLibDir NO
334 #ifndef AlternateUsrLibDir
335 #define AlternateUsrLibDir YES
339 #define ShLibDir UsrLibDir
343 #define IncRoot Concat(ProjectRoot,/include)
344 #ifndef AlternateIncRoot
345 #define AlternateIncRoot YES
348 #define IncRoot /usr/include
349 #ifndef AlternateIncRoot
350 #define AlternateIncRoot NO
354 #ifndef AlternateIncRoot
355 #define AlternateIncRoot YES
359 #define LintlibDir $(USRLIBDIR)/lint
361 #ifndef SystemManDirectory
363 #define SystemManDirectory /usr/share/man
365 #define SystemManDirectory /usr/man
368 #ifndef ManDirectoryRoot
370 #define ManDirectoryRoot Concat(ProjectRoot,/man)
372 #define ManDirectoryRoot SystemManDirectory
376 #define ManPath ManDirectoryRoot
378 #ifndef ManSourcePath
379 #define ManSourcePath $(MANPATH)/man
382 #define ManDir $(MANSOURCEPATH)$(MANSUFFIX)
385 #define LibmanDir $(MANSOURCEPATH)$(LIBMANSUFFIX)
388 #define FileManDir $(MANSOURCEPATH)$(FILEMANSUFFIX)
391 #define MiscManDir $(MANSOURCEPATH)$(MISCMANSUFFIX)
394 #define ConfigSrc $(TOP)/config
398 #define DependDir $(CONFIGSRC)/util
400 #define DependDir $(CONFIGSRC)/makedepend
403 #ifndef UNCOMPRESSPATH
404 #define UNCOMPRESSPATH /usr/ucb/uncompress
406 #ifndef OptimizedCDebugFlags
407 #define OptimizedCDebugFlags -O
409 #ifndef OptimizedCplusplusDebugFlags
410 #define OptimizedCplusplusDebugFlags OptimizedCDebugFlags
412 #ifndef DebuggableCDebugFlags
413 #define DebuggableCDebugFlags -g
415 #ifndef DebuggableCplusplusDebugFlags
416 #define DebuggableCplusplusDebugFlags DebuggableCDebugFlags
418 #ifndef ProfiledCDebugFlags
419 #define ProfiledCDebugFlags -pg
421 #ifndef ProfiledCplusplusDebugFlags
422 #define ProfiledCplusplusDebugFlags ProfiledCDebugFlags
424 #ifndef NoOpCDebugFlags
425 #define NoOpCDebugFlags /**/
427 #ifndef DefaultCDebugFlags
428 #define DefaultCDebugFlags OptimizedCDebugFlags
430 #ifndef DefaultCplusplusDebugFlags
431 #define DefaultCplusplusDebugFlags OptimizedCplusplusDebugFlags
433 #ifndef DefaultCCOptions
434 #define DefaultCCOptions /* floating point, etc. */
436 #ifndef DefaultCplusplusOptions
437 #define DefaultCplusplusOptions /* floating point, etc. */
440 #define NoRConst NO /* YES if const for structs of funcs is bad */
443 #define InstPgmFlags -s
446 #define InstBinFlags -m 0755
449 #define InstUidFlags -m 4711
452 #define InstLibFlags -m 0644
455 #define InstIncFlags -m 0444
458 #define InstManFlags -m 0444
461 #define InstDatFlags -m 0444
463 #ifndef InstKmemFlags /* put -g kmem -m 2711 in site.def... */
464 #define InstKmemFlags InstUidFlags
470 #if HasLargeTmp || SystemV4
471 #define ArCmd ArCmdBase cq
473 #define ArCmd ArCmdBase clq
477 #if HasLargeTmp || SystemV4
478 #define ArAddCmd ArCmdBase ru
480 #define ArAddCmd ArCmdBase rul
484 #if HasLargeTmp || SystemV4
485 #define ArExtCmd ArCmdBase x
487 #define ArExtCmd ArCmdBase xl
490 #ifndef BootstrapCFlags
491 #define BootstrapCFlags /**/
497 #define HasGcc HasGcc2
499 #ifndef HasGcc2ForCplusplus
500 #define HasGcc2ForCplusplus NO
502 #ifndef HasCenterLineC
503 #define HasCenterLineC NO
505 #ifndef HasCenterLineCplusplus
506 #define HasCenterLineCplusplus NO
510 #define CcCmd gcc -fpcc-struct-return
513 #define CcCmd gcc -fstrength-reduce -fpcc-struct-return
524 #if HasGcc2ForCplusplus
525 #define CplusplusCmd g++
527 #define CplusplusCmd CC
530 #ifndef CplusplusFilt
531 # define CplusplusFilt c++filt
533 #ifndef CplusplusLibC
534 #define CplusplusLibC /**/
536 #ifndef CplusplusStandardDefines
537 #define CplusplusStandardDefines StandardDefines
539 #ifndef CplusplusExtraDefines
540 #define CplusplusExtraDefines /**/
542 #ifndef CplusplusExtraIncludes
543 #define CplusplusExtraIncludes /**/
545 #ifndef CplusplusDependIncludes
546 #define CplusplusDependIncludes /**/
548 #ifndef CplusplusOptions
549 #define CplusplusOptions /**/
551 #ifndef CplusplusSpecialOptions
552 #define CplusplusSpecialOptions /**/
556 #define FortranCmd f77
559 #define FortranFlags /**/
561 #ifndef FortranDebugFlags /* for -O or -g */
562 #define FortranDebugFlags /**/
569 #define CompressCmd compress
575 #define CppCmd /lib/cpp
577 #ifndef CppNoLineInfoOption
578 #define CppNoLineInfoOption /**/
580 #ifndef PreProcessCmd
581 #define PreProcessCmd CcCmd -E
583 #ifndef InstallCmd /* hack should be in project */
584 #if SystemV || SystemV4
585 #ifdef UseInstalled /* assume BINDIR in path */
586 #define InstallCmd bsdinst
588 #define InstallCmd $(SHELL) $(CONFIGSRC)/util/bsdinst.sh
591 #define InstallCmd install
595 #define InstallFlags -c
609 #ifndef CplusplusYaccCmd
610 #define CplusplusYaccCmd YaccCmd
616 #if SystemV || SystemV4
617 #define LintLibFlag -o
619 #define LintLibFlag -C
623 #if SystemV || SystemV4
626 #define LintOpts -axz
633 #define HasSymLinks YES
635 #ifndef LnCmd /* can use cp instead of ln if necessary */
649 #define RanlibCmd ranlib
651 #ifndef RanlibInstFlags
652 #define RanlibInstFlags /**/
657 #ifndef StandardIncludes /* for platform-specifics */
658 #define StandardIncludes /**/
660 #ifndef StandardDefines
662 #define StandardDefines -DSYSV
665 #define StandardDefines -DSVR4
667 #define StandardDefines /**/
671 #ifndef StandardCppDefines
672 #define StandardCppDefines StandardDefines
674 #ifndef Malloc0ReturnsNull
675 #define Malloc0ReturnsNull NO
677 #if Malloc0ReturnsNull
678 #ifndef Malloc0ReturnsNullDefines
679 #define Malloc0ReturnsNullDefines -DMALLOC_0_RETURNS_NULL
682 #ifndef ToolkitStringsABIOptions
683 #define ToolkitStringsABIOptions /**/
687 #define NdbmDefines -DNDBM
689 #define NdbmDefines /**/
693 #if !defined(UseInstalled)
694 #define LdPreLib -L$(BUILDLIBDIR)
696 #if AlternateUsrLibDir
697 #define LdPreLib -L$(USRLIBDIR)
699 #define LdPreLib /**/
704 #if !defined(UseInstalled) && AlternateUsrLibDir && !HasLdRunPath
705 #define LdPostLib -L$(USRLIBDIR)
707 #define LdPostLib /**/
711 #define MathLibrary -lm
714 #define DBMLibrary -ldbm
717 #define DlLibrary -ldl
719 #ifndef ExtraLibraries
722 #define ExtraLibraries -lsocket -lnsl -lw
724 #define ExtraLibraries -lnsl -lw
727 #define ExtraLibraries /**/
730 #ifndef ExtraLoadOptions
731 #define ExtraLoadOptions /**/
733 #ifndef ExtraLoadFlags
734 #define ExtraLoadFlags /**/
736 #ifndef LdCombineFlags
738 #define LdCombineFlags -r
740 #define LdCombineFlags -X -r
744 #define LdStripFlags -x
747 #define TagsCmd ctags
749 #ifndef LoaderLibPrefix
750 #define LoaderLibPrefix /**/
753 #ifdef UseInstalled /* assume BINDIR in path */
754 #define ImakeCmd imake
756 #define ImakeCmd $(IMAKESRC)/imake
760 #ifdef UseInstalled /* assume BINDIR in path */
761 #define DependCmd makedepend
763 #define DependCmd $(DEPENDSRC)/makedepend
767 #define DependFlags /**/
769 #ifndef DependFileName
770 #define DependFileName Makefile.dep
772 #ifndef ExportListCmd
773 # ifndef ExportListGenSource
774 # define ExportListCmd /**/
775 # elif !defined(UseInstalled)
776 # define ExportListCmd $(CONFIGSRC)/util/exportlistgen
778 # define ExportListCmd exportlistgen
782 #ifdef UseInstalled /* assume BINDIR in path */
783 #define MkdirHierCmd mkdirhier
785 #define MkdirHierCmd $(SHELL) $(CONFIGSRC)/util/mkdirhier.sh
789 #define TroffCmd psroff
792 #define NroffCmd nroff
798 #define ManMacros -man
813 #define DvipsCmd dvips
816 #define LatexCmd latex
820 #define SentinelCmd sentinel
822 #ifndef SentinelOptions
823 #define SentinelOptions /**/
828 #define PurifyCmd purify
830 #ifndef PurifyOptions
831 #define PurifyOptions /**/
836 #define ProofCmd proof
839 #define ProofOptions /**/
842 #ifndef PathSeparator
843 #define PathSeparator /
852 #define ManSuffix n /* use just one tab or cpp will die */
855 #define LibManSuffix 3 /* use just one tab or cpp will die */
857 #ifndef FileManSuffix
858 #if SystemV || SystemV4 || defined(OSF1Architecture)
859 #define FileManSuffix 4 /* use just one tab or cpp will die */
861 #define FileManSuffix 5 /* use just one tab or cpp will die */
864 #ifndef MiscManSuffix
865 #if SystemV || SystemV4 || defined(OSF1Architecture)
866 #define MiscManSuffix 5 /* use just one tab or cpp will die */
868 #define MiscManSuffix 7 /* use just one tab or cpp will die */
871 #ifndef ExpandManNames
873 #define ExpandManNames NO
875 #define ExpandManNames YES
884 #ifndef SiteIConfigFiles
885 #define SiteIConfigFiles /**/
887 #ifndef ExtraFilesToClean
888 #define ExtraFilesToClean /**/
891 #define FilesToClean *.CKP *.ln *.BAK *.bak *.Osuf core errs ,* *~ *.a .emacs_* tags TAGS make.log MakeOut
894 PATHSEP = PathSeparator
902 MKDIRHIER = MkdirHierCmd
903 EXPORTLISTGEN = ExportListCmd
904 CONFIGSRC = ConfigSrc
905 IMAKESRC = $(CONFIGSRC)/imake
906 DEPENDSRC = DependDir
908 INCROOT = IncRoot /* base of where to put header files */
909 USRLIBDIR = UsrLibDir /* nonshared libraries */
910 SHLIBDIR = ShLibDir /* shared libraries */
911 LINTLIBDIR = LintlibDir /* lint libraries */
912 MANPATH = ManPath /* top of manual page tree */
913 MANSOURCEPATH = ManSourcePath /* prefix for man page sources */
914 MANDIR = ManDir /* man pages for commands */
915 LIBMANDIR = LibmanDir /* man pages for library routines */
916 FILEMANDIR = FileManDir /* man pages for config files */
917 MISCMANDIR = MiscManDir /* man pages for miscellaneous files */
920 BOOTSTRAPCFLAGS = BootstrapCFlags /* set if cpp does not have uniq sym */
925 FDEBUGFLAGS = FortranDebugFlags
926 FCFLAGS = FortranFlags $(FDEBUGFLAGS)
933 CXXFILT = CplusplusFilt
934 CXXLIB = CplusplusLibC
935 CXXDEBUGFLAGS = DefaultCplusplusDebugFlags
936 CXXDEPENDINCLUDES = CplusplusDependIncludes
937 CXXEXTRA_DEFINES = CplusplusExtraDefines
938 CXXEXTRA_INCLUDES = CplusplusExtraIncludes
939 CXXSTD_DEFINES = CplusplusStandardDefines $(CXXPROJECT_DEFINES)
940 CXXOPTIONS = CplusplusOptions
941 CXXINCLUDES = $(INCLUDES) $(TOP_INCLUDES) $(CXXEXTRA_INCLUDES)
942 CXXDEFINES = $(CXXINCLUDES) $(CXXSTD_DEFINES) $(THREADS_CXXDEFINES) $(CXXEXTRA_DEFINES) $(DEFINES)
943 CXXFLAGS = $(CXXDEBUGFLAGS) $(CXXOPTIONS) $(THREADS_CXXFLAGS) $(CXXDEFINES)
945 COMPRESS = CompressCmd
947 CPP = CppCmd $(STD_CPP_DEFINES) /* simple filters */
948 PREPROCESSCMD = PreProcessCmd $(STD_CPP_DEFINES) /* prefered; mdep */
950 INSTALLFLAGS = InstallFlags
955 CCYACC = CplusplusYaccCmd
957 LINTLIBFLAG = LintLibFlag
965 RANLIBINSTFLAGS = RanlibInstFlags
968 MANSUFFIX = ManSuffix /* suffix for command man pages */
969 LIBMANSUFFIX = LibManSuffix /* suffix for library man pages */
970 FILEMANSUFFIX = FileManSuffix /* suffix for file format man pages */
971 MISCMANSUFFIX = MiscManSuffix /* suffix for misc man pages */
976 MANMACROS = ManMacros
986 SENTINEL = SentinelCmd
987 SENTINELOPTIONS = SentinelOptions
991 PURIFYOPTIONS = PurifyOptions
995 PROOFOPTIONS = ProofOptions
997 STD_INCLUDES = StandardIncludes
998 STD_CPP_DEFINES = StandardCppDefines $(PROJECT_DEFINES)
999 STD_DEFINES = StandardDefines $(PROJECT_DEFINES)
1000 EXTRA_LOAD_FLAGS = ExtraLoadFlags
1001 EXTRA_LDOPTIONS = ExtraLoadOptions
1002 EXTRA_LIBRARIES = ExtraLibraries Krb5Libraries
1005 MFLAGS = -$(MAKEFLAGS)
1007 #if ConstructMAKEFLAGS
1008 MAKEFLAGS = $(MFLAGS)
1010 #if HasSharedLibraries
1011 SHAREDCODEDEF = SharedCodeDef
1012 SHLIBDEF = SharedLibraryDef
1013 #ifdef SharedLibraryLoadFlags
1014 SHLIBLDFLAGS = SharedLibraryLoadFlags
1017 * Here we set up flags needed to produce position-independent code
1018 * when doing C and C++ compilation. The default if you specify C
1019 * PIC flags without also specifying C++ PIC flags is to assume that
1020 * the C flags work for both. If your C++ compiler requires different
1021 * flags, specify them explicitly in PositionIndependentCplusplusFlags.
1023 #ifdef PositionIndependentCFlags
1024 PICFLAGS = PositionIndependentCFlags
1026 #ifdef PositionIndependentCplusplusFlags
1027 CXXPICFLAGS = PositionIndependentCplusplusFlags
1029 #ifdef PositionIndependentCFlags
1030 CXXPICFLAGS = PositionIndependentCFlags
1034 #if !HasVoidSignalReturn
1035 SIGNAL_DEFINES = -DSIGNALRETURNSINT
1038 * The following supports forcing of function prototypes
1040 #if NeedFunctionPrototypes && NeedVarargsPrototypes && NeedConstPrototypes && NeedNestedPrototypes
1041 #define _funcprotodef -DFUNCPROTO=15
1043 #if NeedFunctionPrototypes && NeedVarargsPrototypes && NeedNestedPrototypes
1044 #define _funcprotodef -DFUNCPROTO=11
1046 #if NeedFunctionPrototypes && NeedNestedPrototypes
1047 #define _funcprotodef -DFUNCPROTO=9
1049 #if NeedFunctionPrototypes && NeedVarargsPrototypes && NeedConstPrototypes
1050 #define _funcprotodef -DFUNCPROTO=7
1052 #if NeedFunctionPrototypes && NeedConstPrototypes
1053 #define _funcprotodef -DFUNCPROTO=5
1055 #if NeedFunctionPrototypes && NeedVarargsPrototypes
1056 #define _funcprotodef -DFUNCPROTO=3
1058 #if NeedFunctionPrototypes
1059 #define _funcprotodef -DFUNCPROTO
1061 #define _funcprotodef /**/
1069 #if NeedWidePrototypes
1070 #define _wideprotodef /**/
1072 #define _wideprotodef -DNARROWPROTO
1074 PROTO_DEFINES = _funcprotodef _wideprotodef
1075 #undef _funcprotodef
1076 #undef _wideprotodef
1078 #if StripInstalledPrograms
1079 INSTPGMFLAGS = InstPgmFlags /* install flags for stripping */
1083 INSTBINFLAGS = InstBinFlags /* install flags for programs */
1084 INSTUIDFLAGS = InstUidFlags /* install flags for setuid programs */
1085 INSTLIBFLAGS = InstLibFlags /* install flags for libraries */
1086 INSTINCFLAGS = InstIncFlags /* install flags for headers */
1087 INSTMANFLAGS = InstManFlags /* install flags for man pages */
1088 INSTDATFLAGS = InstDatFlags /* install flags for data files */
1089 INSTKMEMFLAGS = InstKmemFlags /* install flags for /dev/kmem progs */
1092 PROJECTROOT = ProjectRoot
1095 # if AlternateIncRoot
1096 # define TopInclude -I$(INCROOT)
1098 # define TopInclude /**/
1101 # define TopInclude -I$(TOP)
1103 CDEBUGFLAGS = DefaultCDebugFlags
1104 CCOPTIONS = DefaultCCOptions /* to distinguish from param flags */
1106 * STD_INCLUDES contains system-specific includes
1107 * TOP_INCLUDES specifies how to get to /usr/include or its build substitute
1108 * EXTRA_INCLUDES contains project-specific includes set in project incfiles
1109 * INCLUDES contains client-specific includes set in Imakefile
1110 * LOCAL_LDFLAGS contains client-specific ld flags flags set in Imakefile
1112 ALLINCLUDES = $(INCLUDES) $(EXTRA_INCLUDES) $(TOP_INCLUDES) $(STD_INCLUDES)
1113 ALLDEFINES = $(ALLINCLUDES) $(STD_DEFINES) $(EXTRA_DEFINES) $(PROTO_DEFINES) $(THREADS_DEFINES) $(DEFINES)
1114 CFLAGS = $(CDEBUGFLAGS) $(CCOPTIONS) $(THREADS_CFLAGS) $(ALLDEFINES)
1115 LINTFLAGS = $(LINTOPTS) -DLINT $(ALLDEFINES) $(DEPEND_DEFINES)
1117 LDPOSTLIB = LdPostLib
1118 LDOPTIONS = $(CDEBUGFLAGS) $(CCOPTIONS) $(EXTRA_LDOPTIONS) $(THREADS_LDFLAGS) $(LOCAL_LDFLAGS) $(LDPRELIBS)
1119 CXXLDOPTIONS = $(CXXDEBUGFLAGS) $(CXXOPTIONS) $(EXTRA_LDOPTIONS) $(THREADS_CXXLDFLAGS) $(LOCAL_LDFLAGS) $(LDPRELIBS)
1121 LDLIBS = $(LDPOSTLIBS) $(THREADS_LIBS) $(SYS_LIBRARIES) $(EXTRA_LIBRARIES)
1122 #if HasBrokenCCForLink
1125 #if AlternateUsrLibDir && HasLdRunPath
1126 CCENVSETUP = LD_RUN_PATH=$(USRLIBDIRPATH)
1127 CCLINK = $(CCENVSETUP) $(CC)
1132 #if AlternateUsrLibDir && HasLdRunPath
1133 CXXENVSETUP = LD_RUN_PATH=$(USRLIBDIRPATH)
1134 CXXLINK = $(CXXENVSETUP) $(CXX)
1138 LDSTRIPFLAGS = LdStripFlags
1139 LDCOMBINEFLAGS = LdCombineFlags
1140 DEPENDFLAGS = DependFlags
1142 MACROFILE = MacroFile
1145 IMAKE_DEFINES = /* leave blank, for command line use only */
1147 IRULESRC = $(CONFIGDIR) /* used in rules file */
1148 IMAKE_CMD = $(IMAKE) -DUseInstalled -I$(IRULESRC) $(IMAKE_DEFINES)
1150 IRULESRC = $(CONFIGSRC)/cf
1151 IMAKE_CMD = $(IMAKE) -I$(IRULESRC) $(IMAKE_DEFINES)
1154 /* clearmake records relevant defines and flags in the build script,
1155 so it knows when they change and we don't need this coarser-level
1156 dependency. We also don't want it, since it prevents sharing if
1157 even one config file, say site.def or host.def, changes. */
1158 ICONFIGFILES = $(IRULESRC)/Imake.tmpl $(IRULESRC)/X11.tmpl \
1159 $(IRULESRC)/site.def $(IRULESRC)/$(MACROFILE) \
1160 SiteIConfigFiles $(EXTRA_ICONFIGFILES)
1163 #ifndef TopLevelProject
1164 # define TopLevelProject X11
1166 #ifndef ProjectRulesFile
1167 # define ProjectRulesFile Concat3(<,TopLevelProject,.rules>)
1169 #include ProjectRulesFile
1170 #ifndef LocalRulesFile
1171 /* need this to make ANSI-style preprocessors happy */
1172 #define LocalRulesFile <noop.rules>
1174 #include LocalRulesFile
1177 * get project-specific configuration and rules
1179 #ifndef ProjectTmplFile
1180 #define ProjectTmplFile Concat3(<,TopLevelProject,.tmpl>)
1182 #include ProjectTmplFile
1183 #ifndef LocalTmplFile
1184 /* need this to make ANSI-style preprocessors happy */
1185 #define LocalTmplFile <noop.rules>
1187 #include LocalTmplFile
1189 #ifdef FixupLibReferences
1190 FixupLibReferences()
1193 /* ConfigDir comes from X11.tmpl */
1194 CONFIGDIR = ConfigDir /* build configuration information */
1198 USRLIBDIRPATH = UsrLibDirPath
1199 LDPRELIBS = LdPreLibs
1200 LDPOSTLIBS = LdPostLibs
1201 TOP_INCLUDES = TopIncludes
1202 PROJECT_DEFINES = ProjectDefines
1204 CXXPROJECT_DEFINES = CplusplusProjectDefines
1207 XCOMM ----------------------------------------------------------------------
1208 XCOMM start of Imakefile
1209 #include INCLUDE_IMAKEFILE
1211 XCOMM ----------------------------------------------------------------------
1212 XCOMM common rules for all Makefiles - do not edit
1215 CPPOnlyCompile($*.c,$(_NOOP_))
1217 * These need to be here so that rules in Imakefile occur first; the blank
1218 * emptyrule is to make sure that an empty Imakefile does not default to make
1225 #ifndef IHaveSpecialMakefileTarget
1230 #ifdef MakefileAdditions
1234 CenterLoadTarget(debug_src,$(SRCS),NullParameter,$(ALLDEFINES))
1236 CenterLoadTarget(debug_obj,$(OBJS),NullParameter,$(ALLDEFINES))
1238 ManKeywordsTarget($(MANPATH))
1241 XCOMM ----------------------------------------------------------------------
1242 XCOMM rules for building in SUBDIRS - do not edit
1244 InstallSubdirs($(SUBDIRS))
1245 InstallManSubdirs($(SUBDIRS))
1246 InstallLinkKitSubdirs($(SUBDIRS))
1247 CleanSubdirs($(SUBDIRS))
1248 TagSubdirs($(SUBDIRS))
1249 MakefileSubdirs($(SUBDIRS))
1250 IncludesSubdirs($(SUBDIRS))
1254 /* must be after all install.man rules that install anything */
1255 #if MakeManKeywords /* typically only at top level */
1256 install.man:: man_keywords
1259 #ifndef IHaveSubdirs
1260 XCOMM ----------------------------------------------------------------------
1261 XCOMM empty rules for directories that do not have SUBDIRS - do not edit
1264 @echo "install in $(CURRENT_DIR) done"
1267 @echo "install.man in $(CURRENT_DIR) done"
1270 @echo "install.linkkit in $(CURRENT_DIR) done"
1278 #endif /* if subdirectory rules are needed */
1280 XCOMM ----------------------------------------------------------------------
1281 XCOMM dependencies generated by makedepend
1282 IncludeMakefile(DependFileName)