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 #define HasCplusplus YES
250 #define HasSecureRPC NO /* if you have Secure RPC */
253 #define HasKrb5 NO /* if you have Kerberos V5 */
259 #if SystemV || SystemV4
276 #define Krb5Includes -I/krb5/include
278 #ifndef Krb5Libraries
279 #define Krb5Libraries -L/krb5/lib -L/usr/isode/lib -lkrb5 -lcrypto -lisode -lcom_err -ldbm
283 #define Krb5Includes /**/
285 #define Krb5Libraries /**/
287 #ifndef NeedConstPrototypes
288 #define NeedConstPrototypes NO
290 #ifndef NeedVarargsPrototypes
291 #define NeedVarargsPrototypes NO
293 #ifndef NeedNestedPrototypes
294 #define NeedNestedPrototypes NO
296 #ifndef NeedFunctionPrototypes
297 #define NeedFunctionPrototypes (NeedVarargsPrototypes || NeedNestedPrototypes)
299 #ifndef NeedWidePrototypes
300 #define NeedWidePrototypes YES /* mix and match ANSI-C, non-ANSI */
303 #ifndef StripInstalledPrograms
304 #define StripInstalledPrograms NO /* leave symbol table just in case */
306 #ifndef UseCCMakeDepend /* use slow cc -E script */
307 #define UseCCMakeDepend NO
310 /* DefaultUsrBin is independent of ProjectRoot.
311 This is a directory where programs will be found even if PATH
312 is not set, for example when coming in remotely via rsh. */
313 #ifndef DefaultUsrBin
314 #define DefaultUsrBin /usr/bin
319 #define UsrLibDir Concat(ProjectRoot,/lib)
320 #ifndef AlternateUsrLibDir
321 #define AlternateUsrLibDir YES
324 #define UsrLibDir /usr/lib
325 #ifndef AlternateUsrLibDir
326 #define AlternateUsrLibDir NO
330 #ifndef AlternateUsrLibDir
331 #define AlternateUsrLibDir YES
335 #define ShLibDir UsrLibDir
339 #define IncRoot Concat(ProjectRoot,/include)
340 #ifndef AlternateIncRoot
341 #define AlternateIncRoot YES
344 #define IncRoot /usr/include
345 #ifndef AlternateIncRoot
346 #define AlternateIncRoot NO
350 #ifndef AlternateIncRoot
351 #define AlternateIncRoot YES
355 #define LintlibDir $(USRLIBDIR)/lint
357 #ifndef SystemManDirectory
359 #define SystemManDirectory /usr/share/man
361 #define SystemManDirectory /usr/man
364 #ifndef ManDirectoryRoot
366 #define ManDirectoryRoot Concat(ProjectRoot,/man)
368 #define ManDirectoryRoot SystemManDirectory
372 #define ManPath ManDirectoryRoot
374 #ifndef ManSourcePath
375 #define ManSourcePath $(MANPATH)/man
378 #define ManDir $(MANSOURCEPATH)$(MANSUFFIX)
381 #define LibmanDir $(MANSOURCEPATH)$(LIBMANSUFFIX)
384 #define FileManDir $(MANSOURCEPATH)$(FILEMANSUFFIX)
387 #define MiscManDir $(MANSOURCEPATH)$(MISCMANSUFFIX)
390 #define ConfigSrc $(TOP)/config
394 #define DependDir $(CONFIGSRC)/util
396 #define DependDir $(CONFIGSRC)/makedepend
399 #ifndef UNCOMPRESSPATH
400 #define UNCOMPRESSPATH /usr/ucb/uncompress
402 #ifndef OptimizedCDebugFlags
403 #define OptimizedCDebugFlags -O
405 #ifndef OptimizedCplusplusDebugFlags
406 #define OptimizedCplusplusDebugFlags OptimizedCDebugFlags
408 #ifndef DebuggableCDebugFlags
409 #define DebuggableCDebugFlags -g
411 #ifndef DebuggableCplusplusDebugFlags
412 #define DebuggableCplusplusDebugFlags DebuggableCDebugFlags
414 #ifndef ProfiledCDebugFlags
415 #define ProfiledCDebugFlags -pg
417 #ifndef ProfiledCplusplusDebugFlags
418 #define ProfiledCplusplusDebugFlags ProfiledCDebugFlags
420 #ifndef NoOpCDebugFlags
421 #define NoOpCDebugFlags /**/
423 #ifndef DefaultCDebugFlags
424 #define DefaultCDebugFlags OptimizedCDebugFlags
426 #ifndef DefaultCplusplusDebugFlags
427 #define DefaultCplusplusDebugFlags OptimizedCplusplusDebugFlags
429 #ifndef DefaultCCOptions
430 #define DefaultCCOptions /* floating point, etc. */
432 #ifndef DefaultCplusplusOptions
433 #define DefaultCplusplusOptions /* floating point, etc. */
436 #define NoRConst NO /* YES if const for structs of funcs is bad */
439 #define InstPgmFlags -s
442 #define InstBinFlags -m 0755
445 #define InstUidFlags -m 4711
448 #define InstLibFlags -m 0644
451 #define InstIncFlags -m 0444
454 #define InstManFlags -m 0444
457 #define InstDatFlags -m 0444
459 #ifndef InstKmemFlags /* put -g kmem -m 2711 in site.def... */
460 #define InstKmemFlags InstUidFlags
466 #if HasLargeTmp || SystemV4
467 #define ArCmd ArCmdBase cq
469 #define ArCmd ArCmdBase clq
473 #if HasLargeTmp || SystemV4
474 #define ArAddCmd ArCmdBase ru
476 #define ArAddCmd ArCmdBase rul
480 #if HasLargeTmp || SystemV4
481 #define ArExtCmd ArCmdBase x
483 #define ArExtCmd ArCmdBase xl
486 #ifndef BootstrapCFlags
487 #define BootstrapCFlags /**/
493 #define HasGcc HasGcc2
495 #ifndef HasGcc2ForCplusplus
496 #define HasGcc2ForCplusplus NO
498 #ifndef HasCenterLineC
499 #define HasCenterLineC NO
501 #ifndef HasCenterLineCplusplus
502 #define HasCenterLineCplusplus NO
506 #define CcCmd gcc -fpcc-struct-return
509 #define CcCmd gcc -fstrength-reduce -fpcc-struct-return
520 #if HasGcc2ForCplusplus
521 #define CplusplusCmd g++
523 #define CplusplusCmd CC
526 #ifndef CplusplusFilt
527 # define CplusplusFilt c++filt
529 #ifndef CplusplusLibC
530 #define CplusplusLibC /**/
532 #ifndef CplusplusStandardDefines
533 #define CplusplusStandardDefines StandardDefines
535 #ifndef CplusplusExtraDefines
536 #define CplusplusExtraDefines /**/
538 #ifndef CplusplusExtraIncludes
539 #define CplusplusExtraIncludes /**/
541 #ifndef CplusplusDependIncludes
542 #define CplusplusDependIncludes /**/
544 #ifndef CplusplusOptions
545 #define CplusplusOptions /**/
547 #ifndef CplusplusSpecialOptions
548 #define CplusplusSpecialOptions /**/
552 #define FortranCmd f77
555 #define FortranFlags /**/
557 #ifndef FortranDebugFlags /* for -O or -g */
558 #define FortranDebugFlags /**/
565 #define CompressCmd compress
571 #define CppCmd /lib/cpp
573 #ifndef CppNoLineInfoOption
574 #define CppNoLineInfoOption /**/
576 #ifndef PreProcessCmd
577 #define PreProcessCmd CcCmd -E
579 #ifndef InstallCmd /* hack should be in project */
580 #if SystemV || SystemV4
581 #ifdef UseInstalled /* assume BINDIR in path */
582 #define InstallCmd bsdinst
584 #define InstallCmd $(SHELL) $(CONFIGSRC)/util/bsdinst.sh
587 #define InstallCmd install
591 #define InstallFlags -c
605 #ifndef CplusplusYaccCmd
606 #define CplusplusYaccCmd YaccCmd
612 #if SystemV || SystemV4
613 #define LintLibFlag -o
615 #define LintLibFlag -C
619 #if SystemV || SystemV4
622 #define LintOpts -axz
629 #define HasSymLinks YES
631 #ifndef LnCmd /* can use cp instead of ln if necessary */
645 #define RanlibCmd ranlib
647 #ifndef RanlibInstFlags
648 #define RanlibInstFlags /**/
653 #ifndef StandardIncludes /* for platform-specifics */
654 #define StandardIncludes /**/
656 #ifndef StandardDefines
658 #define StandardDefines -DSYSV
661 #define StandardDefines -DSVR4
663 #define StandardDefines /**/
667 #ifndef StandardCppDefines
668 #define StandardCppDefines StandardDefines
670 #ifndef Malloc0ReturnsNull
671 #define Malloc0ReturnsNull NO
673 #if Malloc0ReturnsNull
674 #ifndef Malloc0ReturnsNullDefines
675 #define Malloc0ReturnsNullDefines -DMALLOC_0_RETURNS_NULL
678 #ifndef ToolkitStringsABIOptions
679 #define ToolkitStringsABIOptions /**/
683 #define NdbmDefines -DNDBM
685 #define NdbmDefines /**/
689 #if !defined(UseInstalled)
690 #define LdPreLib -L$(BUILDLIBDIR)
692 #if AlternateUsrLibDir
693 #define LdPreLib -L$(USRLIBDIR)
695 #define LdPreLib /**/
700 #if !defined(UseInstalled) && AlternateUsrLibDir && !HasLdRunPath
701 #define LdPostLib -L$(USRLIBDIR)
703 #define LdPostLib /**/
707 #define MathLibrary -lm
710 #define DBMLibrary -ldbm
713 #define DlLibrary -ldl
715 #ifndef ExtraLibraries
718 #define ExtraLibraries -lsocket -lnsl -lw
720 #define ExtraLibraries -lnsl -lw
723 #define ExtraLibraries /**/
726 #ifndef ExtraLoadOptions
727 #define ExtraLoadOptions /**/
729 #ifndef ExtraLoadFlags
730 #define ExtraLoadFlags /**/
732 #ifndef LdCombineFlags
734 #define LdCombineFlags -r
736 #define LdCombineFlags -X -r
740 #define LdStripFlags -x
743 #define TagsCmd ctags
745 #ifndef LoaderLibPrefix
746 #define LoaderLibPrefix /**/
749 #ifdef UseInstalled /* assume BINDIR in path */
750 #define ImakeCmd imake
752 #define ImakeCmd $(IMAKESRC)/imake
756 #ifdef UseInstalled /* assume BINDIR in path */
757 #define DependCmd makedepend
759 #define DependCmd $(DEPENDSRC)/makedepend
763 #define DependFlags /**/
765 #ifndef DependFileName
766 #define DependFileName Makefile.dep
768 #ifndef ExportListCmd
769 # ifndef ExportListGenSource
770 # define ExportListCmd /**/
771 # elif !defined(UseInstalled)
772 # define ExportListCmd $(CONFIGSRC)/util/exportlistgen
774 # define ExportListCmd exportlistgen
778 #ifdef UseInstalled /* assume BINDIR in path */
779 #define MkdirHierCmd mkdirhier
781 #define MkdirHierCmd $(SHELL) $(CONFIGSRC)/util/mkdirhier.sh
785 #define TroffCmd psroff
788 #define NroffCmd nroff
794 #define ManMacros -man
809 #define DvipsCmd dvips
812 #define LatexCmd latex
816 #define SentinelCmd sentinel
818 #ifndef SentinelOptions
819 #define SentinelOptions /**/
824 #define PurifyCmd purify
826 #ifndef PurifyOptions
827 #define PurifyOptions /**/
832 #define ProofCmd proof
835 #define ProofOptions /**/
838 #ifndef PathSeparator
839 #define PathSeparator /
848 #define ManSuffix n /* use just one tab or cpp will die */
851 #define LibManSuffix 3 /* use just one tab or cpp will die */
853 #ifndef FileManSuffix
854 #if SystemV || SystemV4 || defined(OSF1Architecture)
855 #define FileManSuffix 4 /* use just one tab or cpp will die */
857 #define FileManSuffix 5 /* use just one tab or cpp will die */
860 #ifndef MiscManSuffix
861 #if SystemV || SystemV4 || defined(OSF1Architecture)
862 #define MiscManSuffix 5 /* use just one tab or cpp will die */
864 #define MiscManSuffix 7 /* use just one tab or cpp will die */
867 #ifndef ExpandManNames
869 #define ExpandManNames NO
871 #define ExpandManNames YES
880 #ifndef SiteIConfigFiles
881 #define SiteIConfigFiles /**/
883 #ifndef ExtraFilesToClean
884 #define ExtraFilesToClean /**/
887 #define FilesToClean *.CKP *.ln *.BAK *.bak *.Osuf core errs ,* *~ *.a .emacs_* tags TAGS make.log MakeOut
890 PATHSEP = PathSeparator
898 MKDIRHIER = MkdirHierCmd
899 EXPORTLISTGEN = ExportListCmd
900 CONFIGSRC = ConfigSrc
901 IMAKESRC = $(CONFIGSRC)/imake
902 DEPENDSRC = DependDir
904 INCROOT = IncRoot /* base of where to put header files */
905 USRLIBDIR = UsrLibDir /* nonshared libraries */
906 SHLIBDIR = ShLibDir /* shared libraries */
907 LINTLIBDIR = LintlibDir /* lint libraries */
908 MANPATH = ManPath /* top of manual page tree */
909 MANSOURCEPATH = ManSourcePath /* prefix for man page sources */
910 MANDIR = ManDir /* man pages for commands */
911 LIBMANDIR = LibmanDir /* man pages for library routines */
912 FILEMANDIR = FileManDir /* man pages for config files */
913 MISCMANDIR = MiscManDir /* man pages for miscellaneous files */
916 BOOTSTRAPCFLAGS = BootstrapCFlags /* set if cpp does not have uniq sym */
921 FDEBUGFLAGS = FortranDebugFlags
922 FCFLAGS = FortranFlags $(FDEBUGFLAGS)
929 CXXFILT = CplusplusFilt
930 CXXLIB = CplusplusLibC
931 CXXDEBUGFLAGS = DefaultCplusplusDebugFlags
932 CXXDEPENDINCLUDES = CplusplusDependIncludes
933 CXXEXTRA_DEFINES = CplusplusExtraDefines
934 CXXEXTRA_INCLUDES = CplusplusExtraIncludes
935 CXXSTD_DEFINES = CplusplusStandardDefines $(CXXPROJECT_DEFINES)
936 CXXOPTIONS = CplusplusOptions
937 CXXINCLUDES = $(INCLUDES) $(TOP_INCLUDES) $(CXXEXTRA_INCLUDES)
938 CXXDEFINES = $(CXXINCLUDES) $(CXXSTD_DEFINES) $(THREADS_CXXDEFINES) $(CXXEXTRA_DEFINES) $(DEFINES)
939 CXXFLAGS = $(CXXDEBUGFLAGS) $(CXXOPTIONS) $(THREADS_CXXFLAGS) $(CXXDEFINES)
941 COMPRESS = CompressCmd
943 CPP = CppCmd $(STD_CPP_DEFINES) /* simple filters */
944 PREPROCESSCMD = PreProcessCmd $(STD_CPP_DEFINES) /* prefered; mdep */
946 INSTALLFLAGS = InstallFlags
951 CCYACC = CplusplusYaccCmd
953 LINTLIBFLAG = LintLibFlag
961 RANLIBINSTFLAGS = RanlibInstFlags
964 MANSUFFIX = ManSuffix /* suffix for command man pages */
965 LIBMANSUFFIX = LibManSuffix /* suffix for library man pages */
966 FILEMANSUFFIX = FileManSuffix /* suffix for file format man pages */
967 MISCMANSUFFIX = MiscManSuffix /* suffix for misc man pages */
972 MANMACROS = ManMacros
982 SENTINEL = SentinelCmd
983 SENTINELOPTIONS = SentinelOptions
987 PURIFYOPTIONS = PurifyOptions
991 PROOFOPTIONS = ProofOptions
993 STD_INCLUDES = StandardIncludes
994 STD_CPP_DEFINES = StandardCppDefines $(PROJECT_DEFINES)
995 STD_DEFINES = StandardDefines $(PROJECT_DEFINES)
996 EXTRA_LOAD_FLAGS = ExtraLoadFlags
997 EXTRA_LDOPTIONS = ExtraLoadOptions
998 EXTRA_LIBRARIES = ExtraLibraries Krb5Libraries
1001 MFLAGS = -$(MAKEFLAGS)
1003 #if ConstructMAKEFLAGS
1004 MAKEFLAGS = $(MFLAGS)
1006 #if HasSharedLibraries
1007 SHAREDCODEDEF = SharedCodeDef
1008 SHLIBDEF = SharedLibraryDef
1009 #ifdef SharedLibraryLoadFlags
1010 SHLIBLDFLAGS = SharedLibraryLoadFlags
1013 * Here we set up flags needed to produce position-independent code
1014 * when doing C and C++ compilation. The default if you specify C
1015 * PIC flags without also specifying C++ PIC flags is to assume that
1016 * the C flags work for both. If your C++ compiler requires different
1017 * flags, specify them explicitly in PositionIndependentCplusplusFlags.
1019 #ifdef PositionIndependentCFlags
1020 PICFLAGS = PositionIndependentCFlags
1022 #ifdef PositionIndependentCplusplusFlags
1023 CXXPICFLAGS = PositionIndependentCplusplusFlags
1025 #ifdef PositionIndependentCFlags
1026 CXXPICFLAGS = PositionIndependentCFlags
1030 #if !HasVoidSignalReturn
1031 SIGNAL_DEFINES = -DSIGNALRETURNSINT
1034 * The following supports forcing of function prototypes
1036 #if NeedFunctionPrototypes && NeedVarargsPrototypes && NeedConstPrototypes && NeedNestedPrototypes
1037 #define _funcprotodef -DFUNCPROTO=15
1039 #if NeedFunctionPrototypes && NeedVarargsPrototypes && NeedNestedPrototypes
1040 #define _funcprotodef -DFUNCPROTO=11
1042 #if NeedFunctionPrototypes && NeedNestedPrototypes
1043 #define _funcprotodef -DFUNCPROTO=9
1045 #if NeedFunctionPrototypes && NeedVarargsPrototypes && NeedConstPrototypes
1046 #define _funcprotodef -DFUNCPROTO=7
1048 #if NeedFunctionPrototypes && NeedConstPrototypes
1049 #define _funcprotodef -DFUNCPROTO=5
1051 #if NeedFunctionPrototypes && NeedVarargsPrototypes
1052 #define _funcprotodef -DFUNCPROTO=3
1054 #if NeedFunctionPrototypes
1055 #define _funcprotodef -DFUNCPROTO
1057 #define _funcprotodef /**/
1065 #if NeedWidePrototypes
1066 #define _wideprotodef /**/
1068 #define _wideprotodef -DNARROWPROTO
1070 PROTO_DEFINES = _funcprotodef _wideprotodef
1071 #undef _funcprotodef
1072 #undef _wideprotodef
1074 #if StripInstalledPrograms
1075 INSTPGMFLAGS = InstPgmFlags /* install flags for stripping */
1079 INSTBINFLAGS = InstBinFlags /* install flags for programs */
1080 INSTUIDFLAGS = InstUidFlags /* install flags for setuid programs */
1081 INSTLIBFLAGS = InstLibFlags /* install flags for libraries */
1082 INSTINCFLAGS = InstIncFlags /* install flags for headers */
1083 INSTMANFLAGS = InstManFlags /* install flags for man pages */
1084 INSTDATFLAGS = InstDatFlags /* install flags for data files */
1085 INSTKMEMFLAGS = InstKmemFlags /* install flags for /dev/kmem progs */
1088 PROJECTROOT = ProjectRoot
1091 # if AlternateIncRoot
1092 # define TopInclude -I$(INCROOT)
1094 # define TopInclude /**/
1097 # define TopInclude -I$(TOP)
1099 CDEBUGFLAGS = DefaultCDebugFlags
1100 CCOPTIONS = DefaultCCOptions /* to distinguish from param flags */
1102 * STD_INCLUDES contains system-specific includes
1103 * TOP_INCLUDES specifies how to get to /usr/include or its build substitute
1104 * EXTRA_INCLUDES contains project-specific includes set in project incfiles
1105 * INCLUDES contains client-specific includes set in Imakefile
1106 * LOCAL_LDFLAGS contains client-specific ld flags flags set in Imakefile
1108 ALLINCLUDES = $(INCLUDES) $(EXTRA_INCLUDES) $(TOP_INCLUDES) $(STD_INCLUDES)
1109 ALLDEFINES = $(ALLINCLUDES) $(STD_DEFINES) $(EXTRA_DEFINES) $(PROTO_DEFINES) $(THREADS_DEFINES) $(DEFINES)
1110 CFLAGS = $(CDEBUGFLAGS) $(CCOPTIONS) $(THREADS_CFLAGS) $(ALLDEFINES)
1111 LINTFLAGS = $(LINTOPTS) -DLINT $(ALLDEFINES) $(DEPEND_DEFINES)
1113 LDPOSTLIB = LdPostLib
1114 LDOPTIONS = $(CDEBUGFLAGS) $(CCOPTIONS) $(EXTRA_LDOPTIONS) $(THREADS_LDFLAGS) $(LOCAL_LDFLAGS) $(LDPRELIBS)
1115 CXXLDOPTIONS = $(CXXDEBUGFLAGS) $(CXXOPTIONS) $(EXTRA_LDOPTIONS) $(THREADS_CXXLDFLAGS) $(LOCAL_LDFLAGS) $(LDPRELIBS)
1117 LDLIBS = $(LDPOSTLIBS) $(THREADS_LIBS) $(SYS_LIBRARIES) $(EXTRA_LIBRARIES)
1118 #if HasBrokenCCForLink
1121 #if AlternateUsrLibDir && HasLdRunPath
1122 CCENVSETUP = LD_RUN_PATH=$(USRLIBDIRPATH)
1123 CCLINK = $(CCENVSETUP) $(CC)
1128 #if AlternateUsrLibDir && HasLdRunPath
1129 CXXENVSETUP = LD_RUN_PATH=$(USRLIBDIRPATH)
1130 CXXLINK = $(CXXENVSETUP) $(CXX)
1134 LDSTRIPFLAGS = LdStripFlags
1135 LDCOMBINEFLAGS = LdCombineFlags
1136 DEPENDFLAGS = DependFlags
1138 MACROFILE = MacroFile
1141 IMAKE_DEFINES = /* leave blank, for command line use only */
1143 IRULESRC = $(CONFIGDIR) /* used in rules file */
1144 IMAKE_CMD = $(IMAKE) -DUseInstalled -I$(IRULESRC) $(IMAKE_DEFINES)
1146 IRULESRC = $(CONFIGSRC)/cf
1147 IMAKE_CMD = $(IMAKE) -I$(IRULESRC) $(IMAKE_DEFINES)
1150 /* clearmake records relevant defines and flags in the build script,
1151 so it knows when they change and we don't need this coarser-level
1152 dependency. We also don't want it, since it prevents sharing if
1153 even one config file, say site.def or host.def, changes. */
1154 ICONFIGFILES = $(IRULESRC)/Imake.tmpl $(IRULESRC)/X11.tmpl \
1155 $(IRULESRC)/site.def $(IRULESRC)/$(MACROFILE) \
1156 SiteIConfigFiles $(EXTRA_ICONFIGFILES)
1159 #ifndef TopLevelProject
1160 # define TopLevelProject X11
1162 #ifndef ProjectRulesFile
1163 # define ProjectRulesFile Concat3(<,TopLevelProject,.rules>)
1165 #include ProjectRulesFile
1166 #ifndef LocalRulesFile
1167 /* need this to make ANSI-style preprocessors happy */
1168 #define LocalRulesFile <noop.rules>
1170 #include LocalRulesFile
1173 * get project-specific configuration and rules
1175 #ifndef ProjectTmplFile
1176 #define ProjectTmplFile Concat3(<,TopLevelProject,.tmpl>)
1178 #include ProjectTmplFile
1179 #ifndef LocalTmplFile
1180 /* need this to make ANSI-style preprocessors happy */
1181 #define LocalTmplFile <noop.rules>
1183 #include LocalTmplFile
1185 #ifdef FixupLibReferences
1186 FixupLibReferences()
1189 /* ConfigDir comes from X11.tmpl */
1190 CONFIGDIR = ConfigDir /* build configuration information */
1194 USRLIBDIRPATH = UsrLibDirPath
1195 LDPRELIBS = LdPreLibs
1196 LDPOSTLIBS = LdPostLibs
1197 TOP_INCLUDES = TopIncludes
1198 PROJECT_DEFINES = ProjectDefines
1200 CXXPROJECT_DEFINES = CplusplusProjectDefines
1203 XCOMM ----------------------------------------------------------------------
1204 XCOMM start of Imakefile
1205 #include INCLUDE_IMAKEFILE
1207 XCOMM ----------------------------------------------------------------------
1208 XCOMM common rules for all Makefiles - do not edit
1211 CPPOnlyCompile($*.c,$(_NOOP_))
1213 * These need to be here so that rules in Imakefile occur first; the blank
1214 * emptyrule is to make sure that an empty Imakefile does not default to make
1221 #ifndef IHaveSpecialMakefileTarget
1226 #ifdef MakefileAdditions
1230 CenterLoadTarget(debug_src,$(SRCS),NullParameter,$(ALLDEFINES))
1232 CenterLoadTarget(debug_obj,$(OBJS),NullParameter,$(ALLDEFINES))
1234 ManKeywordsTarget($(MANPATH))
1237 XCOMM ----------------------------------------------------------------------
1238 XCOMM rules for building in SUBDIRS - do not edit
1240 InstallSubdirs($(SUBDIRS))
1241 InstallManSubdirs($(SUBDIRS))
1242 InstallLinkKitSubdirs($(SUBDIRS))
1243 CleanSubdirs($(SUBDIRS))
1244 TagSubdirs($(SUBDIRS))
1245 MakefileSubdirs($(SUBDIRS))
1246 IncludesSubdirs($(SUBDIRS))
1250 /* must be after all install.man rules that install anything */
1251 #if MakeManKeywords /* typically only at top level */
1252 install.man:: man_keywords
1255 #ifndef IHaveSubdirs
1256 XCOMM ----------------------------------------------------------------------
1257 XCOMM empty rules for directories that do not have SUBDIRS - do not edit
1260 @echo "install in $(CURRENT_DIR) done"
1263 @echo "install.man in $(CURRENT_DIR) done"
1266 @echo "install.linkkit in $(CURRENT_DIR) done"
1274 #endif /* if subdirectory rules are needed */
1276 XCOMM ----------------------------------------------------------------------
1277 XCOMM dependencies generated by makedepend
1278 IncludeMakefile(DependFileName)