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 */
654 #define RanlibCmd ranlib
656 #ifndef RanlibInstFlags
657 #define RanlibInstFlags /**/
662 #ifndef StandardIncludes /* for platform-specifics */
663 #define StandardIncludes /**/
665 #ifndef StandardDefines
667 #define StandardDefines -DSYSV
670 #define StandardDefines -DSVR4
672 #define StandardDefines /**/
676 #ifndef StandardCppDefines
677 #define StandardCppDefines StandardDefines
679 #ifndef Malloc0ReturnsNull
680 #define Malloc0ReturnsNull NO
682 #if Malloc0ReturnsNull
683 #ifndef Malloc0ReturnsNullDefines
684 #define Malloc0ReturnsNullDefines -DMALLOC_0_RETURNS_NULL
687 #ifndef ToolkitStringsABIOptions
688 #define ToolkitStringsABIOptions /**/
692 #define NdbmDefines -DNDBM
694 #define NdbmDefines /**/
698 #if !defined(UseInstalled)
699 #define LdPreLib -L$(BUILDLIBDIR)
701 #if AlternateUsrLibDir
702 #define LdPreLib -L$(USRLIBDIR)
704 #define LdPreLib /**/
709 #if !defined(UseInstalled) && AlternateUsrLibDir && !HasLdRunPath
710 #define LdPostLib -L$(USRLIBDIR)
712 #define LdPostLib /**/
716 #define MathLibrary -lm
719 #define DBMLibrary -ldbm
722 #define DlLibrary -ldl
724 #ifndef ExtraLibraries
727 #define ExtraLibraries -lsocket -lnsl -lw
729 #define ExtraLibraries -lnsl -lw
732 #define ExtraLibraries /**/
735 #ifndef ExtraLoadOptions
736 #define ExtraLoadOptions /**/
738 #ifndef ExtraLoadFlags
739 #define ExtraLoadFlags /**/
741 #ifndef LdCombineFlags
743 #define LdCombineFlags -r
745 #define LdCombineFlags -X -r
749 #define LdStripFlags -x
752 #define TagsCmd ctags
754 #ifndef LoaderLibPrefix
755 #define LoaderLibPrefix /**/
758 #ifdef UseInstalled /* assume BINDIR in path */
759 #define ImakeCmd imake
761 #define ImakeCmd $(IMAKESRC)/imake
765 #ifdef UseInstalled /* assume BINDIR in path */
766 #define DependCmd makedepend
768 #define DependCmd $(DEPENDSRC)/makedepend
772 #define DependFlags /**/
774 #ifndef DependFileName
775 #define DependFileName Makefile.dep
777 #ifndef ExportListCmd
778 # ifndef ExportListGenSource
779 # define ExportListCmd /**/
780 # elif !defined(UseInstalled)
781 # define ExportListCmd $(CONFIGSRC)/util/exportlistgen
783 # define ExportListCmd exportlistgen
787 #ifdef UseInstalled /* assume BINDIR in path */
788 #define MkdirHierCmd mkdirhier
790 #define MkdirHierCmd $(SHELL) $(CONFIGSRC)/util/mkdirhier.sh
794 #define TroffCmd psroff
797 #define NroffCmd nroff
803 #define ManMacros -man
818 #define DvipsCmd dvips
821 #define LatexCmd latex
825 #define SentinelCmd sentinel
827 #ifndef SentinelOptions
828 #define SentinelOptions /**/
833 #define PurifyCmd purify
835 #ifndef PurifyOptions
836 #define PurifyOptions /**/
841 #define ProofCmd proof
844 #define ProofOptions /**/
847 #ifndef PathSeparator
848 #define PathSeparator /
857 #define ManSuffix n /* use just one tab or cpp will die */
860 #define LibManSuffix 3 /* use just one tab or cpp will die */
862 #ifndef FileManSuffix
863 #if SystemV || SystemV4 || defined(OSF1Architecture)
864 #define FileManSuffix 4 /* use just one tab or cpp will die */
866 #define FileManSuffix 5 /* use just one tab or cpp will die */
869 #ifndef MiscManSuffix
870 #if SystemV || SystemV4 || defined(OSF1Architecture)
871 #define MiscManSuffix 5 /* use just one tab or cpp will die */
873 #define MiscManSuffix 7 /* use just one tab or cpp will die */
876 #ifndef ExpandManNames
878 #define ExpandManNames NO
880 #define ExpandManNames YES
889 #ifndef SiteIConfigFiles
890 #define SiteIConfigFiles /**/
892 #ifndef ExtraFilesToClean
893 #define ExtraFilesToClean /**/
896 #define FilesToClean *.CKP *.ln *.BAK *.bak *.Osuf core errs ,* *~ *.a .emacs_* tags TAGS make.log MakeOut
899 PATHSEP = PathSeparator
901 KORNSHELL = KornShell
902 DTKORNSHELL = DtKornShell
909 MKDIRHIER = MkdirHierCmd
910 EXPORTLISTGEN = ExportListCmd
911 CONFIGSRC = ConfigSrc
912 IMAKESRC = $(CONFIGSRC)/imake
913 DEPENDSRC = DependDir
914 DEPENDDEFINES = DependDefines
916 INCROOT = IncRoot /* base of where to put header files */
917 USRLIBDIR = UsrLibDir /* nonshared libraries */
918 SHLIBDIR = ShLibDir /* shared libraries */
919 LINTLIBDIR = LintlibDir /* lint libraries */
920 MANPATH = ManPath /* top of manual page tree */
921 MANSOURCEPATH = ManSourcePath /* prefix for man page sources */
922 MANDIR = ManDir /* man pages for commands */
923 LIBMANDIR = LibmanDir /* man pages for library routines */
924 FILEMANDIR = FileManDir /* man pages for config files */
925 MISCMANDIR = MiscManDir /* man pages for miscellaneous files */
928 BOOTSTRAPCFLAGS = BootstrapCFlags /* set if cpp does not have uniq sym */
933 FDEBUGFLAGS = FortranDebugFlags
934 FCFLAGS = FortranFlags $(FDEBUGFLAGS)
941 CXXFILT = CplusplusFilt
942 CXXLIB = CplusplusLibC
943 CXXDEBUGFLAGS = DefaultCplusplusDebugFlags
944 CXXDEPENDINCLUDES = CplusplusDependIncludes
945 CXXEXTRA_DEFINES = CplusplusExtraDefines
946 CXXEXTRA_INCLUDES = CplusplusExtraIncludes
947 CXXSTD_DEFINES = CplusplusStandardDefines $(CXXPROJECT_DEFINES)
948 CXXOPTIONS = CplusplusOptions
949 CXXINCLUDES = $(INCLUDES) $(TOP_INCLUDES) $(CXXEXTRA_INCLUDES)
950 CXXDEFINES = $(CXXINCLUDES) $(CXXSTD_DEFINES) $(THREADS_CXXDEFINES) $(CXXEXTRA_DEFINES) $(DEFINES)
951 CXXFLAGS = $(CXXDEBUGFLAGS) $(CXXOPTIONS) $(THREADS_CXXFLAGS) $(CXXDEFINES)
953 COMPRESS = CompressCmd
955 CPP = CppCmd $(STD_CPP_DEFINES) /* simple filters */
956 PREPROCESSCMD = PreProcessCmd $(STD_CPP_DEFINES) /* prefered; mdep */
958 INSTALLFLAGS = InstallFlags
963 CCYACC = CplusplusYaccCmd
965 LINTLIBFLAG = LintLibFlag
973 RANLIBINSTFLAGS = RanlibInstFlags
976 MANSUFFIX = ManSuffix /* suffix for command man pages */
977 LIBMANSUFFIX = LibManSuffix /* suffix for library man pages */
978 FILEMANSUFFIX = FileManSuffix /* suffix for file format man pages */
979 MISCMANSUFFIX = MiscManSuffix /* suffix for misc man pages */
984 MANMACROS = ManMacros
994 SENTINEL = SentinelCmd
995 SENTINELOPTIONS = SentinelOptions
999 PURIFYOPTIONS = PurifyOptions
1003 PROOFOPTIONS = ProofOptions
1005 STD_INCLUDES = StandardIncludes
1006 STD_CPP_DEFINES = StandardCppDefines $(PROJECT_DEFINES)
1007 STD_DEFINES = StandardDefines $(PROJECT_DEFINES)
1008 EXTRA_LOAD_FLAGS = ExtraLoadFlags
1009 EXTRA_LDOPTIONS = ExtraLoadOptions
1010 EXTRA_LIBRARIES = ExtraLibraries Krb5Libraries
1013 MFLAGS = -$(MAKEFLAGS)
1015 #if ConstructMAKEFLAGS
1016 MAKEFLAGS = $(MFLAGS)
1018 #if HasSharedLibraries
1019 SHAREDCODEDEF = SharedCodeDef
1020 SHLIBDEF = SharedLibraryDef
1021 #ifdef SharedLibraryLoadFlags
1022 SHLIBLDFLAGS = SharedLibraryLoadFlags
1025 * Here we set up flags needed to produce position-independent code
1026 * when doing C and C++ compilation. The default if you specify C
1027 * PIC flags without also specifying C++ PIC flags is to assume that
1028 * the C flags work for both. If your C++ compiler requires different
1029 * flags, specify them explicitly in PositionIndependentCplusplusFlags.
1031 #ifdef PositionIndependentCFlags
1032 PICFLAGS = PositionIndependentCFlags
1034 #ifdef PositionIndependentCplusplusFlags
1035 CXXPICFLAGS = PositionIndependentCplusplusFlags
1037 #ifdef PositionIndependentCFlags
1038 CXXPICFLAGS = PositionIndependentCFlags
1042 #if !HasVoidSignalReturn
1043 SIGNAL_DEFINES = -DSIGNALRETURNSINT
1046 * The following supports forcing of function prototypes
1048 #if NeedFunctionPrototypes && NeedVarargsPrototypes && NeedConstPrototypes && NeedNestedPrototypes
1049 #define _funcprotodef -DFUNCPROTO=15
1051 #if NeedFunctionPrototypes && NeedVarargsPrototypes && NeedNestedPrototypes
1052 #define _funcprotodef -DFUNCPROTO=11
1054 #if NeedFunctionPrototypes && NeedNestedPrototypes
1055 #define _funcprotodef -DFUNCPROTO=9
1057 #if NeedFunctionPrototypes && NeedVarargsPrototypes && NeedConstPrototypes
1058 #define _funcprotodef -DFUNCPROTO=7
1060 #if NeedFunctionPrototypes && NeedConstPrototypes
1061 #define _funcprotodef -DFUNCPROTO=5
1063 #if NeedFunctionPrototypes && NeedVarargsPrototypes
1064 #define _funcprotodef -DFUNCPROTO=3
1066 #if NeedFunctionPrototypes
1067 #define _funcprotodef -DFUNCPROTO
1069 #define _funcprotodef /**/
1077 #if NeedWidePrototypes
1078 #define _wideprotodef /**/
1080 #define _wideprotodef -DNARROWPROTO
1082 PROTO_DEFINES = _funcprotodef _wideprotodef
1083 #undef _funcprotodef
1084 #undef _wideprotodef
1086 #if StripInstalledPrograms
1087 INSTPGMFLAGS = InstPgmFlags /* install flags for stripping */
1091 INSTBINFLAGS = InstBinFlags /* install flags for programs */
1092 INSTUIDFLAGS = InstUidFlags /* install flags for setuid programs */
1093 INSTLIBFLAGS = InstLibFlags /* install flags for libraries */
1094 INSTINCFLAGS = InstIncFlags /* install flags for headers */
1095 INSTMANFLAGS = InstManFlags /* install flags for man pages */
1096 INSTDATFLAGS = InstDatFlags /* install flags for data files */
1097 INSTKMEMFLAGS = InstKmemFlags /* install flags for /dev/kmem progs */
1100 PROJECTROOT = ProjectRoot
1103 # if AlternateIncRoot
1104 # define TopInclude -I$(INCROOT)
1106 # define TopInclude /**/
1109 # define TopInclude -I$(TOP)
1111 CDEBUGFLAGS = DefaultCDebugFlags
1112 CCOPTIONS = DefaultCCOptions /* to distinguish from param flags */
1114 * STD_INCLUDES contains system-specific includes
1115 * TOP_INCLUDES specifies how to get to /usr/include or its build substitute
1116 * EXTRA_INCLUDES contains project-specific includes set in project incfiles
1117 * INCLUDES contains client-specific includes set in Imakefile
1118 * LOCAL_LDFLAGS contains client-specific ld flags flags set in Imakefile
1120 ALLINCLUDES = $(INCLUDES) $(EXTRA_INCLUDES) $(TOP_INCLUDES) $(STD_INCLUDES)
1121 ALLDEFINES = $(ALLINCLUDES) $(STD_DEFINES) $(EXTRA_DEFINES) $(PROTO_DEFINES) $(THREADS_DEFINES) $(DEFINES)
1122 CFLAGS = $(CDEBUGFLAGS) $(CCOPTIONS) $(THREADS_CFLAGS) $(ALLDEFINES)
1123 LINTFLAGS = $(LINTOPTS) -DLINT $(ALLDEFINES) $(DEPEND_DEFINES)
1125 LDPOSTLIB = LdPostLib
1126 LDOPTIONS = $(CDEBUGFLAGS) $(CCOPTIONS) $(EXTRA_LDOPTIONS) $(THREADS_LDFLAGS) $(LOCAL_LDFLAGS) $(LDPRELIBS)
1127 CXXLDOPTIONS = $(CXXDEBUGFLAGS) $(CXXOPTIONS) $(EXTRA_LDOPTIONS) $(THREADS_CXXLDFLAGS) $(LOCAL_LDFLAGS) $(LDPRELIBS)
1129 LDLIBS = $(LDPOSTLIBS) $(THREADS_LIBS) $(SYS_LIBRARIES) $(EXTRA_LIBRARIES)
1130 #if HasBrokenCCForLink
1133 #if AlternateUsrLibDir && HasLdRunPath
1134 CCENVSETUP = LD_RUN_PATH=$(USRLIBDIRPATH)
1135 CCLINK = $(CCENVSETUP) $(CC)
1140 #if AlternateUsrLibDir && HasLdRunPath
1141 CXXENVSETUP = LD_RUN_PATH=$(USRLIBDIRPATH)
1142 CXXLINK = $(CXXENVSETUP) $(CXX)
1146 LDSTRIPFLAGS = LdStripFlags
1147 LDCOMBINEFLAGS = LdCombineFlags
1148 DEPENDFLAGS = DependFlags
1150 MACROFILE = MacroFile
1153 IMAKE_DEFINES = /* leave blank, for command line use only */
1155 IRULESRC = $(CONFIGDIR) /* used in rules file */
1156 IMAKE_CMD = $(IMAKE) -DUseInstalled -I$(IRULESRC) $(IMAKE_DEFINES)
1158 IRULESRC = $(CONFIGSRC)/cf
1159 IMAKE_CMD = $(IMAKE) -I$(IRULESRC) $(IMAKE_DEFINES)
1162 /* clearmake records relevant defines and flags in the build script,
1163 so it knows when they change and we don't need this coarser-level
1164 dependency. We also don't want it, since it prevents sharing if
1165 even one config file, say site.def or host.def, changes. */
1166 ICONFIGFILES = $(IRULESRC)/Imake.tmpl $(IRULESRC)/X11.tmpl \
1167 $(IRULESRC)/site.def $(IRULESRC)/$(MACROFILE) \
1168 SiteIConfigFiles $(EXTRA_ICONFIGFILES)
1171 #ifndef TopLevelProject
1172 # define TopLevelProject X11
1174 #ifndef ProjectRulesFile
1175 # define ProjectRulesFile Concat3(<,TopLevelProject,.rules>)
1177 #include ProjectRulesFile
1178 #ifndef LocalRulesFile
1179 /* need this to make ANSI-style preprocessors happy */
1180 #define LocalRulesFile <noop.rules>
1182 #include LocalRulesFile
1185 * get project-specific configuration and rules
1187 #ifndef ProjectTmplFile
1188 #define ProjectTmplFile Concat3(<,TopLevelProject,.tmpl>)
1190 #include ProjectTmplFile
1191 #ifndef LocalTmplFile
1192 /* need this to make ANSI-style preprocessors happy */
1193 #define LocalTmplFile <noop.rules>
1195 #include LocalTmplFile
1197 #ifdef FixupLibReferences
1198 FixupLibReferences()
1201 /* ConfigDir comes from X11.tmpl */
1202 CONFIGDIR = ConfigDir /* build configuration information */
1206 USRLIBDIRPATH = UsrLibDirPath
1207 LDPRELIBS = LdPreLibs
1208 LDPOSTLIBS = LdPostLibs
1209 TOP_INCLUDES = TopIncludes
1210 PROJECT_DEFINES = ProjectDefines
1212 CXXPROJECT_DEFINES = CplusplusProjectDefines
1215 XCOMM ----------------------------------------------------------------------
1216 XCOMM start of Imakefile
1217 #include INCLUDE_IMAKEFILE
1219 XCOMM ----------------------------------------------------------------------
1220 XCOMM common rules for all Makefiles - do not edit
1223 CPPOnlyCompile($*.c,$(_NOOP_))
1225 * These need to be here so that rules in Imakefile occur first; the blank
1226 * emptyrule is to make sure that an empty Imakefile does not default to make
1233 #ifndef IHaveSpecialMakefileTarget
1238 #ifdef MakefileAdditions
1242 CenterLoadTarget(debug_src,$(SRCS),NullParameter,$(ALLDEFINES))
1244 CenterLoadTarget(debug_obj,$(OBJS),NullParameter,$(ALLDEFINES))
1246 ManKeywordsTarget($(MANPATH))
1249 XCOMM ----------------------------------------------------------------------
1250 XCOMM rules for building in SUBDIRS - do not edit
1252 InstallSubdirs($(SUBDIRS))
1253 InstallManSubdirs($(SUBDIRS))
1254 InstallLinkKitSubdirs($(SUBDIRS))
1255 CleanSubdirs($(SUBDIRS))
1256 TagSubdirs($(SUBDIRS))
1257 MakefileSubdirs($(SUBDIRS))
1258 IncludesSubdirs($(SUBDIRS))
1262 /* must be after all install.man rules that install anything */
1263 #if MakeManKeywords /* typically only at top level */
1264 install.man:: man_keywords
1267 #ifndef IHaveSubdirs
1268 XCOMM ----------------------------------------------------------------------
1269 XCOMM empty rules for directories that do not have SUBDIRS - do not edit
1272 @echo "install in $(CURRENT_DIR) done"
1275 @echo "install.man in $(CURRENT_DIR) done"
1278 @echo "install.linkkit in $(CURRENT_DIR) done"
1286 #endif /* if subdirectory rules are needed */
1288 XCOMM ----------------------------------------------------------------------
1289 XCOMM dependencies generated by makedepend
1290 IncludeMakefile(DependFileName)