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
186 #ifndef ConstructMFLAGS
188 #define ConstructMFLAGS YES /* build MFLAGS from MAKEFLAGS */
190 #define ConstructMFLAGS NO /* build MFLAGS from MAKEFLAGS */
194 #ifndef ConstructMAKEFLAGS /* needed on old BSD-based? */
195 #define ConstructMAKEFLAGS NO /* build MAKEFLAGS from MFLAGS */
199 #define HasLargeTmp NO /* be paranoid */
202 #ifndef HasBSD44Sockets
203 #define HasBSD44Sockets NO
206 #define HasSockets YES
209 #define HasStreams !HasSockets
215 #if SystemV || SystemV4
223 #define HasVFork NO /* not yet... */
228 #ifndef HasSetUserContext
229 #define HasSetUserContext NO
232 #define HasLibCrypt NO
235 #define HasPutenv NO /* assume not */
237 #ifndef HasVoidSignalReturn
238 #define HasVoidSignalReturn YES /* assume yes */
241 #define HasBsearch YES /* assume yes */
244 #define HasFortran NO
247 #define HasCplusplus YES
253 #define HasSecureRPC NO /* if you have Secure RPC */
256 #define HasKrb5 NO /* if you have Kerberos V5 */
262 #if SystemV || SystemV4
279 #define Krb5Includes -I/krb5/include
281 #ifndef Krb5Libraries
282 #define Krb5Libraries -L/krb5/lib -L/usr/isode/lib -lkrb5 -lcrypto -lisode -lcom_err -ldbm
286 #define Krb5Includes /**/
288 #define Krb5Libraries /**/
290 #ifndef NeedConstPrototypes
291 #define NeedConstPrototypes NO
293 #ifndef NeedVarargsPrototypes
294 #define NeedVarargsPrototypes NO
296 #ifndef NeedNestedPrototypes
297 #define NeedNestedPrototypes NO
299 #ifndef NeedFunctionPrototypes
300 #define NeedFunctionPrototypes (NeedVarargsPrototypes || NeedNestedPrototypes)
302 #ifndef NeedWidePrototypes
303 #define NeedWidePrototypes YES /* mix and match ANSI-C, non-ANSI */
306 #ifndef StripInstalledPrograms
307 #define StripInstalledPrograms NO /* leave symbol table just in case */
309 #ifndef UseCCMakeDepend /* use slow cc -E script */
310 #define UseCCMakeDepend NO
313 /* DefaultUsrBin is independent of ProjectRoot.
314 This is a directory where programs will be found even if PATH
315 is not set, for example when coming in remotely via rsh. */
316 #ifndef DefaultUsrBin
317 #define DefaultUsrBin /usr/bin
322 #define UsrLibDir Concat(ProjectRoot,/lib)
323 #ifndef AlternateUsrLibDir
324 #define AlternateUsrLibDir YES
327 #define UsrLibDir /usr/lib
328 #ifndef AlternateUsrLibDir
329 #define AlternateUsrLibDir NO
333 #ifndef AlternateUsrLibDir
334 #define AlternateUsrLibDir YES
338 #define ShLibDir UsrLibDir
342 #define IncRoot Concat(ProjectRoot,/include)
343 #ifndef AlternateIncRoot
344 #define AlternateIncRoot YES
347 #define IncRoot /usr/include
348 #ifndef AlternateIncRoot
349 #define AlternateIncRoot NO
353 #ifndef AlternateIncRoot
354 #define AlternateIncRoot YES
358 #define LintlibDir $(USRLIBDIR)/lint
360 #ifndef SystemManDirectory
362 #define SystemManDirectory /usr/share/man
364 #define SystemManDirectory /usr/man
367 #ifndef ManDirectoryRoot
369 #define ManDirectoryRoot Concat(ProjectRoot,/man)
371 #define ManDirectoryRoot SystemManDirectory
375 #define ManPath ManDirectoryRoot
377 #ifndef ManSourcePath
378 #define ManSourcePath $(MANPATH)/man
381 #define ManDir $(MANSOURCEPATH)$(MANSUFFIX)
384 #define LibmanDir $(MANSOURCEPATH)$(LIBMANSUFFIX)
387 #define FileManDir $(MANSOURCEPATH)$(FILEMANSUFFIX)
390 #define MiscManDir $(MANSOURCEPATH)$(MISCMANSUFFIX)
393 #define ConfigSrc $(TOP)/config
397 #define DependDir $(CONFIGSRC)/util
399 #define DependDir $(CONFIGSRC)/makedepend
402 #ifndef UNCOMPRESSPATH
403 #define UNCOMPRESSPATH /usr/ucb/uncompress
405 #ifndef OptimizedCDebugFlags
406 #define OptimizedCDebugFlags -O
408 #ifndef OptimizedCplusplusDebugFlags
409 #define OptimizedCplusplusDebugFlags OptimizedCDebugFlags
411 #ifndef DebuggableCDebugFlags
412 #define DebuggableCDebugFlags -g
414 #ifndef DebuggableCplusplusDebugFlags
415 #define DebuggableCplusplusDebugFlags DebuggableCDebugFlags
417 #ifndef ProfiledCDebugFlags
418 #define ProfiledCDebugFlags -pg
420 #ifndef ProfiledCplusplusDebugFlags
421 #define ProfiledCplusplusDebugFlags ProfiledCDebugFlags
423 #ifndef NoOpCDebugFlags
424 #define NoOpCDebugFlags /**/
426 #ifndef DefaultCDebugFlags
427 #define DefaultCDebugFlags OptimizedCDebugFlags
429 #ifndef DefaultCplusplusDebugFlags
430 #define DefaultCplusplusDebugFlags OptimizedCplusplusDebugFlags
432 #ifndef DefaultCCOptions
433 #define DefaultCCOptions /* floating point, etc. */
435 #ifndef DefaultCplusplusOptions
436 #define DefaultCplusplusOptions /* floating point, etc. */
439 #define NoRConst NO /* YES if const for structs of funcs is bad */
442 #define InstPgmFlags -s
445 #define InstBinFlags -m 0755
448 #define InstUidFlags -m 4711
451 #define InstLibFlags -m 0644
454 #define InstIncFlags -m 0444
457 #define InstManFlags -m 0444
460 #define InstDatFlags -m 0444
462 #ifndef InstKmemFlags /* put -g kmem -m 2711 in site.def... */
463 #define InstKmemFlags InstUidFlags
469 #if HasLargeTmp || SystemV4
470 #define ArCmd ArCmdBase cq
472 #define ArCmd ArCmdBase clq
476 #if HasLargeTmp || SystemV4
477 #define ArAddCmd ArCmdBase ru
479 #define ArAddCmd ArCmdBase rul
483 #if HasLargeTmp || SystemV4
484 #define ArExtCmd ArCmdBase x
486 #define ArExtCmd ArCmdBase xl
489 #ifndef BootstrapCFlags
490 #define BootstrapCFlags /**/
496 #define HasGcc HasGcc2
498 #ifndef HasGcc2ForCplusplus
499 #define HasGcc2ForCplusplus NO
501 #ifndef HasCenterLineC
502 #define HasCenterLineC NO
504 #ifndef HasCenterLineCplusplus
505 #define HasCenterLineCplusplus NO
509 #define CcCmd gcc -fpcc-struct-return
512 #define CcCmd gcc -fstrength-reduce -fpcc-struct-return
523 #if HasGcc2ForCplusplus
524 #define CplusplusCmd g++
526 #define CplusplusCmd CC
529 #ifndef CplusplusFilt
530 # define CplusplusFilt c++filt
532 #ifndef CplusplusLibC
533 #define CplusplusLibC /**/
535 #ifndef CplusplusStandardDefines
536 #define CplusplusStandardDefines StandardDefines
538 #ifndef CplusplusExtraDefines
539 #define CplusplusExtraDefines /**/
541 #ifndef CplusplusExtraIncludes
542 #define CplusplusExtraIncludes /**/
544 #ifndef CplusplusDependIncludes
545 #define CplusplusDependIncludes /**/
547 #ifndef CplusplusOptions
548 #define CplusplusOptions /**/
550 #ifndef CplusplusSpecialOptions
551 #define CplusplusSpecialOptions /**/
555 #define FortranCmd f77
558 #define FortranFlags /**/
560 #ifndef FortranDebugFlags /* for -O or -g */
561 #define FortranDebugFlags /**/
568 #define CompressCmd compress
574 #define CppCmd /lib/cpp
576 #ifndef CppNoLineInfoOption
577 #define CppNoLineInfoOption /**/
579 #ifndef PreProcessCmd
580 #define PreProcessCmd CcCmd -E
582 #ifndef InstallCmd /* hack should be in project */
583 #if SystemV || SystemV4
584 #ifdef UseInstalled /* assume BINDIR in path */
585 #define InstallCmd bsdinst
587 #define InstallCmd $(SHELL) $(CONFIGSRC)/util/bsdinst.sh
590 #define InstallCmd install
594 #define InstallFlags -c
608 #ifndef CplusplusYaccCmd
609 #define CplusplusYaccCmd YaccCmd
615 #if SystemV || SystemV4
616 #define LintLibFlag -o
618 #define LintLibFlag -C
622 #if SystemV || SystemV4
625 #define LintOpts -axz
632 #define HasSymLinks YES
634 #ifndef LnCmd /* can use cp instead of ln if necessary */
648 #define RanlibCmd ranlib
650 #ifndef RanlibInstFlags
651 #define RanlibInstFlags /**/
656 #ifndef StandardIncludes /* for platform-specifics */
657 #define StandardIncludes /**/
659 #ifndef StandardDefines
661 #define StandardDefines -DSYSV
664 #define StandardDefines -DSVR4
666 #define StandardDefines /**/
670 #ifndef StandardCppDefines
671 #define StandardCppDefines StandardDefines
673 #ifndef Malloc0ReturnsNull
674 #define Malloc0ReturnsNull NO
676 #if Malloc0ReturnsNull
677 #ifndef Malloc0ReturnsNullDefines
678 #define Malloc0ReturnsNullDefines -DMALLOC_0_RETURNS_NULL
681 #ifndef ToolkitStringsABIOptions
682 #define ToolkitStringsABIOptions /**/
686 #define NdbmDefines -DNDBM
688 #define NdbmDefines /**/
692 #if !defined(UseInstalled)
693 #define LdPreLib -L$(BUILDLIBDIR)
695 #if AlternateUsrLibDir
696 #define LdPreLib -L$(USRLIBDIR)
698 #define LdPreLib /**/
703 #if !defined(UseInstalled) && AlternateUsrLibDir && !HasLdRunPath
704 #define LdPostLib -L$(USRLIBDIR)
706 #define LdPostLib /**/
710 #define MathLibrary -lm
713 #define DBMLibrary -ldbm
716 #define DlLibrary -ldl
718 #ifndef ExtraLibraries
721 #define ExtraLibraries -lsocket -lnsl -lw
723 #define ExtraLibraries -lnsl -lw
726 #define ExtraLibraries /**/
729 #ifndef ExtraLoadOptions
730 #define ExtraLoadOptions /**/
732 #ifndef ExtraLoadFlags
733 #define ExtraLoadFlags /**/
735 #ifndef LdCombineFlags
737 #define LdCombineFlags -r
739 #define LdCombineFlags -X -r
743 #define LdStripFlags -x
746 #define TagsCmd ctags
748 #ifndef LoaderLibPrefix
749 #define LoaderLibPrefix /**/
752 #ifdef UseInstalled /* assume BINDIR in path */
753 #define ImakeCmd imake
755 #define ImakeCmd $(IMAKESRC)/imake
759 #ifdef UseInstalled /* assume BINDIR in path */
760 #define DependCmd makedepend
762 #define DependCmd $(DEPENDSRC)/makedepend
766 #define DependFlags /**/
768 #ifndef DependFileName
769 #define DependFileName Makefile.dep
771 #ifndef ExportListCmd
772 # ifndef ExportListGenSource
773 # define ExportListCmd /**/
774 # elif !defined(UseInstalled)
775 # define ExportListCmd $(CONFIGSRC)/util/exportlistgen
777 # define ExportListCmd exportlistgen
781 #ifdef UseInstalled /* assume BINDIR in path */
782 #define MkdirHierCmd mkdirhier
784 #define MkdirHierCmd $(SHELL) $(CONFIGSRC)/util/mkdirhier.sh
788 #define TroffCmd psroff
791 #define NroffCmd nroff
797 #define ManMacros -man
812 #define DvipsCmd dvips
815 #define LatexCmd latex
819 #define SentinelCmd sentinel
821 #ifndef SentinelOptions
822 #define SentinelOptions /**/
827 #define PurifyCmd purify
829 #ifndef PurifyOptions
830 #define PurifyOptions /**/
835 #define ProofCmd proof
838 #define ProofOptions /**/
841 #ifndef PathSeparator
842 #define PathSeparator /
851 #define ManSuffix n /* use just one tab or cpp will die */
854 #define LibManSuffix 3 /* use just one tab or cpp will die */
856 #ifndef FileManSuffix
857 #if SystemV || SystemV4 || defined(OSF1Architecture)
858 #define FileManSuffix 4 /* use just one tab or cpp will die */
860 #define FileManSuffix 5 /* use just one tab or cpp will die */
863 #ifndef MiscManSuffix
864 #if SystemV || SystemV4 || defined(OSF1Architecture)
865 #define MiscManSuffix 5 /* use just one tab or cpp will die */
867 #define MiscManSuffix 7 /* use just one tab or cpp will die */
870 #ifndef ExpandManNames
872 #define ExpandManNames NO
874 #define ExpandManNames YES
883 #ifndef SiteIConfigFiles
884 #define SiteIConfigFiles /**/
886 #ifndef ExtraFilesToClean
887 #define ExtraFilesToClean /**/
890 #define FilesToClean *.CKP *.ln *.BAK *.bak *.Osuf core errs ,* *~ *.a .emacs_* tags TAGS make.log MakeOut
893 PATHSEP = PathSeparator
895 KORNSHELL = KornShell
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)