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
27 /* Ensure that "all" is the default target in the Makefile. */
34 XCOMM -----------------------------------------------------------------------
35 XCOMM site-specific configuration parameters that need to come before
36 XCOMM the platform-specific parameters - edit site.def to change
37 #define BeforeVendorCF
41 #if defined(HasGcc2) && !defined(HasGcc)
42 # define HasGcc HasGcc2
46 # define HasClearmake NO
50 * ClearmakeOSName - insert the current OS type into the clearmake
51 * build script, so .o files from different platforms cannot be winked in.
52 * If clearmake finds the build script for two .o files is the same, it
53 * will share the .o, even across different architectures. Inserting the
54 * O/S name into the build script in a comment prevents unwanted sharing.
55 * Note the trailing double-@ in the macro: end a line using this macro
56 * with backslash without the double-@ usually used.
59 * #define SomeRule() @@\
60 * something or other @@\
65 #ifndef ClearmakeOSName
67 # define ClearmakeOSName @ XCOMM $(OSNAME) @@
69 # define ClearmakeOSName /**/
75 # define MakeCmd clearmake
80 XCOMM ----------------------------------------------------------------------
82 ClearmakeOSName $(CC) -c $(CFLAGS) $*.c
85 XCOMM ----------------------------------------------------------------------
86 XCOMM platform-specific configuration parameters - edit MacroFile to change
87 #include MacroIncludeFile
89 XCOMM ----------------------------------------------------------------------
90 XCOMM site-specific configuration parameters that go after
91 XCOMM the platform-specific parameters - edit site.def to change
97 * defaults for various generic parameters; set in site.def if needed
100 /* the following are needed before we can include Imake.rules */
103 #define SystemV NO /* SYSV (R3) */
106 #define SystemV4 NO /* SVR4 */
108 #ifndef HasCodeCenter
109 #define HasCodeCenter NO
112 #define HasSentinel NO
117 #ifndef HasTestCenter
118 #define HasTestCenter NO
120 #ifndef RemoveTargetProgramByMoving
121 #define RemoveTargetProgramByMoving NO
124 #if SystemV || SystemV4
125 #define DoRanlibCmd NO
127 #define DoRanlibCmd YES
130 #ifndef ExecableScripts
132 #define ExecableScripts NO
134 #define ExecableScripts YES /* kernel exec() can handle #! */
138 #ifndef HasMakefileSafeInclude /* -include or sinclude in a Makefile */
140 #define HasMakefileSafeInclude YES
142 #define HasMakefileSafeInclude NO /* see also vendor-specific .cf files */
146 #ifndef HasVarDirectory
147 #define HasVarDirectory YES
150 #include <Imake.rules>
152 #ifndef HasSharedLibraries
153 #define HasSharedLibraries NO
155 #ifndef OSMajorVersion
156 #define OSMajorVersion 0
158 #ifndef OSMinorVersion
159 #define OSMinorVersion 0
161 #ifndef UnalignedReferencesAllowed
162 #define UnalignedReferencesAllowed NO /* if arbitrary deref is okay */
164 #ifndef AvoidNullMakeCommand
165 #define AvoidNullMakeCommand NO
167 #if AvoidNullMakeCommand
168 #ifndef NullMakeCommand
169 #define NullMakeCommand @ echo -n
172 * An obscure bug in BSD4.3's original make causes it not to recognize a
173 * macro definition if the macro name starts with a non-alpha and in
176 _NULLCMD_ = NullMakeCommand
179 #ifndef CrossCompiling
180 #define CrossCompiling NO
182 #ifndef BourneShell /* to force shell in makefile */
183 #define BourneShell /bin/sh
186 #define KornShell /bin/ksh
189 #define DtKornShell /usr/dt/bin/dtksh
191 #ifndef ConstructMFLAGS
193 #define ConstructMFLAGS YES /* build MFLAGS from MAKEFLAGS */
195 #define ConstructMFLAGS NO /* build MFLAGS from MAKEFLAGS */
199 #ifndef ConstructMAKEFLAGS /* needed on old BSD-based? */
200 #define ConstructMAKEFLAGS NO /* build MAKEFLAGS from MFLAGS */
204 #define HasLargeTmp NO /* be paranoid */
207 #ifndef HasBSD44Sockets
208 #define HasBSD44Sockets NO
211 #define HasSockets YES
214 #define HasStreams !HasSockets
220 #if SystemV || SystemV4
228 #define HasVFork NO /* not yet... */
233 #ifndef HasSetUserContext
234 #define HasSetUserContext NO
237 #define HasLibCrypt NO
240 #define HasPutenv NO /* assume not */
242 #ifndef HasVoidSignalReturn
243 #define HasVoidSignalReturn YES /* assume yes */
246 #define HasBsearch YES /* assume yes */
249 #define HasFortran NO
252 #define HasCplusplus YES
258 #define HasSecureRPC NO /* if you have Secure RPC */
261 #define HasKrb5 NO /* if you have Kerberos V5 */
267 #if SystemV || SystemV4
284 #define Krb5Includes -I/krb5/include
286 #ifndef Krb5Libraries
287 #define Krb5Libraries -L/krb5/lib -L/usr/isode/lib -lkrb5 -lcrypto -lisode -lcom_err -ldbm
291 #define Krb5Includes /**/
293 #define Krb5Libraries /**/
295 #ifndef NeedConstPrototypes
296 #define NeedConstPrototypes NO
298 #ifndef NeedVarargsPrototypes
299 #define NeedVarargsPrototypes NO
301 #ifndef NeedNestedPrototypes
302 #define NeedNestedPrototypes NO
304 #ifndef NeedFunctionPrototypes
305 #define NeedFunctionPrototypes (NeedVarargsPrototypes || NeedNestedPrototypes)
307 #ifndef NeedWidePrototypes
308 #define NeedWidePrototypes YES /* mix and match ANSI-C, non-ANSI */
311 #ifndef StripInstalledPrograms
312 #define StripInstalledPrograms NO /* leave symbol table just in case */
314 #ifndef UseCCMakeDepend /* use slow cc -E script */
315 #define UseCCMakeDepend NO
318 /* DefaultUsrBin is independent of ProjectRoot.
319 This is a directory where programs will be found even if PATH
320 is not set, for example when coming in remotely via rsh. */
321 #ifndef DefaultUsrBin
322 #define DefaultUsrBin /usr/bin
327 #define UsrLibDir Concat(ProjectRoot,/lib)
328 #ifndef AlternateUsrLibDir
329 #define AlternateUsrLibDir YES
332 #define UsrLibDir /usr/lib
333 #ifndef AlternateUsrLibDir
334 #define AlternateUsrLibDir NO
338 #ifndef AlternateUsrLibDir
339 #define AlternateUsrLibDir YES
343 #define ShLibDir UsrLibDir
347 #define IncRoot Concat(ProjectRoot,/include)
348 #ifndef AlternateIncRoot
349 #define AlternateIncRoot YES
352 #define IncRoot /usr/include
353 #ifndef AlternateIncRoot
354 #define AlternateIncRoot NO
358 #ifndef AlternateIncRoot
359 #define AlternateIncRoot YES
363 #define LintlibDir $(USRLIBDIR)/lint
365 #ifndef SystemManDirectory
367 #define SystemManDirectory /usr/share/man
369 #define SystemManDirectory /usr/man
372 #ifndef ManDirectoryRoot
374 #define ManDirectoryRoot Concat(ProjectRoot,/man)
376 #define ManDirectoryRoot SystemManDirectory
380 #define ManPath ManDirectoryRoot
382 #ifndef ManSourcePath
383 #define ManSourcePath $(MANPATH)/man
386 #define ManDir $(MANSOURCEPATH)$(MANSUFFIX)
389 #define LibmanDir $(MANSOURCEPATH)$(LIBMANSUFFIX)
392 #define FileManDir $(MANSOURCEPATH)$(FILEMANSUFFIX)
395 #define MiscManDir $(MANSOURCEPATH)$(MISCMANSUFFIX)
398 #define ConfigSrc $(TOP)/config
402 #define DependDir $(CONFIGSRC)/util
404 #define DependDir $(CONFIGSRC)/makedepend
407 #ifndef DependDefines
408 #define DependDefines /**/
410 #ifndef UNCOMPRESSPATH
411 #define UNCOMPRESSPATH /usr/ucb/uncompress
413 #ifndef OptimizedCDebugFlags
414 #define OptimizedCDebugFlags -O
416 #ifndef OptimizedCplusplusDebugFlags
417 #define OptimizedCplusplusDebugFlags OptimizedCDebugFlags
419 #ifndef DebuggableCDebugFlags
420 #define DebuggableCDebugFlags -g
422 #ifndef DebuggableCplusplusDebugFlags
423 #define DebuggableCplusplusDebugFlags DebuggableCDebugFlags
425 #ifndef ProfiledCDebugFlags
426 #define ProfiledCDebugFlags -pg
428 #ifndef ProfiledCplusplusDebugFlags
429 #define ProfiledCplusplusDebugFlags ProfiledCDebugFlags
431 #ifndef NoOpCDebugFlags
432 #define NoOpCDebugFlags /**/
434 #ifndef DefaultCDebugFlags
435 #define DefaultCDebugFlags OptimizedCDebugFlags
437 #ifndef DefaultCplusplusDebugFlags
438 #define DefaultCplusplusDebugFlags OptimizedCplusplusDebugFlags
440 #ifndef DefaultCCOptions
441 #define DefaultCCOptions /* floating point, etc. */
443 #ifndef DefaultCplusplusOptions
444 #define DefaultCplusplusOptions /* floating point, etc. */
447 #define NoRConst NO /* YES if const for structs of funcs is bad */
450 #define InstPgmFlags -s
453 #define InstBinFlags -m 0755
456 #define InstUidFlags -m 4711
459 #define InstLibFlags -m 0644
462 #define InstIncFlags -m 0444
465 #define InstManFlags -m 0444
468 #define InstDatFlags -m 0444
470 #ifndef InstKmemFlags /* put -g kmem -m 2711 in site.def... */
471 #define InstKmemFlags InstUidFlags
477 #if HasLargeTmp || SystemV4
478 #define ArCmd ArCmdBase cq
480 #define ArCmd ArCmdBase clq
484 #if HasLargeTmp || SystemV4
485 #define ArAddCmd ArCmdBase ru
487 #define ArAddCmd ArCmdBase rul
491 #if HasLargeTmp || SystemV4
492 #define ArExtCmd ArCmdBase x
494 #define ArExtCmd ArCmdBase xl
497 #ifndef BootstrapCFlags
498 #define BootstrapCFlags /**/
504 #define HasGcc HasGcc2
506 #ifndef HasGcc2ForCplusplus
507 #define HasGcc2ForCplusplus NO
509 #ifndef HasCenterLineC
510 #define HasCenterLineC NO
512 #ifndef HasCenterLineCplusplus
513 #define HasCenterLineCplusplus NO
517 #define CcCmd gcc -fpcc-struct-return
520 #define CcCmd gcc -fstrength-reduce -fpcc-struct-return
531 #if HasGcc2ForCplusplus
532 #define CplusplusCmd g++
534 #define CplusplusCmd CC
537 #ifndef CplusplusFilt
538 # define CplusplusFilt c++filt
540 #ifndef CplusplusLibC
541 #define CplusplusLibC /**/
543 #ifndef CplusplusStandardDefines
544 #define CplusplusStandardDefines StandardDefines
546 #ifndef CplusplusExtraDefines
547 #define CplusplusExtraDefines /**/
549 #ifndef CplusplusExtraIncludes
550 #define CplusplusExtraIncludes /**/
552 #ifndef CplusplusDependIncludes
553 #define CplusplusDependIncludes /**/
555 #ifndef CplusplusOptions
556 #define CplusplusOptions /**/
558 #ifndef CplusplusSpecialOptions
559 #define CplusplusSpecialOptions /**/
563 #define FortranCmd f77
566 #define FortranFlags /**/
568 #ifndef FortranDebugFlags /* for -O or -g */
569 #define FortranDebugFlags /**/
576 #define CompressCmd compress
582 #define CppCmd /lib/cpp
584 #ifndef CppNoLineInfoOption
585 #define CppNoLineInfoOption /**/
587 #ifndef PreProcessCmd
588 #define PreProcessCmd CcCmd -E
590 #ifndef InstallCmd /* hack should be in project */
591 #if SystemV || SystemV4
592 #ifdef UseInstalled /* assume BINDIR in path */
593 #define InstallCmd bsdinst
595 #define InstallCmd $(SHELL) $(CONFIGSRC)/util/bsdinst.sh
598 #define InstallCmd install
602 #define InstallFlags -c
616 #ifndef CplusplusYaccCmd
617 #define CplusplusYaccCmd YaccCmd
623 #if SystemV || SystemV4
624 #define LintLibFlag -o
626 #define LintLibFlag -C
630 #if SystemV || SystemV4
633 #define LintOpts -axz
640 #define HasSymLinks YES
642 #ifndef LnCmd /* can use cp instead of ln if necessary */
659 #define PerlCmd /usr/bin/perl
662 #define RanlibCmd ranlib
664 #ifndef RanlibInstFlags
665 #define RanlibInstFlags /**/
670 #ifndef StandardIncludes /* for platform-specifics */
671 #define StandardIncludes /**/
673 #ifndef StandardDefines
675 #define StandardDefines -DSYSV
678 #define StandardDefines -DSVR4
680 #define StandardDefines /**/
684 #ifndef StandardCppDefines
685 #define StandardCppDefines StandardDefines
687 #ifndef Malloc0ReturnsNull
688 #define Malloc0ReturnsNull NO
690 #if Malloc0ReturnsNull
691 #ifndef Malloc0ReturnsNullDefines
692 #define Malloc0ReturnsNullDefines -DMALLOC_0_RETURNS_NULL
695 #ifndef ToolkitStringsABIOptions
696 #define ToolkitStringsABIOptions /**/
700 #define NdbmDefines -DNDBM
702 #define NdbmDefines /**/
706 #if !defined(UseInstalled)
707 #define LdPreLib -L$(BUILDLIBDIR)
709 #if AlternateUsrLibDir
710 #define LdPreLib -L$(USRLIBDIR)
712 #define LdPreLib /**/
717 #if !defined(UseInstalled) && AlternateUsrLibDir && !HasLdRunPath
718 #define LdPostLib -L$(USRLIBDIR)
720 #define LdPostLib /**/
724 #define MathLibrary -lm
727 #define DBMLibrary -ldbm
730 #define DlLibrary -ldl
732 #ifndef ExtraLibraries
735 #define ExtraLibraries -lsocket -lnsl -lw
737 #define ExtraLibraries -lnsl -lw
740 #define ExtraLibraries /**/
743 #ifndef ExtraLoadOptions
744 #define ExtraLoadOptions /**/
746 #ifndef ExtraLoadFlags
747 #define ExtraLoadFlags /**/
749 #ifndef LdCombineFlags
751 #define LdCombineFlags -r
753 #define LdCombineFlags -X -r
757 #define LdStripFlags -x
760 #define TagsCmd ctags
762 #ifndef LoaderLibPrefix
763 #define LoaderLibPrefix /**/
766 #ifdef UseInstalled /* assume BINDIR in path */
767 #define ImakeCmd imake
769 #define ImakeCmd $(IMAKESRC)/imake
773 #ifdef UseInstalled /* assume BINDIR in path */
774 #define DependCmd makedepend
776 #define DependCmd $(DEPENDSRC)/makedepend
780 #define DependFlags /**/
782 #ifndef DependFileName
783 #define DependFileName Makefile.dep
785 #ifndef ExportListCmd
786 # ifndef ExportListGenSource
787 # define ExportListCmd /**/
788 # elif !defined(UseInstalled)
789 # define ExportListCmd $(CONFIGSRC)/util/exportlistgen
791 # define ExportListCmd exportlistgen
795 #ifdef UseInstalled /* assume BINDIR in path */
796 #define MkdirHierCmd mkdirhier
798 #define MkdirHierCmd $(SHELL) $(CONFIGSRC)/util/mkdirhier.sh
802 #define TroffCmd psroff
805 #define NroffCmd nroff
811 #define ManMacros -man
826 #define DvipsCmd dvips
829 #define LatexCmd latex
833 #define SentinelCmd sentinel
835 #ifndef SentinelOptions
836 #define SentinelOptions /**/
841 #define PurifyCmd purify
843 #ifndef PurifyOptions
844 #define PurifyOptions /**/
849 #define ProofCmd proof
852 #define ProofOptions /**/
855 #ifndef PathSeparator
856 #define PathSeparator /
865 #define ManSuffix n /* use just one tab or cpp will die */
868 #define LibManSuffix 3 /* use just one tab or cpp will die */
870 #ifndef FileManSuffix
871 #if SystemV || SystemV4
872 #define FileManSuffix 4 /* use just one tab or cpp will die */
874 #define FileManSuffix 5 /* use just one tab or cpp will die */
877 #ifndef MiscManSuffix
878 #if SystemV || SystemV4
879 #define MiscManSuffix 5 /* use just one tab or cpp will die */
881 #define MiscManSuffix 7 /* use just one tab or cpp will die */
884 #ifndef ExpandManNames
886 #define ExpandManNames NO
888 #define ExpandManNames YES
897 #ifndef SiteIConfigFiles
898 #define SiteIConfigFiles /**/
900 #ifndef ExtraFilesToClean
901 #define ExtraFilesToClean /**/
904 #define FilesToClean *.CKP *.ln *.BAK *.bak *.Osuf core errs ,* *~ *.a .emacs_* tags TAGS make.log MakeOut
907 PATHSEP = PathSeparator
909 KORNSHELL = KornShell
910 DTKORNSHELL = DtKornShell
917 MKDIRHIER = MkdirHierCmd
918 EXPORTLISTGEN = ExportListCmd
919 CONFIGSRC = ConfigSrc
920 IMAKESRC = $(CONFIGSRC)/imake
921 DEPENDSRC = DependDir
922 DEPENDDEFINES = DependDefines
924 INCROOT = IncRoot /* base of where to put header files */
925 USRLIBDIR = UsrLibDir /* nonshared libraries */
926 SHLIBDIR = ShLibDir /* shared libraries */
927 LINTLIBDIR = LintlibDir /* lint libraries */
928 MANPATH = ManPath /* top of manual page tree */
929 MANSOURCEPATH = ManSourcePath /* prefix for man page sources */
930 MANDIR = ManDir /* man pages for commands */
931 LIBMANDIR = LibmanDir /* man pages for library routines */
932 FILEMANDIR = FileManDir /* man pages for config files */
933 MISCMANDIR = MiscManDir /* man pages for miscellaneous files */
936 BOOTSTRAPCFLAGS = BootstrapCFlags /* set if cpp does not have uniq sym */
941 FDEBUGFLAGS = FortranDebugFlags
942 FCFLAGS = FortranFlags $(FDEBUGFLAGS)
949 CXXFILT = CplusplusFilt
950 CXXLIB = CplusplusLibC
951 CXXDEBUGFLAGS = DefaultCplusplusDebugFlags
952 CXXDEPENDINCLUDES = CplusplusDependIncludes
953 CXXEXTRA_DEFINES = CplusplusExtraDefines
954 CXXEXTRA_INCLUDES = CplusplusExtraIncludes
955 CXXSTD_DEFINES = CplusplusStandardDefines $(CXXPROJECT_DEFINES)
956 CXXOPTIONS = CplusplusOptions
957 CXXINCLUDES = $(INCLUDES) $(TOP_INCLUDES) $(CXXEXTRA_INCLUDES)
958 CXXDEFINES = $(CXXINCLUDES) $(CXXSTD_DEFINES) $(THREADS_CXXDEFINES) $(CXXEXTRA_DEFINES) $(DEFINES)
959 CXXFLAGS = $(CXXDEBUGFLAGS) $(CXXOPTIONS) $(THREADS_CXXFLAGS) $(CXXDEFINES)
961 COMPRESS = CompressCmd
963 CPP = CppCmd $(STD_CPP_DEFINES) /* simple filters */
964 PREPROCESSCMD = PreProcessCmd $(STD_CPP_DEFINES) /* prefered; mdep */
966 INSTALLFLAGS = InstallFlags
971 CCYACC = CplusplusYaccCmd
973 LINTLIBFLAG = LintLibFlag
983 RANLIBINSTFLAGS = RanlibInstFlags
986 MANSUFFIX = ManSuffix /* suffix for command man pages */
987 LIBMANSUFFIX = LibManSuffix /* suffix for library man pages */
988 FILEMANSUFFIX = FileManSuffix /* suffix for file format man pages */
989 MISCMANSUFFIX = MiscManSuffix /* suffix for misc man pages */
994 MANMACROS = ManMacros
1004 SENTINEL = SentinelCmd
1005 SENTINELOPTIONS = SentinelOptions
1009 PURIFYOPTIONS = PurifyOptions
1013 PROOFOPTIONS = ProofOptions
1015 STD_INCLUDES = StandardIncludes
1016 STD_CPP_DEFINES = StandardCppDefines $(PROJECT_DEFINES)
1017 STD_DEFINES = StandardDefines $(PROJECT_DEFINES)
1018 EXTRA_LOAD_FLAGS = ExtraLoadFlags
1019 EXTRA_LDOPTIONS = ExtraLoadOptions
1020 EXTRA_LIBRARIES = ExtraLibraries Krb5Libraries
1023 MFLAGS = -$(MAKEFLAGS)
1025 #if ConstructMAKEFLAGS
1026 MAKEFLAGS = $(MFLAGS)
1028 #if HasSharedLibraries
1029 SHAREDCODEDEF = SharedCodeDef
1030 SHLIBDEF = SharedLibraryDef
1031 #ifdef SharedLibraryLoadFlags
1032 SHLIBLDFLAGS = SharedLibraryLoadFlags
1035 * Here we set up flags needed to produce position-independent code
1036 * when doing C and C++ compilation. The default if you specify C
1037 * PIC flags without also specifying C++ PIC flags is to assume that
1038 * the C flags work for both. If your C++ compiler requires different
1039 * flags, specify them explicitly in PositionIndependentCplusplusFlags.
1041 #ifdef PositionIndependentCFlags
1042 PICFLAGS = PositionIndependentCFlags
1044 #ifdef PositionIndependentCplusplusFlags
1045 CXXPICFLAGS = PositionIndependentCplusplusFlags
1047 #ifdef PositionIndependentCFlags
1048 CXXPICFLAGS = PositionIndependentCFlags
1052 #if !HasVoidSignalReturn
1053 SIGNAL_DEFINES = -DSIGNALRETURNSINT
1056 * The following supports forcing of function prototypes
1058 #if NeedFunctionPrototypes && NeedVarargsPrototypes && NeedConstPrototypes && NeedNestedPrototypes
1059 #define _funcprotodef -DFUNCPROTO=15
1061 #if NeedFunctionPrototypes && NeedVarargsPrototypes && NeedNestedPrototypes
1062 #define _funcprotodef -DFUNCPROTO=11
1064 #if NeedFunctionPrototypes && NeedNestedPrototypes
1065 #define _funcprotodef -DFUNCPROTO=9
1067 #if NeedFunctionPrototypes && NeedVarargsPrototypes && NeedConstPrototypes
1068 #define _funcprotodef -DFUNCPROTO=7
1070 #if NeedFunctionPrototypes && NeedConstPrototypes
1071 #define _funcprotodef -DFUNCPROTO=5
1073 #if NeedFunctionPrototypes && NeedVarargsPrototypes
1074 #define _funcprotodef -DFUNCPROTO=3
1076 #if NeedFunctionPrototypes
1077 #define _funcprotodef -DFUNCPROTO
1079 #define _funcprotodef /**/
1087 #if NeedWidePrototypes
1088 #define _wideprotodef /**/
1090 #define _wideprotodef -DNARROWPROTO
1092 PROTO_DEFINES = _funcprotodef _wideprotodef
1093 #undef _funcprotodef
1094 #undef _wideprotodef
1096 #if StripInstalledPrograms
1097 INSTPGMFLAGS = InstPgmFlags /* install flags for stripping */
1101 INSTBINFLAGS = InstBinFlags /* install flags for programs */
1102 INSTUIDFLAGS = InstUidFlags /* install flags for setuid programs */
1103 INSTLIBFLAGS = InstLibFlags /* install flags for libraries */
1104 INSTINCFLAGS = InstIncFlags /* install flags for headers */
1105 INSTMANFLAGS = InstManFlags /* install flags for man pages */
1106 INSTDATFLAGS = InstDatFlags /* install flags for data files */
1107 INSTKMEMFLAGS = InstKmemFlags /* install flags for /dev/kmem progs */
1110 PROJECTROOT = ProjectRoot
1113 # if AlternateIncRoot
1114 # define TopInclude -I$(INCROOT)
1116 # define TopInclude /**/
1119 # define TopInclude -I$(TOP)
1121 CDEBUGFLAGS = DefaultCDebugFlags
1122 CCOPTIONS = DefaultCCOptions /* to distinguish from param flags */
1124 * STD_INCLUDES contains system-specific includes
1125 * TOP_INCLUDES specifies how to get to /usr/include or its build substitute
1126 * EXTRA_INCLUDES contains project-specific includes set in project incfiles
1127 * INCLUDES contains client-specific includes set in Imakefile
1128 * LOCAL_LDFLAGS contains client-specific ld flags flags set in Imakefile
1130 ALLINCLUDES = $(INCLUDES) $(EXTRA_INCLUDES) $(TOP_INCLUDES) $(STD_INCLUDES)
1131 ALLDEFINES = $(ALLINCLUDES) $(STD_DEFINES) $(EXTRA_DEFINES) $(PROTO_DEFINES) $(THREADS_DEFINES) $(DEFINES)
1132 CFLAGS = $(CDEBUGFLAGS) $(CCOPTIONS) $(THREADS_CFLAGS) $(ALLDEFINES)
1133 LINTFLAGS = $(LINTOPTS) -DLINT $(ALLDEFINES) $(DEPEND_DEFINES)
1135 LDPOSTLIB = LdPostLib
1136 LDOPTIONS = $(CDEBUGFLAGS) $(CCOPTIONS) $(EXTRA_LDOPTIONS) $(THREADS_LDFLAGS) $(LOCAL_LDFLAGS) $(LDPRELIBS)
1137 CXXLDOPTIONS = $(CXXDEBUGFLAGS) $(CXXOPTIONS) $(EXTRA_LDOPTIONS) $(THREADS_CXXLDFLAGS) $(LOCAL_LDFLAGS) $(LDPRELIBS)
1139 LDLIBS = $(LDPOSTLIBS) $(THREADS_LIBS) $(SYS_LIBRARIES) $(EXTRA_LIBRARIES)
1140 #if HasBrokenCCForLink
1143 #if AlternateUsrLibDir && HasLdRunPath
1144 CCENVSETUP = LD_RUN_PATH=$(USRLIBDIRPATH)
1145 CCLINK = $(CCENVSETUP) $(CC)
1150 #if AlternateUsrLibDir && HasLdRunPath
1151 CXXENVSETUP = LD_RUN_PATH=$(USRLIBDIRPATH)
1152 CXXLINK = $(CXXENVSETUP) $(CXX)
1156 LDSTRIPFLAGS = LdStripFlags
1157 LDCOMBINEFLAGS = LdCombineFlags
1158 DEPENDFLAGS = DependFlags
1160 MACROFILE = MacroFile
1163 IMAKE_DEFINES = /* leave blank, for command line use only */
1165 IRULESRC = $(CONFIGDIR) /* used in rules file */
1166 IMAKE_CMD = $(IMAKE) -DUseInstalled -I$(IRULESRC) $(IMAKE_DEFINES)
1168 IRULESRC = $(CONFIGSRC)/cf
1169 IMAKE_CMD = $(IMAKE) -I$(IRULESRC) $(IMAKE_DEFINES)
1172 /* clearmake records relevant defines and flags in the build script,
1173 so it knows when they change and we don't need this coarser-level
1174 dependency. We also don't want it, since it prevents sharing if
1175 even one config file, say site.def or host.def, changes. */
1176 ICONFIGFILES = $(IRULESRC)/Imake.tmpl $(IRULESRC)/X11.tmpl \
1177 $(IRULESRC)/site.def $(IRULESRC)/$(MACROFILE) \
1178 SiteIConfigFiles $(EXTRA_ICONFIGFILES)
1181 #ifndef TopLevelProject
1182 # define TopLevelProject X11
1184 #ifndef ProjectRulesFile
1185 # define ProjectRulesFile Concat3(<,TopLevelProject,.rules>)
1187 #include ProjectRulesFile
1188 #ifndef LocalRulesFile
1189 /* need this to make ANSI-style preprocessors happy */
1190 #define LocalRulesFile <noop.rules>
1192 #include LocalRulesFile
1195 * get project-specific configuration and rules
1197 #ifndef ProjectTmplFile
1198 #define ProjectTmplFile Concat3(<,TopLevelProject,.tmpl>)
1200 #include ProjectTmplFile
1201 #ifndef LocalTmplFile
1202 /* need this to make ANSI-style preprocessors happy */
1203 #define LocalTmplFile <noop.rules>
1205 #include LocalTmplFile
1207 #ifdef FixupLibReferences
1208 FixupLibReferences()
1211 /* ConfigDir comes from X11.tmpl */
1212 CONFIGDIR = ConfigDir /* build configuration information */
1216 USRLIBDIRPATH = UsrLibDirPath
1217 LDPRELIBS = LdPreLibs
1218 LDPOSTLIBS = LdPostLibs
1219 TOP_INCLUDES = TopIncludes
1220 PROJECT_DEFINES = ProjectDefines
1222 CXXPROJECT_DEFINES = CplusplusProjectDefines
1225 XCOMM ----------------------------------------------------------------------
1226 XCOMM start of Imakefile
1227 #include INCLUDE_IMAKEFILE
1229 XCOMM ----------------------------------------------------------------------
1230 XCOMM common rules for all Makefiles - do not edit
1233 CPPOnlyCompile($*.c,$(_NOOP_))
1235 * These need to be here so that rules in Imakefile occur first; the blank
1236 * emptyrule is to make sure that an empty Imakefile does not default to make
1243 #ifndef IHaveSpecialMakefileTarget
1248 #ifdef MakefileAdditions
1252 CenterLoadTarget(debug_src,$(SRCS),NullParameter,$(ALLDEFINES))
1254 CenterLoadTarget(debug_obj,$(OBJS),NullParameter,$(ALLDEFINES))
1256 ManKeywordsTarget($(MANPATH))
1259 XCOMM ----------------------------------------------------------------------
1260 XCOMM rules for building in SUBDIRS - do not edit
1262 InstallSubdirs($(SUBDIRS))
1263 InstallManSubdirs($(SUBDIRS))
1264 InstallLinkKitSubdirs($(SUBDIRS))
1265 CleanSubdirs($(SUBDIRS))
1266 TagSubdirs($(SUBDIRS))
1267 MakefileSubdirs($(SUBDIRS))
1268 IncludesSubdirs($(SUBDIRS))
1272 /* must be after all install.man rules that install anything */
1273 #if MakeManKeywords /* typically only at top level */
1274 install.man:: man_keywords
1277 #ifndef IHaveSubdirs
1278 XCOMM ----------------------------------------------------------------------
1279 XCOMM empty rules for directories that do not have SUBDIRS - do not edit
1282 @echo "install in $(CURRENT_DIR) done"
1285 @echo "install.man in $(CURRENT_DIR) done"
1288 @echo "install.linkkit in $(CURRENT_DIR) done"
1296 #endif /* if subdirectory rules are needed */
1298 XCOMM ----------------------------------------------------------------------
1299 XCOMM dependencies generated by makedepend
1300 IncludeMakefile(DependFileName)