1 XCOMM ----------------------------------------------------------------------
2 XCOMM Makefile generated from IMAKE_TEMPLATE and INCLUDE_IMAKEFILE
3 XCOMM $TOG: Imake.tmpl /main/245 1997/05/20 10:05:47 kaleb $
8 XCOMM $XFree86: xc/config/cf/Imake.tmpl,v 3.32.2.8 1998/02/08 11:19:24 dawes Exp $
9 XCOMM ----------------------------------------------------------------------
12 * generic imake template
16 * Modify Imake.cf when adding a new architecture, do not modify this file.
17 * Platform-specific parameters may be set in the appropriate <vendor>.cf
18 * configuration files. Site-specific parameters should be set in the file
19 * site.def. Full rebuilds are recommended if any parameters are changed.
20 * If your C preprocessor does not define any unique symbols, you will need
21 * to set BOOTSTRAPCFLAGS when rebuilding imake (usually when doing
22 * "make World" the first time).
25 #define ImakeConfigRelease 6
30 /* Ensure that "all" is the default target in the Makefile. */
37 XCOMM -----------------------------------------------------------------------
38 XCOMM site-specific configuration parameters that need to come before
39 XCOMM the platform-specific parameters - edit site.def to change
40 #define BeforeVendorCF
44 #if defined(HasGcc2) && !defined(HasGcc)
45 # define HasGcc HasGcc2
49 # define HasClearmake NO
53 * ClearmakeOSName - insert the current OS type into the clearmake
54 * build script, so .o files from different platforms cannot be winked in.
55 * If clearmake finds the build script for two .o files is the same, it
56 * will share the .o, even across different architectures. Inserting the
57 * O/S name into the build script in a comment prevents unwanted sharing.
58 * Note the trailing double-@ in the macro: end a line using this macro
59 * with backslash without the double-@ usually used.
62 * #define SomeRule() @@\
63 * something or other @@\
68 #ifndef ClearmakeOSName
70 # define ClearmakeOSName @ XCOMM $(OSNAME) @@
72 # define ClearmakeOSName /**/
78 # define MakeCmd clearmake
83 XCOMM ----------------------------------------------------------------------
85 ClearmakeOSName $(CC) -c $(CFLAGS) $*.c
88 XCOMM ----------------------------------------------------------------------
89 XCOMM platform-specific configuration parameters - edit MacroFile to change
90 #include MacroIncludeFile
92 XCOMM ----------------------------------------------------------------------
93 XCOMM site-specific configuration parameters that go after
94 XCOMM the platform-specific parameters - edit site.def to change
100 * defaults for various generic parameters; set in site.def if needed
103 /* the following are needed before we can include Imake.rules */
105 #ifndef HasVarDirectory
106 #define HasVarDirectory NO
109 #define HasSymLinks YES
112 #define SystemV NO /* SYSV (R3) */
115 #define SystemV4 NO /* SVR4 */
117 #ifndef HasCodeCenter
118 #define HasCodeCenter NO
121 #define HasSentinel NO
126 #ifndef HasTestCenter
127 #define HasTestCenter NO
130 #define HasBsdMake NO
133 #define HasGnuMake NO
135 #ifndef HasParallelMake
136 #define HasParallelMake NO
138 #ifndef RemoveTargetProgramByMoving
139 #define RemoveTargetProgramByMoving NO
142 #if SystemV || SystemV4
143 #define DoRanlibCmd NO
145 #define DoRanlibCmd YES
148 #ifndef ExecableScripts
150 #define ExecableScripts NO
152 #define ExecableScripts YES /* kernel exec() can handle #! */
156 #ifndef HasMakefileSafeInclude /* -include or sinclude in a Makefile */
157 #if HasClearmake || HasBsdMake
158 #define HasMakefileSafeInclude YES
160 #define HasMakefileSafeInclude NO /* see also vendor-specific .cf files */
164 #include <Imake.rules>
166 #ifndef HasSharedLibraries
167 #define HasSharedLibraries NO
169 #ifndef OSMajorVersion
170 #define OSMajorVersion 0
172 #ifndef OSMinorVersion
173 #define OSMinorVersion 0
175 #ifndef OSTeenyVersion
176 #define OSTeenyVersion 0
178 #ifndef UnalignedReferencesAllowed
179 #define UnalignedReferencesAllowed NO /* if arbitrary deref is okay */
181 #ifndef AvoidNullMakeCommand
183 #define AvoidNullMakeCommand NO
185 #define AvoidNullMakeCommand YES
188 #if AvoidNullMakeCommand
189 #ifndef NullMakeCommand
190 #define NullMakeCommand @ echo -n
193 * An obscure bug in BSD4.3's original make causes it not to recognize a
194 * macro definition if the macro name starts with a non-alpha and in
197 _NULLCMD_ = NullMakeCommand
200 #ifndef CrossCompiling
201 #define CrossCompiling NO
203 #ifndef BourneShell /* to force shell in makefile */
204 #define BourneShell /bin/sh
206 #ifndef ConstructMFLAGS
208 #define ConstructMFLAGS YES /* build MFLAGS from MAKEFLAGS */
210 #define ConstructMFLAGS NO /* build MFLAGS from MAKEFLAGS */
214 #ifndef ConstructMAKEFLAGS /* needed on old BSD-based? */
215 #define ConstructMAKEFLAGS NO /* build MAKEFLAGS from MFLAGS */
219 #define HasLargeTmp NO /* be paranoid */
222 #ifndef HasBSD44Sockets
223 #define HasBSD44Sockets NO
226 #define HasSockets YES
229 #define HasStreams !HasSockets
235 #if SystemV || SystemV4
243 #define HasVFork NO /* not yet... */
248 #ifndef HasSetUserContext
249 #define HasSetUserContext NO
252 #define HasLibCrypt NO
255 #define HasPutenv NO /* assume not */
257 #ifndef HasVoidSignalReturn
258 #define HasVoidSignalReturn YES /* assume yes */
261 #define HasBsearch YES /* assume yes */
264 #define HasSnprintf NO /* assume not */
267 #define HasMkstemp NO /* assume not */
270 #define HasFortran NO
273 #if HasGcc2ForCplusplus
274 #define HasCplusplus YES
276 #define HasCplusplus NO
283 #define HasSecureRPC NO /* if you have Secure RPC */
286 #define HasKrb5 NO /* if you have Kerberos V5 */
292 #if SystemV || SystemV4
307 #if !HasZlib /* if OS doesn't have it, we'll build it */
308 #undef GzipLibrary /* GzipLibrary was valid only if HasZlib */
310 #ifndef GzipLibrary /* if OS config didn't define it, assume it's -lz */
311 #define GzipLibrary -lz
315 #define Krb5Includes -I/krb5/include
317 #ifndef Krb5Libraries
318 #define Krb5Libraries -L/krb5/lib -L/usr/isode/lib -lkrb5 -lcrypto -lisode -lcom_err -ldbm
322 #define Krb5Includes /**/
324 #define Krb5Libraries /**/
327 #define UseGnuMalloc NO
329 #ifndef GnuMallocLibrary
330 #define GnuMallocLibrary -lgmalloc
332 #ifndef MallocLibraries
334 #define MallocLibraries GnuMallocLibrary
336 #define MallocLibraries /**/
349 TKLIBNAME = TkLibName
352 #define TkLibDir /usr/local/lib
360 #define TkIncDir /usr/local/include
367 #define TkLibrary Concat(-L,$(TKLIBDIR)) Concat(-l,$(TKLIBNAME))
377 #define TclLibName tcl
382 TCLLIBNAME = TclLibName
385 #define TclLibDir /usr/local/lib
393 #define TclIncDir /usr/local/include
400 #define TclLibrary Concat(-L,$(TCLLIBDIR)) Concat(-l,$(TCLLIBNAME))
405 #ifndef NeedConstPrototypes
406 #define NeedConstPrototypes NO
408 #ifndef NeedVarargsPrototypes
409 #define NeedVarargsPrototypes NO
411 #ifndef NeedNestedPrototypes
412 #define NeedNestedPrototypes NO
414 #ifndef NeedFunctionPrototypes
415 #define NeedFunctionPrototypes (NeedVarargsPrototypes || NeedNestedPrototypes)
417 #ifndef NeedWidePrototypes
418 #define NeedWidePrototypes YES /* mix and match ANSI-C, non-ANSI */
421 #ifndef StripInstalledPrograms
422 #define StripInstalledPrograms NO /* leave symbol table just in case */
424 #ifndef UseCCMakeDepend /* use slow cc -E script */
425 #define UseCCMakeDepend NO
427 #ifndef UseGccMakeDepend /* use slowish but correct gcc -M */
428 #define UseGccMakeDepend NO
431 /* DefaultUsrBin is independent of ProjectRoot.
432 This is a directory where programs will be found even if PATH
433 is not set, for example when coming in remotely via rsh. */
434 #ifndef DefaultUsrBin
435 #define DefaultUsrBin /usr/bin
440 #define UsrLibDir Concat(ProjectRoot,/lib)
441 #ifndef AlternateUsrLibDir
442 #define AlternateUsrLibDir YES
445 #define UsrLibDir /usr/lib
446 #ifndef AlternateUsrLibDir
447 #define AlternateUsrLibDir NO
451 #ifndef AlternateUsrLibDir
452 #define AlternateUsrLibDir YES
457 #define VarLibDir Concat(ProjectVar,/lib)
459 #define VarLibDir /var/lib
464 #define ShLibDir UsrLibDir
468 #define IncRoot Concat(ProjectRoot,/include)
469 #ifndef AlternateIncRoot
470 #define AlternateIncRoot YES
473 #define IncRoot /usr/include
474 #ifndef AlternateIncRoot
475 #define AlternateIncRoot NO
479 #ifndef AlternateIncRoot
480 #define AlternateIncRoot YES
484 #define LintlibDir $(USRLIBDIR)/lint
486 #ifndef SystemManDirectory
488 #define SystemManDirectory /usr/share/man
490 #define SystemManDirectory /usr/share/man
493 #ifndef ManDirectoryRoot
495 #define ManDirectoryRoot Concat(ProjectRoot,/man)
497 #define ManDirectoryRoot SystemManDirectory
501 #define ManPath ManDirectoryRoot
503 #ifndef ManSourcePath
504 #define ManSourcePath $(MANPATH)/man
507 #define ManDir $(MANSOURCEPATH)$(MANSUFFIX)
510 #define LibmanDir $(MANSOURCEPATH)$(LIBMANSUFFIX)
513 #define FileManDir $(MANSOURCEPATH)$(FILEMANSUFFIX)
516 #define ConfigSrc $(TOP)/config
519 #if UseCCMakeDepend || UseGccMakeDepend
520 #define DependDir $(CONFIGSRC)/util
522 #define DependDir $(CONFIGSRC)/makedepend
525 #ifndef UNCOMPRESSPATH
526 #define UNCOMPRESSPATH /usr/ucb/uncompress
528 #ifndef OptimizedCDebugFlags
529 #define OptimizedCDebugFlags -O
531 #ifndef OptimizedCplusplusDebugFlags
532 #define OptimizedCplusplusDebugFlags OptimizedCDebugFlags
534 #ifndef DebuggableCDebugFlags
535 #define DebuggableCDebugFlags -g
537 #ifndef DebuggableCplusplusDebugFlags
538 #define DebuggableCplusplusDebugFlags DebuggableCDebugFlags
540 #ifndef ProfiledCDebugFlags
541 #define ProfiledCDebugFlags -pg
543 #ifndef ProfiledCplusplusDebugFlags
544 #define ProfiledCplusplusDebugFlags ProfiledCDebugFlags
546 #ifndef NoOpCDebugFlags
547 #define NoOpCDebugFlags /**/
549 #ifndef DefaultCDebugFlags
550 #define DefaultCDebugFlags OptimizedCDebugFlags
552 #ifndef DefaultCplusplusDebugFlags
553 #define DefaultCplusplusDebugFlags OptimizedCplusplusDebugFlags
555 #ifndef DefaultCCOptions
556 #define DefaultCCOptions /* floating point, etc. */
558 #ifndef DefaultCplusplusOptions
559 #define DefaultCplusplusOptions /* floating point, etc. */
562 #define NoRConst NO /* YES if const for structs of funcs is bad */
565 #define InstPgmFlags -s
568 #define InstBinFlags -m 0755
571 #define InstUidFlags -m 4711
574 #define InstLibFlags -m 0644
577 #define InstIncFlags -m 0444
580 #define InstManFlags -m 0444
583 #define InstDatFlags -m 0444
585 #ifndef InstKmemFlags /* put -g kmem -m 2711 in site.def... */
586 #define InstKmemFlags InstUidFlags
588 #ifndef ParallelMakeFlags
589 #define ParallelMakeFlags /**/
595 #if HasLargeTmp || SystemV4
596 #define ArCmd ArCmdBase cq
598 #define ArCmd ArCmdBase clq
602 #if HasLargeTmp || SystemV4
603 #define ArAddCmd ArCmdBase ru
605 #define ArAddCmd ArCmdBase rul
609 #if HasLargeTmp || SystemV4
610 #define ArExtCmd ArCmdBase x
612 #define ArExtCmd ArCmdBase xl
615 #ifndef BootstrapCFlags
616 #define BootstrapCFlags /**/
622 #define HasGcc HasGcc2
624 #ifndef HasGcc2ForCplusplus
625 #define HasGcc2ForCplusplus NO
627 #ifndef HasCenterLineC
628 #define HasCenterLineC NO
630 #ifndef HasCenterLineCplusplus
631 #define HasCenterLineCplusplus NO
635 #define CcCmd gcc -fpcc-struct-return
638 #define CcCmd gcc -fstrength-reduce -fpcc-struct-return
649 #if HasGcc2ForCplusplus
650 #define CplusplusCmd g++
652 #define CplusplusCmd CC
655 #ifndef CplusplusFilt
656 # define CplusplusFilt c++filt
658 #ifndef CplusplusLibC
659 #define CplusplusLibC /**/
661 #ifndef CplusplusStandardDefines
662 #define CplusplusStandardDefines StandardDefines
664 #ifndef CplusplusExtraDefines
665 #define CplusplusExtraDefines /**/
667 #ifndef CplusplusExtraIncludes
668 #define CplusplusExtraIncludes /**/
670 #ifndef CplusplusDependIncludes
671 #define CplusplusDependIncludes /**/
673 #ifndef CplusplusOptions
674 #define CplusplusOptions /**/
676 #ifndef CplusplusSpecialOptions
677 #define CplusplusSpecialOptions /**/
681 #define FortranCmd f77
684 #define FortranFlags /**/
686 #ifndef FortranDebugFlags /* for -O or -g */
687 #define FortranDebugFlags /**/
694 #define CompressCmd compress
700 #define CppCmd /lib/cpp
702 #ifndef CppNoLineInfoOption
703 #define CppNoLineInfoOption /**/
705 #ifndef PreProcessCmd
706 #define PreProcessCmd CcCmd -E
708 #ifndef InstallCmd /* hack should be in project */
709 #if SystemV || SystemV4
710 #ifdef UseInstalled /* assume BINDIR in path */
711 #define InstallCmd bsdinst
713 #define InstallCmd $(SHELL) $(CONFIGSRC)/util/bsdinst.sh
716 #define InstallCmd install
720 #define InstallFlags -c
734 #ifndef CplusplusYaccCmd
735 #define CplusplusYaccCmd YaccCmd
741 #if SystemV || SystemV4
742 #define LintLibFlag -o
744 #define LintLibFlag -C
748 #if SystemV || SystemV4
751 #define LintOpts -axz
757 #ifndef LnCmd /* can use cp instead of ln if necessary */
771 #define RanlibCmd ranlib
773 #ifndef RanlibInstFlags
774 #define RanlibInstFlags /**/
779 #ifndef StandardIncludes /* for platform-specifics */
780 #define StandardIncludes /**/
782 #ifndef StandardDefines
784 #define StandardDefines -DSYSV
787 #define StandardDefines -DSVR4
789 #define StandardDefines /**/
793 #ifndef StandardCppDefines
794 #define StandardCppDefines StandardDefines
796 #ifndef Malloc0ReturnsNull
798 #define Malloc0ReturnsNull YES
800 #define Malloc0ReturnsNull NO
803 #if Malloc0ReturnsNull
804 #ifndef Malloc0ReturnsNullDefines
805 #define Malloc0ReturnsNullDefines -DMALLOC_0_RETURNS_NULL
808 #ifndef ToolkitStringsABIOptions
809 #define ToolkitStringsABIOptions /**/
813 #define NdbmDefines -DNDBM
815 #define NdbmDefines /**/
819 #if !defined(UseInstalled)
820 #define LdPreLib -L$(BUILDLIBDIR)
822 #if AlternateUsrLibDir
823 #define LdPreLib -L$(USRLIBDIR)
825 #define LdPreLib /**/
830 #if !defined(UseInstalled) && AlternateUsrLibDir && !HasLdRunPath
831 #define LdPostLib -L$(USRLIBDIR)
833 #define LdPostLib /**/
837 #define MathLibrary -lm
840 #define DBMLibrary -ldbm
843 #define DlLibrary -ldl
845 #ifndef ExtraLibraries
848 #define ExtraLibraries -lsocket -lnsl -lw
850 #define ExtraLibraries -lnsl -lw
853 #define ExtraLibraries /**/
856 #ifndef ExtraLoadOptions
857 #define ExtraLoadOptions /**/
859 #ifndef ExtraLoadFlags
860 #define ExtraLoadFlags /**/
862 #ifndef LdCombineFlags
864 #define LdCombineFlags -r
866 #define LdCombineFlags -X -r
870 #define LdStripFlags -x
873 #define TagsCmd ctags
875 #ifndef LoaderLibPrefix
876 #define LoaderLibPrefix /**/
879 #ifdef UseInstalled /* assume BINDIR in path */
880 #define ImakeCmd imake
882 #define ImakeCmd $(IMAKESRC)/imake
887 #ifdef UseInstalled /* assume BINDIR in path */
888 #define DependCmd gccmakedep
890 #define DependCmd $(DEPENDSRC)/gccmakedep
893 #ifdef UseInstalled /* assume BINDIR in path */
894 #define DependCmd makedepend
896 #define DependCmd $(DEPENDSRC)/makedepend
901 #define DependFlags /**/
903 #ifndef DependFileName
905 #define DependFileName Makefile.dep
907 #define DependFileName .depend
910 #ifndef ExportListCmd
911 # ifndef ExportListGenSource
912 # define ExportListCmd /**/
913 # elif !defined(UseInstalled)
914 # define ExportListCmd $(CONFIGSRC)/util/exportlistgen
916 # define ExportListCmd exportlistgen
920 #ifdef UseInstalled /* assume BINDIR in path */
921 #define MkdirHierCmd mkdirhier
923 #define MkdirHierCmd $(SHELL) $(CONFIGSRC)/util/mkdirhier.sh
927 #define TroffCmd psroff
930 #define NroffCmd nroff
936 #define ManMacros -man
951 #define DvipsCmd dvips
954 #define LatexCmd latex
958 #define SentinelCmd sentinel
960 #ifndef SentinelOptions
961 #define SentinelOptions /**/
966 #define PurifyCmd purify
968 #ifndef PurifyOptions
969 #define PurifyOptions /**/
974 #define ProofCmd proof
977 #define ProofOptions /**/
980 #ifndef PathSeparator
981 #define PathSeparator /
993 #define ManSuffix n /* use just one tab or cpp will die */
996 #define LibManSuffix 3 /* use just one tab or cpp will die */
998 #ifndef FileManSuffix
999 #if SystemV || SystemV4 || defined(OSF1Architecture)
1000 #define FileManSuffix 4 /* use just one tab or cpp will die */
1002 #define FileManSuffix 5 /* use just one tab or cpp will die */
1005 #ifndef ExpandManNames
1007 #define ExpandManNames NO
1009 #define ExpandManNames YES
1018 #ifndef SiteIConfigFiles
1019 #define SiteIConfigFiles /**/
1021 #ifndef OtherIConfigFiles
1022 #define OtherIConfigFiles /**/
1024 #ifndef ExtraFilesToClean
1025 #define ExtraFilesToClean /**/
1027 #ifndef FilesToClean
1028 #define FilesToClean *.CKP *.ln *.BAK *.bak *.Osuf core errs ,* *~ *.a .emacs_* tags TAGS make.log MakeOut
1031 PATHSEP = PathSeparator
1035 CURRENT_DIR = CURDIR
1039 MKDIRHIER = MkdirHierCmd
1040 EXPORTLISTGEN = ExportListCmd
1041 CONFIGSRC = ConfigSrc
1042 IMAKESRC = $(CONFIGSRC)/imake
1043 DEPENDSRC = DependDir
1045 INCROOT = IncRoot /* base of where to put header files */
1046 USRLIBDIR = UsrLibDir /* nonshared libraries */
1047 VARLIBDIR = VarLibDir /* xdm runtime files */
1048 SHLIBDIR = ShLibDir /* shared libraries */
1049 LINTLIBDIR = LintlibDir /* lint libraries */
1050 MANPATH = ManPath /* top of manual page tree */
1051 MANSOURCEPATH = ManSourcePath /* prefix for man page sources */
1052 MANDIR = ManDir /* man pages for commands */
1053 LIBMANDIR = LibmanDir /* man pages for library routines */
1054 FILEMANDIR = FileManDir /* man pages for config files */
1057 BOOTSTRAPCFLAGS = BootstrapCFlags /* set if cpp does not have uniq sym */
1062 FDEBUGFLAGS = FortranDebugFlags
1063 FCFLAGS = FortranFlags $(FDEBUGFLAGS)
1070 CXXFILT = CplusplusFilt
1071 CXXLIB = CplusplusLibC
1072 CXXDEBUGFLAGS = DefaultCplusplusDebugFlags
1073 CXXDEPENDINCLUDES = CplusplusDependIncludes
1074 CXXEXTRA_DEFINES = CplusplusExtraDefines
1075 CXXEXTRA_INCLUDES = CplusplusExtraIncludes
1076 CXXSTD_DEFINES = CplusplusStandardDefines $(CXXPROJECT_DEFINES)
1077 CXXOPTIONS = CplusplusOptions
1078 CXXINCLUDES = $(INCLUDES) $(TOP_INCLUDES) $(CXXEXTRA_INCLUDES)
1079 CXXDEFINES = $(CXXINCLUDES) $(CXXSTD_DEFINES) $(THREADS_CXXDEFINES) $(CXXEXTRA_DEFINES) $(DEFINES)
1080 CXXFLAGS = $(CXXDEBUGFLAGS) $(CXXOPTIONS) $(THREADS_CXXFLAGS) $(CXXDEFINES)
1082 COMPRESS = CompressCmd
1084 CPP = CppCmd $(STD_CPP_DEFINES) /* simple filters */
1085 PREPROCESSCMD = PreProcessCmd $(STD_CPP_DEFINES) /* prefered; mdep */
1086 INSTALL = InstallCmd
1087 INSTALLFLAGS = InstallFlags
1092 CCYACC = CplusplusYaccCmd
1094 LINTLIBFLAG = LintLibFlag
1102 RANLIBINSTFLAGS = RanlibInstFlags
1105 MANSUFFIX = ManSuffix /* suffix for command man pages */
1106 LIBMANSUFFIX = LibManSuffix /* suffix for library man pages */
1107 FILEMANSUFFIX = FileManSuffix /* suffix for config file man pages */
1111 MANMACROS = ManMacros
1121 SENTINEL = SentinelCmd
1122 SENTINELOPTIONS = SentinelOptions
1126 PURIFYOPTIONS = PurifyOptions
1130 PROOFOPTIONS = ProofOptions
1132 STD_INCLUDES = StandardIncludes
1133 STD_CPP_DEFINES = StandardCppDefines $(PROJECT_DEFINES)
1134 STD_DEFINES = StandardDefines $(PROJECT_DEFINES)
1135 EXTRA_LOAD_FLAGS = ExtraLoadFlags
1136 EXTRA_LDOPTIONS = ExtraLoadOptions
1137 EXTRA_LIBRARIES = MallocLibraries ExtraLibraries Krb5Libraries
1140 MFLAGS = -$(MAKEFLAGS)
1142 #if ConstructMAKEFLAGS
1143 MAKEFLAGS = $(MFLAGS)
1145 PARALLELMFLAGS = ParallelMakeFlags
1146 #if HasSharedLibraries
1147 SHAREDCODEDEF = SharedCodeDef
1148 SHLIBDEF = SharedLibraryDef
1149 #ifdef SharedLibraryLoadFlags
1150 SHLIBLDFLAGS = SharedLibraryLoadFlags
1153 * Here we set up flags needed to produce position-independent code
1154 * when doing C and C++ compilation. The default if you specify C
1155 * PIC flags without also specifying C++ PIC flags is to assume that
1156 * the C flags work for both. If your C++ compiler requires different
1157 * flags, specify them explicitly in PositionIndependentCplusplusFlags.
1159 #ifdef PositionIndependentCFlags
1160 PICFLAGS = PositionIndependentCFlags
1162 #ifdef PositionIndependentCplusplusFlags
1163 CXXPICFLAGS = PositionIndependentCplusplusFlags
1165 #ifdef PositionIndependentCFlags
1166 CXXPICFLAGS = PositionIndependentCFlags
1170 #if !HasVoidSignalReturn
1171 SIGNAL_DEFINES = -DSIGNALRETURNSINT
1174 * The following supports forcing of function prototypes
1176 #if NeedFunctionPrototypes && NeedVarargsPrototypes && NeedConstPrototypes && NeedNestedPrototypes
1177 #define _funcprotodef -DFUNCPROTO=15
1179 #if NeedFunctionPrototypes && NeedVarargsPrototypes && NeedNestedPrototypes
1180 #define _funcprotodef -DFUNCPROTO=11
1182 #if NeedFunctionPrototypes && NeedNestedPrototypes
1183 #define _funcprotodef -DFUNCPROTO=9
1185 #if NeedFunctionPrototypes && NeedVarargsPrototypes && NeedConstPrototypes
1186 #define _funcprotodef -DFUNCPROTO=7
1188 #if NeedFunctionPrototypes && NeedConstPrototypes
1189 #define _funcprotodef -DFUNCPROTO=5
1191 #if NeedFunctionPrototypes && NeedVarargsPrototypes
1192 #define _funcprotodef -DFUNCPROTO=3
1194 #if NeedFunctionPrototypes
1195 #define _funcprotodef -DFUNCPROTO
1197 #define _funcprotodef /**/
1205 #if NeedWidePrototypes
1206 #define _wideprotodef /**/
1208 #define _wideprotodef -DNARROWPROTO
1210 PROTO_DEFINES = _funcprotodef _wideprotodef
1211 #undef _funcprotodef
1212 #undef _wideprotodef
1214 #if StripInstalledPrograms
1215 INSTPGMFLAGS = InstPgmFlags /* install flags for stripping */
1219 INSTBINFLAGS = InstBinFlags /* install flags for programs */
1220 INSTUIDFLAGS = InstUidFlags /* install flags for setuid programs */
1221 INSTLIBFLAGS = InstLibFlags /* install flags for libraries */
1222 INSTINCFLAGS = InstIncFlags /* install flags for headers */
1223 INSTMANFLAGS = InstManFlags /* install flags for man pages */
1224 INSTDATFLAGS = InstDatFlags /* install flags for data files */
1225 INSTKMEMFLAGS = InstKmemFlags /* install flags for /dev/kmem progs */
1228 PROJECTROOT = ProjectRoot
1231 # if AlternateIncRoot
1232 # define TopInclude -I$(INCROOT)
1234 # define TopInclude /**/
1237 # define TopInclude -I$(TOP)
1239 CDEBUGFLAGS = DefaultCDebugFlags
1240 CCOPTIONS = DefaultCCOptions /* to distinguish from param flags */
1242 * STD_INCLUDES contains system-specific includes
1243 * TOP_INCLUDES specifies how to get to /usr/include or its build substitute
1244 * EXTRA_INCLUDES contains project-specific includes set in project incfiles
1245 * INCLUDES contains client-specific includes set in Imakefile
1246 * LOCAL_LDFLAGS contains client-specific ld flags flags set in Imakefile
1248 ALLINCLUDES = $(INCLUDES) $(EXTRA_INCLUDES) $(TOP_INCLUDES) $(STD_INCLUDES)
1249 ALLDEFINES = $(ALLINCLUDES) $(STD_DEFINES) $(EXTRA_DEFINES) $(PROTO_DEFINES) $(THREADS_DEFINES) $(DEFINES)
1250 CFLAGS = $(CDEBUGFLAGS) $(CCOPTIONS) $(THREADS_CFLAGS) $(ALLDEFINES)
1251 LINTFLAGS = $(LINTOPTS) -DLINT $(ALLDEFINES) $(DEPEND_DEFINES)
1253 LDPOSTLIB = LdPostLib
1254 LDOPTIONS = $(CDEBUGFLAGS) $(CCOPTIONS) $(EXTRA_LDOPTIONS) $(THREADS_LDFLAGS) $(LOCAL_LDFLAGS) $(LDPRELIBS)
1255 CXXLDOPTIONS = $(CXXDEBUGFLAGS) $(CXXOPTIONS) $(EXTRA_LDOPTIONS) $(THREADS_CXXLDFLAGS) $(LOCAL_LDFLAGS) $(LDPRELIBS)
1257 LDLIBS = $(LDPOSTLIBS) $(THREADS_LIBS) $(SYS_LIBRARIES) $(EXTRA_LIBRARIES)
1258 #if HasBrokenCCForLink
1261 #if AlternateUsrLibDir && HasLdRunPath
1262 CCENVSETUP = LD_RUN_PATH=$(USRLIBDIRPATH)
1263 CCLINK = $(CCENVSETUP) $(CC)
1268 #if AlternateUsrLibDir && HasLdRunPath
1269 CXXENVSETUP = LD_RUN_PATH=$(USRLIBDIRPATH)
1270 CXXLINK = $(CXXENVSETUP) $(CXX)
1274 LDSTRIPFLAGS = LdStripFlags
1275 LDCOMBINEFLAGS = LdCombineFlags
1276 DEPENDFLAGS = DependFlags
1278 XCOMM Not sure this belongs here
1281 TKLIBNAME = TkLibName
1282 TKLIBRARY = TkLibrary
1283 TCLLIBDIR = TclLibDir
1284 TCLINCDIR = TclIncDir
1285 TCLLIBNAME = TclLibName
1286 TCLLIBRARY = TclLibrary
1288 MACROFILE = MacroFile
1291 IMAKE_DEFINES = /* leave blank, for command line use only */
1293 IRULESRC = $(CONFIGDIR) /* used in rules file */
1294 IMAKE_CMD = $(IMAKE) -DUseInstalled -I$(IRULESRC) $(IMAKE_DEFINES)
1296 IRULESRC = $(CONFIGSRC)/cf
1297 IMAKE_CMD = $(IMAKE) -I$(IRULESRC) $(IMAKE_DEFINES)
1300 /* clearmake records relevant defines and flags in the build script,
1301 so it knows when they change and we don't need this coarser-level
1302 dependency. We also don't want it, since it prevents sharing if
1303 even one config file, say site.def or host.def, changes. */
1304 ICONFIGFILES = $(IRULESRC)/Imake.tmpl $(IRULESRC)/X11.tmpl \
1305 $(IRULESRC)/site.def $(IRULESRC)/$(MACROFILE) \
1306 OtherIConfigFiles SiteIConfigFiles $(EXTRA_ICONFIGFILES)
1309 #ifndef TopLevelProject
1310 # define TopLevelProject X11
1312 #ifndef ProjectRulesFile
1313 # define ProjectRulesFile Concat3(<,TopLevelProject,.rules>)
1315 #include ProjectRulesFile
1316 #ifndef LocalRulesFile
1317 /* need this to make ANSI-style preprocessors happy */
1318 #define LocalRulesFile <noop.rules>
1320 #include LocalRulesFile
1323 * get project-specific configuration and rules
1325 #ifndef ProjectTmplFile
1326 #define ProjectTmplFile Concat3(<,TopLevelProject,.tmpl>)
1328 #include ProjectTmplFile
1329 #ifndef LocalTmplFile
1330 /* need this to make ANSI-style preprocessors happy */
1331 #define LocalTmplFile <noop.rules>
1333 #include LocalTmplFile
1335 #ifdef FixupLibReferences
1336 FixupLibReferences()
1339 /* ConfigDir comes from X11.tmpl */
1340 CONFIGDIR = ConfigDir /* build configuration information */
1344 USRLIBDIRPATH = UsrLibDirPath
1345 LDPRELIBS = LdPreLibs
1346 LDPOSTLIBS = LdPostLibs
1347 TOP_INCLUDES = TopIncludes
1348 PROJECT_DEFINES = ProjectDefines
1350 CXXPROJECT_DEFINES = CplusplusProjectDefines
1353 XCOMM ----------------------------------------------------------------------
1354 XCOMM start of Imakefile
1355 #include INCLUDE_IMAKEFILE
1357 XCOMM ----------------------------------------------------------------------
1358 XCOMM common rules for all Makefiles - do not edit
1361 CPPOnlyCompile($*.c,$(_NOOP_))
1363 * These need to be here so that rules in Imakefile occur first; the blank
1364 * emptyrule is to make sure that an empty Imakefile does not default to make
1371 #ifndef IHaveSpecialMakefileTarget
1376 #ifdef MakefileAdditions
1380 CenterLoadTarget(debug_src,$(SRCS),NullParameter,$(ALLDEFINES))
1382 CenterLoadTarget(debug_obj,$(OBJS),NullParameter,$(ALLDEFINES))
1384 ManKeywordsTarget($(MANPATH))
1387 XCOMM ----------------------------------------------------------------------
1388 XCOMM rules for building in SUBDIRS - do not edit
1390 InstallSubdirs($(SUBDIRS))
1391 InstallManSubdirs($(SUBDIRS))
1392 InstallLinkKitSubdirs($(SUBDIRS))
1393 CleanSubdirs($(SUBDIRS))
1394 TagSubdirs($(SUBDIRS))
1395 MakefileSubdirs($(SUBDIRS))
1396 IncludesSubdirs($(SUBDIRS))
1400 /* must be after all install.man rules that install anything */
1401 #if MakeManKeywords /* typically only at top level */
1402 install.man:: man_keywords
1405 #ifndef IHaveSubdirs
1406 XCOMM ----------------------------------------------------------------------
1407 XCOMM empty rules for directories that do not have SUBDIRS - do not edit
1410 @echo "install in $(CURRENT_DIR) done"
1413 @echo "install.man in $(CURRENT_DIR) done"
1416 @echo "install.linkkit in $(CURRENT_DIR) done"
1424 #endif /* if subdirectory rules are needed */
1426 XCOMM ----------------------------------------------------------------------
1427 XCOMM dependencies generated by makedepend
1428 IncludeMakefile(DependFileName)