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
184 #define KornShell /bin/ksh
187 #define DtKornShell /usr/dt/bin/dtksh
189 #ifndef ConstructMFLAGS
191 #define ConstructMFLAGS YES /* build MFLAGS from MAKEFLAGS */
193 #define ConstructMFLAGS NO /* build MFLAGS from MAKEFLAGS */
197 #ifndef ConstructMAKEFLAGS /* needed on old BSD-based? */
198 #define ConstructMAKEFLAGS NO /* build MAKEFLAGS from MFLAGS */
202 #define HasLargeTmp NO /* be paranoid */
205 #ifndef HasBSD44Sockets
206 #define HasBSD44Sockets NO
209 #define HasSockets YES
212 #define HasStreams !HasSockets
218 #if SystemV || SystemV4
226 #define HasVFork NO /* not yet... */
231 #ifndef HasSetUserContext
232 #define HasSetUserContext NO
235 #define HasLibCrypt NO
238 #define HasPutenv NO /* assume not */
240 #ifndef HasVoidSignalReturn
241 #define HasVoidSignalReturn YES /* assume yes */
244 #define HasBsearch YES /* assume yes */
247 #define HasFortran NO
250 #define HasCplusplus YES
256 #define HasSecureRPC NO /* if you have Secure RPC */
259 #define HasKrb5 NO /* if you have Kerberos V5 */
265 #if SystemV || SystemV4
282 #define Krb5Includes -I/krb5/include
284 #ifndef Krb5Libraries
285 #define Krb5Libraries -L/krb5/lib -L/usr/isode/lib -lkrb5 -lcrypto -lisode -lcom_err -ldbm
289 #define Krb5Includes /**/
291 #define Krb5Libraries /**/
293 #ifndef NeedConstPrototypes
294 #define NeedConstPrototypes NO
296 #ifndef NeedVarargsPrototypes
297 #define NeedVarargsPrototypes NO
299 #ifndef NeedNestedPrototypes
300 #define NeedNestedPrototypes NO
302 #ifndef NeedFunctionPrototypes
303 #define NeedFunctionPrototypes (NeedVarargsPrototypes || NeedNestedPrototypes)
305 #ifndef NeedWidePrototypes
306 #define NeedWidePrototypes YES /* mix and match ANSI-C, non-ANSI */
309 #ifndef StripInstalledPrograms
310 #define StripInstalledPrograms NO /* leave symbol table just in case */
312 #ifndef UseCCMakeDepend /* use slow cc -E script */
313 #define UseCCMakeDepend NO
316 /* DefaultUsrBin is independent of ProjectRoot.
317 This is a directory where programs will be found even if PATH
318 is not set, for example when coming in remotely via rsh. */
319 #ifndef DefaultUsrBin
320 #define DefaultUsrBin /usr/bin
325 #define UsrLibDir Concat(ProjectRoot,/lib)
326 #ifndef AlternateUsrLibDir
327 #define AlternateUsrLibDir YES
330 #define UsrLibDir /usr/lib
331 #ifndef AlternateUsrLibDir
332 #define AlternateUsrLibDir NO
336 #ifndef AlternateUsrLibDir
337 #define AlternateUsrLibDir YES
341 #define ShLibDir UsrLibDir
345 #define IncRoot Concat(ProjectRoot,/include)
346 #ifndef AlternateIncRoot
347 #define AlternateIncRoot YES
350 #define IncRoot /usr/include
351 #ifndef AlternateIncRoot
352 #define AlternateIncRoot NO
356 #ifndef AlternateIncRoot
357 #define AlternateIncRoot YES
361 #define LintlibDir $(USRLIBDIR)/lint
363 #ifndef SystemManDirectory
365 #define SystemManDirectory /usr/share/man
367 #define SystemManDirectory /usr/man
370 #ifndef ManDirectoryRoot
372 #define ManDirectoryRoot Concat(ProjectRoot,/man)
374 #define ManDirectoryRoot SystemManDirectory
378 #define ManPath ManDirectoryRoot
380 #ifndef ManSourcePath
381 #define ManSourcePath $(MANPATH)/man
384 #define ManDir $(MANSOURCEPATH)$(MANSUFFIX)
387 #define LibmanDir $(MANSOURCEPATH)$(LIBMANSUFFIX)
390 #define FileManDir $(MANSOURCEPATH)$(FILEMANSUFFIX)
393 #define MiscManDir $(MANSOURCEPATH)$(MISCMANSUFFIX)
396 #define ConfigSrc $(TOP)/config
400 #define DependDir $(CONFIGSRC)/util
402 #define DependDir $(CONFIGSRC)/makedepend
405 #ifndef DependDefines
406 #define DependDefines /**/
408 #ifndef UNCOMPRESSPATH
409 #define UNCOMPRESSPATH /usr/ucb/uncompress
411 #ifndef OptimizedCDebugFlags
412 #define OptimizedCDebugFlags -O
414 #ifndef OptimizedCplusplusDebugFlags
415 #define OptimizedCplusplusDebugFlags OptimizedCDebugFlags
417 #ifndef DebuggableCDebugFlags
418 #define DebuggableCDebugFlags -g
420 #ifndef DebuggableCplusplusDebugFlags
421 #define DebuggableCplusplusDebugFlags DebuggableCDebugFlags
423 #ifndef ProfiledCDebugFlags
424 #define ProfiledCDebugFlags -pg
426 #ifndef ProfiledCplusplusDebugFlags
427 #define ProfiledCplusplusDebugFlags ProfiledCDebugFlags
429 #ifndef NoOpCDebugFlags
430 #define NoOpCDebugFlags /**/
432 #ifndef DefaultCDebugFlags
433 #define DefaultCDebugFlags OptimizedCDebugFlags
435 #ifndef DefaultCplusplusDebugFlags
436 #define DefaultCplusplusDebugFlags OptimizedCplusplusDebugFlags
438 #ifndef DefaultCCOptions
439 #define DefaultCCOptions /* floating point, etc. */
441 #ifndef DefaultCplusplusOptions
442 #define DefaultCplusplusOptions /* floating point, etc. */
445 #define NoRConst NO /* YES if const for structs of funcs is bad */
448 #define InstPgmFlags -s
451 #define InstBinFlags -m 0755
454 #define InstUidFlags -m 4711
457 #define InstLibFlags -m 0644
460 #define InstIncFlags -m 0444
463 #define InstManFlags -m 0444
466 #define InstDatFlags -m 0444
468 #ifndef InstKmemFlags /* put -g kmem -m 2711 in site.def... */
469 #define InstKmemFlags InstUidFlags
475 #if HasLargeTmp || SystemV4
476 #define ArCmd ArCmdBase cq
478 #define ArCmd ArCmdBase clq
482 #if HasLargeTmp || SystemV4
483 #define ArAddCmd ArCmdBase ru
485 #define ArAddCmd ArCmdBase rul
489 #if HasLargeTmp || SystemV4
490 #define ArExtCmd ArCmdBase x
492 #define ArExtCmd ArCmdBase xl
495 #ifndef BootstrapCFlags
496 #define BootstrapCFlags /**/
502 #define HasGcc HasGcc2
504 #ifndef HasGcc2ForCplusplus
505 #define HasGcc2ForCplusplus NO
507 #ifndef HasCenterLineC
508 #define HasCenterLineC NO
510 #ifndef HasCenterLineCplusplus
511 #define HasCenterLineCplusplus NO
515 #define CcCmd gcc -fpcc-struct-return
518 #define CcCmd gcc -fstrength-reduce -fpcc-struct-return
529 #if HasGcc2ForCplusplus
530 #define CplusplusCmd g++
532 #define CplusplusCmd CC
535 #ifndef CplusplusFilt
536 # define CplusplusFilt c++filt
538 #ifndef CplusplusLibC
539 #define CplusplusLibC /**/
541 #ifndef CplusplusStandardDefines
542 #define CplusplusStandardDefines StandardDefines
544 #ifndef CplusplusExtraDefines
545 #define CplusplusExtraDefines /**/
547 #ifndef CplusplusExtraIncludes
548 #define CplusplusExtraIncludes /**/
550 #ifndef CplusplusDependIncludes
551 #define CplusplusDependIncludes /**/
553 #ifndef CplusplusOptions
554 #define CplusplusOptions /**/
556 #ifndef CplusplusSpecialOptions
557 #define CplusplusSpecialOptions /**/
561 #define FortranCmd f77
564 #define FortranFlags /**/
566 #ifndef FortranDebugFlags /* for -O or -g */
567 #define FortranDebugFlags /**/
574 #define CompressCmd compress
580 #define CppCmd /lib/cpp
582 #ifndef CppNoLineInfoOption
583 #define CppNoLineInfoOption /**/
585 #ifndef PreProcessCmd
586 #define PreProcessCmd CcCmd -E
588 #ifndef InstallCmd /* hack should be in project */
589 #if SystemV || SystemV4
590 #ifdef UseInstalled /* assume BINDIR in path */
591 #define InstallCmd bsdinst
593 #define InstallCmd $(SHELL) $(CONFIGSRC)/util/bsdinst.sh
596 #define InstallCmd install
600 #define InstallFlags -c
614 #ifndef CplusplusYaccCmd
615 #define CplusplusYaccCmd YaccCmd
621 #if SystemV || SystemV4
622 #define LintLibFlag -o
624 #define LintLibFlag -C
628 #if SystemV || SystemV4
631 #define LintOpts -axz
638 #define HasSymLinks YES
640 #ifndef LnCmd /* can use cp instead of ln if necessary */
657 #define PerlCmd /usr/bin/perl
660 #define RanlibCmd ranlib
662 #ifndef RanlibInstFlags
663 #define RanlibInstFlags /**/
668 #ifndef StandardIncludes /* for platform-specifics */
669 #define StandardIncludes /**/
671 #ifndef StandardDefines
673 #define StandardDefines -DSYSV
676 #define StandardDefines -DSVR4
678 #define StandardDefines /**/
682 #ifndef StandardCppDefines
683 #define StandardCppDefines StandardDefines
685 #ifndef Malloc0ReturnsNull
686 #define Malloc0ReturnsNull NO
688 #if Malloc0ReturnsNull
689 #ifndef Malloc0ReturnsNullDefines
690 #define Malloc0ReturnsNullDefines -DMALLOC_0_RETURNS_NULL
693 #ifndef ToolkitStringsABIOptions
694 #define ToolkitStringsABIOptions /**/
698 #define NdbmDefines -DNDBM
700 #define NdbmDefines /**/
704 #if !defined(UseInstalled)
705 #define LdPreLib -L$(BUILDLIBDIR)
707 #if AlternateUsrLibDir
708 #define LdPreLib -L$(USRLIBDIR)
710 #define LdPreLib /**/
715 #if !defined(UseInstalled) && AlternateUsrLibDir && !HasLdRunPath
716 #define LdPostLib -L$(USRLIBDIR)
718 #define LdPostLib /**/
722 #define MathLibrary -lm
725 #define DBMLibrary -ldbm
728 #define DlLibrary -ldl
730 #ifndef ExtraLibraries
733 #define ExtraLibraries -lsocket -lnsl -lw
735 #define ExtraLibraries -lnsl -lw
738 #define ExtraLibraries /**/
741 #ifndef ExtraLoadOptions
742 #define ExtraLoadOptions /**/
744 #ifndef ExtraLoadFlags
745 #define ExtraLoadFlags /**/
747 #ifndef LdCombineFlags
749 #define LdCombineFlags -r
751 #define LdCombineFlags -X -r
755 #define LdStripFlags -x
758 #define TagsCmd ctags
760 #ifndef LoaderLibPrefix
761 #define LoaderLibPrefix /**/
764 #ifdef UseInstalled /* assume BINDIR in path */
765 #define ImakeCmd imake
767 #define ImakeCmd $(IMAKESRC)/imake
771 #ifdef UseInstalled /* assume BINDIR in path */
772 #define DependCmd makedepend
774 #define DependCmd $(DEPENDSRC)/makedepend
778 #define DependFlags /**/
780 #ifndef DependFileName
781 #define DependFileName Makefile.dep
783 #ifndef ExportListCmd
784 # ifndef ExportListGenSource
785 # define ExportListCmd /**/
786 # elif !defined(UseInstalled)
787 # define ExportListCmd $(CONFIGSRC)/util/exportlistgen
789 # define ExportListCmd exportlistgen
793 #ifdef UseInstalled /* assume BINDIR in path */
794 #define MkdirHierCmd mkdirhier
796 #define MkdirHierCmd $(SHELL) $(CONFIGSRC)/util/mkdirhier.sh
800 #define TroffCmd psroff
803 #define NroffCmd nroff
809 #define ManMacros -man
824 #define DvipsCmd dvips
827 #define LatexCmd latex
831 #define SentinelCmd sentinel
833 #ifndef SentinelOptions
834 #define SentinelOptions /**/
839 #define PurifyCmd purify
841 #ifndef PurifyOptions
842 #define PurifyOptions /**/
847 #define ProofCmd proof
850 #define ProofOptions /**/
853 #ifndef PathSeparator
854 #define PathSeparator /
863 #define ManSuffix n /* use just one tab or cpp will die */
866 #define LibManSuffix 3 /* use just one tab or cpp will die */
868 #ifndef FileManSuffix
869 #if SystemV || SystemV4 || defined(OSF1Architecture)
870 #define FileManSuffix 4 /* use just one tab or cpp will die */
872 #define FileManSuffix 5 /* use just one tab or cpp will die */
875 #ifndef MiscManSuffix
876 #if SystemV || SystemV4 || defined(OSF1Architecture)
877 #define MiscManSuffix 5 /* use just one tab or cpp will die */
879 #define MiscManSuffix 7 /* use just one tab or cpp will die */
882 #ifndef ExpandManNames
884 #define ExpandManNames NO
886 #define ExpandManNames YES
895 #ifndef SiteIConfigFiles
896 #define SiteIConfigFiles /**/
898 #ifndef ExtraFilesToClean
899 #define ExtraFilesToClean /**/
902 #define FilesToClean *.CKP *.ln *.BAK *.bak *.Osuf core errs ,* *~ *.a .emacs_* tags TAGS make.log MakeOut
905 PATHSEP = PathSeparator
907 KORNSHELL = KornShell
908 DTKORNSHELL = DtKornShell
915 MKDIRHIER = MkdirHierCmd
916 EXPORTLISTGEN = ExportListCmd
917 CONFIGSRC = ConfigSrc
918 IMAKESRC = $(CONFIGSRC)/imake
919 DEPENDSRC = DependDir
920 DEPENDDEFINES = DependDefines
922 INCROOT = IncRoot /* base of where to put header files */
923 USRLIBDIR = UsrLibDir /* nonshared libraries */
924 SHLIBDIR = ShLibDir /* shared libraries */
925 LINTLIBDIR = LintlibDir /* lint libraries */
926 MANPATH = ManPath /* top of manual page tree */
927 MANSOURCEPATH = ManSourcePath /* prefix for man page sources */
928 MANDIR = ManDir /* man pages for commands */
929 LIBMANDIR = LibmanDir /* man pages for library routines */
930 FILEMANDIR = FileManDir /* man pages for config files */
931 MISCMANDIR = MiscManDir /* man pages for miscellaneous files */
934 BOOTSTRAPCFLAGS = BootstrapCFlags /* set if cpp does not have uniq sym */
939 FDEBUGFLAGS = FortranDebugFlags
940 FCFLAGS = FortranFlags $(FDEBUGFLAGS)
947 CXXFILT = CplusplusFilt
948 CXXLIB = CplusplusLibC
949 CXXDEBUGFLAGS = DefaultCplusplusDebugFlags
950 CXXDEPENDINCLUDES = CplusplusDependIncludes
951 CXXEXTRA_DEFINES = CplusplusExtraDefines
952 CXXEXTRA_INCLUDES = CplusplusExtraIncludes
953 CXXSTD_DEFINES = CplusplusStandardDefines $(CXXPROJECT_DEFINES)
954 CXXOPTIONS = CplusplusOptions
955 CXXINCLUDES = $(INCLUDES) $(TOP_INCLUDES) $(CXXEXTRA_INCLUDES)
956 CXXDEFINES = $(CXXINCLUDES) $(CXXSTD_DEFINES) $(THREADS_CXXDEFINES) $(CXXEXTRA_DEFINES) $(DEFINES)
957 CXXFLAGS = $(CXXDEBUGFLAGS) $(CXXOPTIONS) $(THREADS_CXXFLAGS) $(CXXDEFINES)
959 COMPRESS = CompressCmd
961 CPP = CppCmd $(STD_CPP_DEFINES) /* simple filters */
962 PREPROCESSCMD = PreProcessCmd $(STD_CPP_DEFINES) /* prefered; mdep */
964 INSTALLFLAGS = InstallFlags
969 CCYACC = CplusplusYaccCmd
971 LINTLIBFLAG = LintLibFlag
981 RANLIBINSTFLAGS = RanlibInstFlags
984 MANSUFFIX = ManSuffix /* suffix for command man pages */
985 LIBMANSUFFIX = LibManSuffix /* suffix for library man pages */
986 FILEMANSUFFIX = FileManSuffix /* suffix for file format man pages */
987 MISCMANSUFFIX = MiscManSuffix /* suffix for misc man pages */
992 MANMACROS = ManMacros
1002 SENTINEL = SentinelCmd
1003 SENTINELOPTIONS = SentinelOptions
1007 PURIFYOPTIONS = PurifyOptions
1011 PROOFOPTIONS = ProofOptions
1013 STD_INCLUDES = StandardIncludes
1014 STD_CPP_DEFINES = StandardCppDefines $(PROJECT_DEFINES)
1015 STD_DEFINES = StandardDefines $(PROJECT_DEFINES)
1016 EXTRA_LOAD_FLAGS = ExtraLoadFlags
1017 EXTRA_LDOPTIONS = ExtraLoadOptions
1018 EXTRA_LIBRARIES = ExtraLibraries Krb5Libraries
1021 MFLAGS = -$(MAKEFLAGS)
1023 #if ConstructMAKEFLAGS
1024 MAKEFLAGS = $(MFLAGS)
1026 #if HasSharedLibraries
1027 SHAREDCODEDEF = SharedCodeDef
1028 SHLIBDEF = SharedLibraryDef
1029 #ifdef SharedLibraryLoadFlags
1030 SHLIBLDFLAGS = SharedLibraryLoadFlags
1033 * Here we set up flags needed to produce position-independent code
1034 * when doing C and C++ compilation. The default if you specify C
1035 * PIC flags without also specifying C++ PIC flags is to assume that
1036 * the C flags work for both. If your C++ compiler requires different
1037 * flags, specify them explicitly in PositionIndependentCplusplusFlags.
1039 #ifdef PositionIndependentCFlags
1040 PICFLAGS = PositionIndependentCFlags
1042 #ifdef PositionIndependentCplusplusFlags
1043 CXXPICFLAGS = PositionIndependentCplusplusFlags
1045 #ifdef PositionIndependentCFlags
1046 CXXPICFLAGS = PositionIndependentCFlags
1050 #if !HasVoidSignalReturn
1051 SIGNAL_DEFINES = -DSIGNALRETURNSINT
1054 * The following supports forcing of function prototypes
1056 #if NeedFunctionPrototypes && NeedVarargsPrototypes && NeedConstPrototypes && NeedNestedPrototypes
1057 #define _funcprotodef -DFUNCPROTO=15
1059 #if NeedFunctionPrototypes && NeedVarargsPrototypes && NeedNestedPrototypes
1060 #define _funcprotodef -DFUNCPROTO=11
1062 #if NeedFunctionPrototypes && NeedNestedPrototypes
1063 #define _funcprotodef -DFUNCPROTO=9
1065 #if NeedFunctionPrototypes && NeedVarargsPrototypes && NeedConstPrototypes
1066 #define _funcprotodef -DFUNCPROTO=7
1068 #if NeedFunctionPrototypes && NeedConstPrototypes
1069 #define _funcprotodef -DFUNCPROTO=5
1071 #if NeedFunctionPrototypes && NeedVarargsPrototypes
1072 #define _funcprotodef -DFUNCPROTO=3
1074 #if NeedFunctionPrototypes
1075 #define _funcprotodef -DFUNCPROTO
1077 #define _funcprotodef /**/
1085 #if NeedWidePrototypes
1086 #define _wideprotodef /**/
1088 #define _wideprotodef -DNARROWPROTO
1090 PROTO_DEFINES = _funcprotodef _wideprotodef
1091 #undef _funcprotodef
1092 #undef _wideprotodef
1094 #if StripInstalledPrograms
1095 INSTPGMFLAGS = InstPgmFlags /* install flags for stripping */
1099 INSTBINFLAGS = InstBinFlags /* install flags for programs */
1100 INSTUIDFLAGS = InstUidFlags /* install flags for setuid programs */
1101 INSTLIBFLAGS = InstLibFlags /* install flags for libraries */
1102 INSTINCFLAGS = InstIncFlags /* install flags for headers */
1103 INSTMANFLAGS = InstManFlags /* install flags for man pages */
1104 INSTDATFLAGS = InstDatFlags /* install flags for data files */
1105 INSTKMEMFLAGS = InstKmemFlags /* install flags for /dev/kmem progs */
1108 PROJECTROOT = ProjectRoot
1111 # if AlternateIncRoot
1112 # define TopInclude -I$(INCROOT)
1114 # define TopInclude /**/
1117 # define TopInclude -I$(TOP)
1119 CDEBUGFLAGS = DefaultCDebugFlags
1120 CCOPTIONS = DefaultCCOptions /* to distinguish from param flags */
1122 * STD_INCLUDES contains system-specific includes
1123 * TOP_INCLUDES specifies how to get to /usr/include or its build substitute
1124 * EXTRA_INCLUDES contains project-specific includes set in project incfiles
1125 * INCLUDES contains client-specific includes set in Imakefile
1126 * LOCAL_LDFLAGS contains client-specific ld flags flags set in Imakefile
1128 ALLINCLUDES = $(INCLUDES) $(EXTRA_INCLUDES) $(TOP_INCLUDES) $(STD_INCLUDES)
1129 ALLDEFINES = $(ALLINCLUDES) $(STD_DEFINES) $(EXTRA_DEFINES) $(PROTO_DEFINES) $(THREADS_DEFINES) $(DEFINES)
1130 CFLAGS = $(CDEBUGFLAGS) $(CCOPTIONS) $(THREADS_CFLAGS) $(ALLDEFINES)
1131 LINTFLAGS = $(LINTOPTS) -DLINT $(ALLDEFINES) $(DEPEND_DEFINES)
1133 LDPOSTLIB = LdPostLib
1134 LDOPTIONS = $(CDEBUGFLAGS) $(CCOPTIONS) $(EXTRA_LDOPTIONS) $(THREADS_LDFLAGS) $(LOCAL_LDFLAGS) $(LDPRELIBS)
1135 CXXLDOPTIONS = $(CXXDEBUGFLAGS) $(CXXOPTIONS) $(EXTRA_LDOPTIONS) $(THREADS_CXXLDFLAGS) $(LOCAL_LDFLAGS) $(LDPRELIBS)
1137 LDLIBS = $(LDPOSTLIBS) $(THREADS_LIBS) $(SYS_LIBRARIES) $(EXTRA_LIBRARIES)
1138 #if HasBrokenCCForLink
1141 #if AlternateUsrLibDir && HasLdRunPath
1142 CCENVSETUP = LD_RUN_PATH=$(USRLIBDIRPATH)
1143 CCLINK = $(CCENVSETUP) $(CC)
1148 #if AlternateUsrLibDir && HasLdRunPath
1149 CXXENVSETUP = LD_RUN_PATH=$(USRLIBDIRPATH)
1150 CXXLINK = $(CXXENVSETUP) $(CXX)
1154 LDSTRIPFLAGS = LdStripFlags
1155 LDCOMBINEFLAGS = LdCombineFlags
1156 DEPENDFLAGS = DependFlags
1158 MACROFILE = MacroFile
1161 IMAKE_DEFINES = /* leave blank, for command line use only */
1163 IRULESRC = $(CONFIGDIR) /* used in rules file */
1164 IMAKE_CMD = $(IMAKE) -DUseInstalled -I$(IRULESRC) $(IMAKE_DEFINES)
1166 IRULESRC = $(CONFIGSRC)/cf
1167 IMAKE_CMD = $(IMAKE) -I$(IRULESRC) $(IMAKE_DEFINES)
1170 /* clearmake records relevant defines and flags in the build script,
1171 so it knows when they change and we don't need this coarser-level
1172 dependency. We also don't want it, since it prevents sharing if
1173 even one config file, say site.def or host.def, changes. */
1174 ICONFIGFILES = $(IRULESRC)/Imake.tmpl $(IRULESRC)/X11.tmpl \
1175 $(IRULESRC)/site.def $(IRULESRC)/$(MACROFILE) \
1176 SiteIConfigFiles $(EXTRA_ICONFIGFILES)
1179 #ifndef TopLevelProject
1180 # define TopLevelProject X11
1182 #ifndef ProjectRulesFile
1183 # define ProjectRulesFile Concat3(<,TopLevelProject,.rules>)
1185 #include ProjectRulesFile
1186 #ifndef LocalRulesFile
1187 /* need this to make ANSI-style preprocessors happy */
1188 #define LocalRulesFile <noop.rules>
1190 #include LocalRulesFile
1193 * get project-specific configuration and rules
1195 #ifndef ProjectTmplFile
1196 #define ProjectTmplFile Concat3(<,TopLevelProject,.tmpl>)
1198 #include ProjectTmplFile
1199 #ifndef LocalTmplFile
1200 /* need this to make ANSI-style preprocessors happy */
1201 #define LocalTmplFile <noop.rules>
1203 #include LocalTmplFile
1205 #ifdef FixupLibReferences
1206 FixupLibReferences()
1209 /* ConfigDir comes from X11.tmpl */
1210 CONFIGDIR = ConfigDir /* build configuration information */
1214 USRLIBDIRPATH = UsrLibDirPath
1215 LDPRELIBS = LdPreLibs
1216 LDPOSTLIBS = LdPostLibs
1217 TOP_INCLUDES = TopIncludes
1218 PROJECT_DEFINES = ProjectDefines
1220 CXXPROJECT_DEFINES = CplusplusProjectDefines
1223 XCOMM ----------------------------------------------------------------------
1224 XCOMM start of Imakefile
1225 #include INCLUDE_IMAKEFILE
1227 XCOMM ----------------------------------------------------------------------
1228 XCOMM common rules for all Makefiles - do not edit
1231 CPPOnlyCompile($*.c,$(_NOOP_))
1233 * These need to be here so that rules in Imakefile occur first; the blank
1234 * emptyrule is to make sure that an empty Imakefile does not default to make
1241 #ifndef IHaveSpecialMakefileTarget
1246 #ifdef MakefileAdditions
1250 CenterLoadTarget(debug_src,$(SRCS),NullParameter,$(ALLDEFINES))
1252 CenterLoadTarget(debug_obj,$(OBJS),NullParameter,$(ALLDEFINES))
1254 ManKeywordsTarget($(MANPATH))
1257 XCOMM ----------------------------------------------------------------------
1258 XCOMM rules for building in SUBDIRS - do not edit
1260 InstallSubdirs($(SUBDIRS))
1261 InstallManSubdirs($(SUBDIRS))
1262 InstallLinkKitSubdirs($(SUBDIRS))
1263 CleanSubdirs($(SUBDIRS))
1264 TagSubdirs($(SUBDIRS))
1265 MakefileSubdirs($(SUBDIRS))
1266 IncludesSubdirs($(SUBDIRS))
1270 /* must be after all install.man rules that install anything */
1271 #if MakeManKeywords /* typically only at top level */
1272 install.man:: man_keywords
1275 #ifndef IHaveSubdirs
1276 XCOMM ----------------------------------------------------------------------
1277 XCOMM empty rules for directories that do not have SUBDIRS - do not edit
1280 @echo "install in $(CURRENT_DIR) done"
1283 @echo "install.man in $(CURRENT_DIR) done"
1286 @echo "install.linkkit in $(CURRENT_DIR) done"
1294 #endif /* if subdirectory rules are needed */
1296 XCOMM ----------------------------------------------------------------------
1297 XCOMM dependencies generated by makedepend
1298 IncludeMakefile(DependFileName)