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 DependDefines
403 #define DependDefines /**/
405 #ifndef UNCOMPRESSPATH
406 #define UNCOMPRESSPATH /usr/ucb/uncompress
408 #ifndef OptimizedCDebugFlags
409 #define OptimizedCDebugFlags -O
411 #ifndef OptimizedCplusplusDebugFlags
412 #define OptimizedCplusplusDebugFlags OptimizedCDebugFlags
414 #ifndef DebuggableCDebugFlags
415 #define DebuggableCDebugFlags -g
417 #ifndef DebuggableCplusplusDebugFlags
418 #define DebuggableCplusplusDebugFlags DebuggableCDebugFlags
420 #ifndef ProfiledCDebugFlags
421 #define ProfiledCDebugFlags -pg
423 #ifndef ProfiledCplusplusDebugFlags
424 #define ProfiledCplusplusDebugFlags ProfiledCDebugFlags
426 #ifndef NoOpCDebugFlags
427 #define NoOpCDebugFlags /**/
429 #ifndef DefaultCDebugFlags
430 #define DefaultCDebugFlags OptimizedCDebugFlags
432 #ifndef DefaultCplusplusDebugFlags
433 #define DefaultCplusplusDebugFlags OptimizedCplusplusDebugFlags
435 #ifndef DefaultCCOptions
436 #define DefaultCCOptions /* floating point, etc. */
438 #ifndef DefaultCplusplusOptions
439 #define DefaultCplusplusOptions /* floating point, etc. */
442 #define NoRConst NO /* YES if const for structs of funcs is bad */
445 #define InstPgmFlags -s
448 #define InstBinFlags -m 0755
451 #define InstUidFlags -m 4711
454 #define InstLibFlags -m 0644
457 #define InstIncFlags -m 0444
460 #define InstManFlags -m 0444
463 #define InstDatFlags -m 0444
465 #ifndef InstKmemFlags /* put -g kmem -m 2711 in site.def... */
466 #define InstKmemFlags InstUidFlags
472 #if HasLargeTmp || SystemV4
473 #define ArCmd ArCmdBase cq
475 #define ArCmd ArCmdBase clq
479 #if HasLargeTmp || SystemV4
480 #define ArAddCmd ArCmdBase ru
482 #define ArAddCmd ArCmdBase rul
486 #if HasLargeTmp || SystemV4
487 #define ArExtCmd ArCmdBase x
489 #define ArExtCmd ArCmdBase xl
492 #ifndef BootstrapCFlags
493 #define BootstrapCFlags /**/
499 #define HasGcc HasGcc2
501 #ifndef HasGcc2ForCplusplus
502 #define HasGcc2ForCplusplus NO
504 #ifndef HasCenterLineC
505 #define HasCenterLineC NO
507 #ifndef HasCenterLineCplusplus
508 #define HasCenterLineCplusplus NO
512 #define CcCmd gcc -fpcc-struct-return
515 #define CcCmd gcc -fstrength-reduce -fpcc-struct-return
526 #if HasGcc2ForCplusplus
527 #define CplusplusCmd g++
529 #define CplusplusCmd CC
532 #ifndef CplusplusFilt
533 # define CplusplusFilt c++filt
535 #ifndef CplusplusLibC
536 #define CplusplusLibC /**/
538 #ifndef CplusplusStandardDefines
539 #define CplusplusStandardDefines StandardDefines
541 #ifndef CplusplusExtraDefines
542 #define CplusplusExtraDefines /**/
544 #ifndef CplusplusExtraIncludes
545 #define CplusplusExtraIncludes /**/
547 #ifndef CplusplusDependIncludes
548 #define CplusplusDependIncludes /**/
550 #ifndef CplusplusOptions
551 #define CplusplusOptions /**/
553 #ifndef CplusplusSpecialOptions
554 #define CplusplusSpecialOptions /**/
558 #define FortranCmd f77
561 #define FortranFlags /**/
563 #ifndef FortranDebugFlags /* for -O or -g */
564 #define FortranDebugFlags /**/
571 #define CompressCmd compress
577 #define CppCmd /lib/cpp
579 #ifndef CppNoLineInfoOption
580 #define CppNoLineInfoOption /**/
582 #ifndef PreProcessCmd
583 #define PreProcessCmd CcCmd -E
585 #ifndef InstallCmd /* hack should be in project */
586 #if SystemV || SystemV4
587 #ifdef UseInstalled /* assume BINDIR in path */
588 #define InstallCmd bsdinst
590 #define InstallCmd $(SHELL) $(CONFIGSRC)/util/bsdinst.sh
593 #define InstallCmd install
597 #define InstallFlags -c
611 #ifndef CplusplusYaccCmd
612 #define CplusplusYaccCmd YaccCmd
618 #if SystemV || SystemV4
619 #define LintLibFlag -o
621 #define LintLibFlag -C
625 #if SystemV || SystemV4
628 #define LintOpts -axz
635 #define HasSymLinks YES
637 #ifndef LnCmd /* can use cp instead of ln if necessary */
651 #define RanlibCmd ranlib
653 #ifndef RanlibInstFlags
654 #define RanlibInstFlags /**/
659 #ifndef StandardIncludes /* for platform-specifics */
660 #define StandardIncludes /**/
662 #ifndef StandardDefines
664 #define StandardDefines -DSYSV
667 #define StandardDefines -DSVR4
669 #define StandardDefines /**/
673 #ifndef StandardCppDefines
674 #define StandardCppDefines StandardDefines
676 #ifndef Malloc0ReturnsNull
677 #define Malloc0ReturnsNull NO
679 #if Malloc0ReturnsNull
680 #ifndef Malloc0ReturnsNullDefines
681 #define Malloc0ReturnsNullDefines -DMALLOC_0_RETURNS_NULL
684 #ifndef ToolkitStringsABIOptions
685 #define ToolkitStringsABIOptions /**/
689 #define NdbmDefines -DNDBM
691 #define NdbmDefines /**/
695 #if !defined(UseInstalled)
696 #define LdPreLib -L$(BUILDLIBDIR)
698 #if AlternateUsrLibDir
699 #define LdPreLib -L$(USRLIBDIR)
701 #define LdPreLib /**/
706 #if !defined(UseInstalled) && AlternateUsrLibDir && !HasLdRunPath
707 #define LdPostLib -L$(USRLIBDIR)
709 #define LdPostLib /**/
713 #define MathLibrary -lm
716 #define DBMLibrary -ldbm
719 #define DlLibrary -ldl
721 #ifndef ExtraLibraries
724 #define ExtraLibraries -lsocket -lnsl -lw
726 #define ExtraLibraries -lnsl -lw
729 #define ExtraLibraries /**/
732 #ifndef ExtraLoadOptions
733 #define ExtraLoadOptions /**/
735 #ifndef ExtraLoadFlags
736 #define ExtraLoadFlags /**/
738 #ifndef LdCombineFlags
740 #define LdCombineFlags -r
742 #define LdCombineFlags -X -r
746 #define LdStripFlags -x
749 #define TagsCmd ctags
751 #ifndef LoaderLibPrefix
752 #define LoaderLibPrefix /**/
755 #ifdef UseInstalled /* assume BINDIR in path */
756 #define ImakeCmd imake
758 #define ImakeCmd $(IMAKESRC)/imake
762 #ifdef UseInstalled /* assume BINDIR in path */
763 #define DependCmd makedepend
765 #define DependCmd $(DEPENDSRC)/makedepend
769 #define DependFlags /**/
771 #ifndef DependFileName
772 #define DependFileName Makefile.dep
774 #ifndef ExportListCmd
775 # ifndef ExportListGenSource
776 # define ExportListCmd /**/
777 # elif !defined(UseInstalled)
778 # define ExportListCmd $(CONFIGSRC)/util/exportlistgen
780 # define ExportListCmd exportlistgen
784 #ifdef UseInstalled /* assume BINDIR in path */
785 #define MkdirHierCmd mkdirhier
787 #define MkdirHierCmd $(SHELL) $(CONFIGSRC)/util/mkdirhier.sh
791 #define TroffCmd psroff
794 #define NroffCmd nroff
800 #define ManMacros -man
815 #define DvipsCmd dvips
818 #define LatexCmd latex
822 #define SentinelCmd sentinel
824 #ifndef SentinelOptions
825 #define SentinelOptions /**/
830 #define PurifyCmd purify
832 #ifndef PurifyOptions
833 #define PurifyOptions /**/
838 #define ProofCmd proof
841 #define ProofOptions /**/
844 #ifndef PathSeparator
845 #define PathSeparator /
854 #define ManSuffix n /* use just one tab or cpp will die */
857 #define LibManSuffix 3 /* use just one tab or cpp will die */
859 #ifndef FileManSuffix
860 #if SystemV || SystemV4 || defined(OSF1Architecture)
861 #define FileManSuffix 4 /* use just one tab or cpp will die */
863 #define FileManSuffix 5 /* use just one tab or cpp will die */
866 #ifndef MiscManSuffix
867 #if SystemV || SystemV4 || defined(OSF1Architecture)
868 #define MiscManSuffix 5 /* use just one tab or cpp will die */
870 #define MiscManSuffix 7 /* use just one tab or cpp will die */
873 #ifndef ExpandManNames
875 #define ExpandManNames NO
877 #define ExpandManNames YES
886 #ifndef SiteIConfigFiles
887 #define SiteIConfigFiles /**/
889 #ifndef ExtraFilesToClean
890 #define ExtraFilesToClean /**/
893 #define FilesToClean *.CKP *.ln *.BAK *.bak *.Osuf core errs ,* *~ *.a .emacs_* tags TAGS make.log MakeOut
896 PATHSEP = PathSeparator
898 KORNSHELL = KornShell
905 MKDIRHIER = MkdirHierCmd
906 EXPORTLISTGEN = ExportListCmd
907 CONFIGSRC = ConfigSrc
908 IMAKESRC = $(CONFIGSRC)/imake
909 DEPENDSRC = DependDir
910 DEPENDDEFINES = DependDefines
912 INCROOT = IncRoot /* base of where to put header files */
913 USRLIBDIR = UsrLibDir /* nonshared libraries */
914 SHLIBDIR = ShLibDir /* shared libraries */
915 LINTLIBDIR = LintlibDir /* lint libraries */
916 MANPATH = ManPath /* top of manual page tree */
917 MANSOURCEPATH = ManSourcePath /* prefix for man page sources */
918 MANDIR = ManDir /* man pages for commands */
919 LIBMANDIR = LibmanDir /* man pages for library routines */
920 FILEMANDIR = FileManDir /* man pages for config files */
921 MISCMANDIR = MiscManDir /* man pages for miscellaneous files */
924 BOOTSTRAPCFLAGS = BootstrapCFlags /* set if cpp does not have uniq sym */
929 FDEBUGFLAGS = FortranDebugFlags
930 FCFLAGS = FortranFlags $(FDEBUGFLAGS)
937 CXXFILT = CplusplusFilt
938 CXXLIB = CplusplusLibC
939 CXXDEBUGFLAGS = DefaultCplusplusDebugFlags
940 CXXDEPENDINCLUDES = CplusplusDependIncludes
941 CXXEXTRA_DEFINES = CplusplusExtraDefines
942 CXXEXTRA_INCLUDES = CplusplusExtraIncludes
943 CXXSTD_DEFINES = CplusplusStandardDefines $(CXXPROJECT_DEFINES)
944 CXXOPTIONS = CplusplusOptions
945 CXXINCLUDES = $(INCLUDES) $(TOP_INCLUDES) $(CXXEXTRA_INCLUDES)
946 CXXDEFINES = $(CXXINCLUDES) $(CXXSTD_DEFINES) $(THREADS_CXXDEFINES) $(CXXEXTRA_DEFINES) $(DEFINES)
947 CXXFLAGS = $(CXXDEBUGFLAGS) $(CXXOPTIONS) $(THREADS_CXXFLAGS) $(CXXDEFINES)
949 COMPRESS = CompressCmd
951 CPP = CppCmd $(STD_CPP_DEFINES) /* simple filters */
952 PREPROCESSCMD = PreProcessCmd $(STD_CPP_DEFINES) /* prefered; mdep */
954 INSTALLFLAGS = InstallFlags
959 CCYACC = CplusplusYaccCmd
961 LINTLIBFLAG = LintLibFlag
969 RANLIBINSTFLAGS = RanlibInstFlags
972 MANSUFFIX = ManSuffix /* suffix for command man pages */
973 LIBMANSUFFIX = LibManSuffix /* suffix for library man pages */
974 FILEMANSUFFIX = FileManSuffix /* suffix for file format man pages */
975 MISCMANSUFFIX = MiscManSuffix /* suffix for misc man pages */
980 MANMACROS = ManMacros
990 SENTINEL = SentinelCmd
991 SENTINELOPTIONS = SentinelOptions
995 PURIFYOPTIONS = PurifyOptions
999 PROOFOPTIONS = ProofOptions
1001 STD_INCLUDES = StandardIncludes
1002 STD_CPP_DEFINES = StandardCppDefines $(PROJECT_DEFINES)
1003 STD_DEFINES = StandardDefines $(PROJECT_DEFINES)
1004 EXTRA_LOAD_FLAGS = ExtraLoadFlags
1005 EXTRA_LDOPTIONS = ExtraLoadOptions
1006 EXTRA_LIBRARIES = ExtraLibraries Krb5Libraries
1009 MFLAGS = -$(MAKEFLAGS)
1011 #if ConstructMAKEFLAGS
1012 MAKEFLAGS = $(MFLAGS)
1014 #if HasSharedLibraries
1015 SHAREDCODEDEF = SharedCodeDef
1016 SHLIBDEF = SharedLibraryDef
1017 #ifdef SharedLibraryLoadFlags
1018 SHLIBLDFLAGS = SharedLibraryLoadFlags
1021 * Here we set up flags needed to produce position-independent code
1022 * when doing C and C++ compilation. The default if you specify C
1023 * PIC flags without also specifying C++ PIC flags is to assume that
1024 * the C flags work for both. If your C++ compiler requires different
1025 * flags, specify them explicitly in PositionIndependentCplusplusFlags.
1027 #ifdef PositionIndependentCFlags
1028 PICFLAGS = PositionIndependentCFlags
1030 #ifdef PositionIndependentCplusplusFlags
1031 CXXPICFLAGS = PositionIndependentCplusplusFlags
1033 #ifdef PositionIndependentCFlags
1034 CXXPICFLAGS = PositionIndependentCFlags
1038 #if !HasVoidSignalReturn
1039 SIGNAL_DEFINES = -DSIGNALRETURNSINT
1042 * The following supports forcing of function prototypes
1044 #if NeedFunctionPrototypes && NeedVarargsPrototypes && NeedConstPrototypes && NeedNestedPrototypes
1045 #define _funcprotodef -DFUNCPROTO=15
1047 #if NeedFunctionPrototypes && NeedVarargsPrototypes && NeedNestedPrototypes
1048 #define _funcprotodef -DFUNCPROTO=11
1050 #if NeedFunctionPrototypes && NeedNestedPrototypes
1051 #define _funcprotodef -DFUNCPROTO=9
1053 #if NeedFunctionPrototypes && NeedVarargsPrototypes && NeedConstPrototypes
1054 #define _funcprotodef -DFUNCPROTO=7
1056 #if NeedFunctionPrototypes && NeedConstPrototypes
1057 #define _funcprotodef -DFUNCPROTO=5
1059 #if NeedFunctionPrototypes && NeedVarargsPrototypes
1060 #define _funcprotodef -DFUNCPROTO=3
1062 #if NeedFunctionPrototypes
1063 #define _funcprotodef -DFUNCPROTO
1065 #define _funcprotodef /**/
1073 #if NeedWidePrototypes
1074 #define _wideprotodef /**/
1076 #define _wideprotodef -DNARROWPROTO
1078 PROTO_DEFINES = _funcprotodef _wideprotodef
1079 #undef _funcprotodef
1080 #undef _wideprotodef
1082 #if StripInstalledPrograms
1083 INSTPGMFLAGS = InstPgmFlags /* install flags for stripping */
1087 INSTBINFLAGS = InstBinFlags /* install flags for programs */
1088 INSTUIDFLAGS = InstUidFlags /* install flags for setuid programs */
1089 INSTLIBFLAGS = InstLibFlags /* install flags for libraries */
1090 INSTINCFLAGS = InstIncFlags /* install flags for headers */
1091 INSTMANFLAGS = InstManFlags /* install flags for man pages */
1092 INSTDATFLAGS = InstDatFlags /* install flags for data files */
1093 INSTKMEMFLAGS = InstKmemFlags /* install flags for /dev/kmem progs */
1096 PROJECTROOT = ProjectRoot
1099 # if AlternateIncRoot
1100 # define TopInclude -I$(INCROOT)
1102 # define TopInclude /**/
1105 # define TopInclude -I$(TOP)
1107 CDEBUGFLAGS = DefaultCDebugFlags
1108 CCOPTIONS = DefaultCCOptions /* to distinguish from param flags */
1110 * STD_INCLUDES contains system-specific includes
1111 * TOP_INCLUDES specifies how to get to /usr/include or its build substitute
1112 * EXTRA_INCLUDES contains project-specific includes set in project incfiles
1113 * INCLUDES contains client-specific includes set in Imakefile
1114 * LOCAL_LDFLAGS contains client-specific ld flags flags set in Imakefile
1116 ALLINCLUDES = $(INCLUDES) $(EXTRA_INCLUDES) $(TOP_INCLUDES) $(STD_INCLUDES)
1117 ALLDEFINES = $(ALLINCLUDES) $(STD_DEFINES) $(EXTRA_DEFINES) $(PROTO_DEFINES) $(THREADS_DEFINES) $(DEFINES)
1118 CFLAGS = $(CDEBUGFLAGS) $(CCOPTIONS) $(THREADS_CFLAGS) $(ALLDEFINES)
1119 LINTFLAGS = $(LINTOPTS) -DLINT $(ALLDEFINES) $(DEPEND_DEFINES)
1121 LDPOSTLIB = LdPostLib
1122 LDOPTIONS = $(CDEBUGFLAGS) $(CCOPTIONS) $(EXTRA_LDOPTIONS) $(THREADS_LDFLAGS) $(LOCAL_LDFLAGS) $(LDPRELIBS)
1123 CXXLDOPTIONS = $(CXXDEBUGFLAGS) $(CXXOPTIONS) $(EXTRA_LDOPTIONS) $(THREADS_CXXLDFLAGS) $(LOCAL_LDFLAGS) $(LDPRELIBS)
1125 LDLIBS = $(LDPOSTLIBS) $(THREADS_LIBS) $(SYS_LIBRARIES) $(EXTRA_LIBRARIES)
1126 #if HasBrokenCCForLink
1129 #if AlternateUsrLibDir && HasLdRunPath
1130 CCENVSETUP = LD_RUN_PATH=$(USRLIBDIRPATH)
1131 CCLINK = $(CCENVSETUP) $(CC)
1136 #if AlternateUsrLibDir && HasLdRunPath
1137 CXXENVSETUP = LD_RUN_PATH=$(USRLIBDIRPATH)
1138 CXXLINK = $(CXXENVSETUP) $(CXX)
1142 LDSTRIPFLAGS = LdStripFlags
1143 LDCOMBINEFLAGS = LdCombineFlags
1144 DEPENDFLAGS = DependFlags
1146 MACROFILE = MacroFile
1149 IMAKE_DEFINES = /* leave blank, for command line use only */
1151 IRULESRC = $(CONFIGDIR) /* used in rules file */
1152 IMAKE_CMD = $(IMAKE) -DUseInstalled -I$(IRULESRC) $(IMAKE_DEFINES)
1154 IRULESRC = $(CONFIGSRC)/cf
1155 IMAKE_CMD = $(IMAKE) -I$(IRULESRC) $(IMAKE_DEFINES)
1158 /* clearmake records relevant defines and flags in the build script,
1159 so it knows when they change and we don't need this coarser-level
1160 dependency. We also don't want it, since it prevents sharing if
1161 even one config file, say site.def or host.def, changes. */
1162 ICONFIGFILES = $(IRULESRC)/Imake.tmpl $(IRULESRC)/X11.tmpl \
1163 $(IRULESRC)/site.def $(IRULESRC)/$(MACROFILE) \
1164 SiteIConfigFiles $(EXTRA_ICONFIGFILES)
1167 #ifndef TopLevelProject
1168 # define TopLevelProject X11
1170 #ifndef ProjectRulesFile
1171 # define ProjectRulesFile Concat3(<,TopLevelProject,.rules>)
1173 #include ProjectRulesFile
1174 #ifndef LocalRulesFile
1175 /* need this to make ANSI-style preprocessors happy */
1176 #define LocalRulesFile <noop.rules>
1178 #include LocalRulesFile
1181 * get project-specific configuration and rules
1183 #ifndef ProjectTmplFile
1184 #define ProjectTmplFile Concat3(<,TopLevelProject,.tmpl>)
1186 #include ProjectTmplFile
1187 #ifndef LocalTmplFile
1188 /* need this to make ANSI-style preprocessors happy */
1189 #define LocalTmplFile <noop.rules>
1191 #include LocalTmplFile
1193 #ifdef FixupLibReferences
1194 FixupLibReferences()
1197 /* ConfigDir comes from X11.tmpl */
1198 CONFIGDIR = ConfigDir /* build configuration information */
1202 USRLIBDIRPATH = UsrLibDirPath
1203 LDPRELIBS = LdPreLibs
1204 LDPOSTLIBS = LdPostLibs
1205 TOP_INCLUDES = TopIncludes
1206 PROJECT_DEFINES = ProjectDefines
1208 CXXPROJECT_DEFINES = CplusplusProjectDefines
1211 XCOMM ----------------------------------------------------------------------
1212 XCOMM start of Imakefile
1213 #include INCLUDE_IMAKEFILE
1215 XCOMM ----------------------------------------------------------------------
1216 XCOMM common rules for all Makefiles - do not edit
1219 CPPOnlyCompile($*.c,$(_NOOP_))
1221 * These need to be here so that rules in Imakefile occur first; the blank
1222 * emptyrule is to make sure that an empty Imakefile does not default to make
1229 #ifndef IHaveSpecialMakefileTarget
1234 #ifdef MakefileAdditions
1238 CenterLoadTarget(debug_src,$(SRCS),NullParameter,$(ALLDEFINES))
1240 CenterLoadTarget(debug_obj,$(OBJS),NullParameter,$(ALLDEFINES))
1242 ManKeywordsTarget($(MANPATH))
1245 XCOMM ----------------------------------------------------------------------
1246 XCOMM rules for building in SUBDIRS - do not edit
1248 InstallSubdirs($(SUBDIRS))
1249 InstallManSubdirs($(SUBDIRS))
1250 InstallLinkKitSubdirs($(SUBDIRS))
1251 CleanSubdirs($(SUBDIRS))
1252 TagSubdirs($(SUBDIRS))
1253 MakefileSubdirs($(SUBDIRS))
1254 IncludesSubdirs($(SUBDIRS))
1258 /* must be after all install.man rules that install anything */
1259 #if MakeManKeywords /* typically only at top level */
1260 install.man:: man_keywords
1263 #ifndef IHaveSubdirs
1264 XCOMM ----------------------------------------------------------------------
1265 XCOMM empty rules for directories that do not have SUBDIRS - do not edit
1268 @echo "install in $(CURRENT_DIR) done"
1271 @echo "install.man in $(CURRENT_DIR) done"
1274 @echo "install.linkkit in $(CURRENT_DIR) done"
1282 #endif /* if subdirectory rules are needed */
1284 XCOMM ----------------------------------------------------------------------
1285 XCOMM dependencies generated by makedepend
1286 IncludeMakefile(DependFileName)