1 # This is the root DMAKE startup file.
3 # Definitions common to all environments are given at the root.
4 # Definitions parameterized at the root have their parameters specified
5 # in sub-makefiles which are included based on the values of the three
8 # OS - core operating system flavour
9 # OSRELEASE - specific release of the operating system
10 # OSENVIRONMENT - software construction environment in use
12 # See the file 'summary', found in this directory for a list of
13 # environments supported by this release.
15 # Disable warnings for macros given on the command line but redefined here.
16 __.silent
!:= $(.SILENT
) # Preserve user's .SILENT flag
19 # startup.mk configuration parameters, for each, set it to non-null if you wish
20 # to enable the named facility.
21 __.HAVE_RCS
!:= yes
# yes => RCS is installed.
22 __.HAVE_SCCS
!:= # yes => SCCS is installed.
23 __.DEFAULTS
!:= yes
# yes => define default construction rules.
24 __.EXECS
!:= yes
# yes => define how to build executables.
26 # Grab key definitions from the environment
27 # The variables OS OSRELEASE OSENVIRONMENT were removed from this
28 # list because of windows. See issue 43254 for details.
29 .IMPORT .IGNORE
: TMPDIR SHELL
31 # Default DMAKE configuration, if not overriden by environment
32 .INCLUDE .NOINFER
$(!null
,$(OS
) .IGNORE
) : $(INCFILENAME
:d
)config.mk
34 # Look for a local defaults configuration
35 .INCLUDE .NOINFER .IGNORE
: $(INCFILENAME
:d
)local.mk
37 # Define the directory separator string.
40 # Customize macro definitions based on setings of OS, OSRELEASE and
41 # OSENVIRONMENT, this must come before the default macro definitions which
43 .INCLUDE .NOINFER .IGNORE
: $(INCFILENAME
:d
)$(OS
)$/macros.mk
45 # ----------------- Default Control Macro definitions -----------------------
46 # Select appropriate defaults for basic macros
47 MAKE
*= $(MAKECMD
) -S
$(MFLAGS
)
52 # Recipe execution configuration
55 GROUPSHELL
*:= $(SHELL
)
57 SHELLMETAS
*:= |
();&<>?
*][$$:\\#`'"
60 # Intermediate target removal configuration
65 # Default recipe that is used to remove intermediate targets.
66 .REMOVE
:; $(RM
) $(RMFLAGS
) $(RMTARGET
)
68 # Check and enable AUGMAKE extensions for SYSV compatibility
84 # Directory caching configuration.
86 .DIRCACHERESPCASE
*:= yes
88 # Define the special NULL Prerequisite
89 NULLPRQ
*:= __.NULLPRQ
91 # ---------- Default Construction Macro and Rule definitions --------------
92 # The construction rules may be customized further in subsequent recipes.mk
95 # Primary suffixes in common use
101 S
*:= .s
# Assembler sources
102 V
*:= ,v
# RCS suffix
103 YTAB
*:= y.tab
# name-stem for yacc output files.
104 LEXYY
*:= lex.yy
# lex output file
106 # Standard C-language command names and flags
107 CPP
*:= $/lib
$/cpp # C-preprocessor
108 CC
*:= cc # C compiler
109 CFLAGS
*= # C compiler flags
110 "C++" *:= CC
# C++ Compiler
111 "C++FLAGS" *= # C++ Compiler flags
113 AS
*:= as # Assembler and flags
116 LD
*= $(CC
) # Loader and flags
118 LDLIBS
*= # Default libraries
123 # Definition of Print command for this system.
126 # Language and Parser generation Tools and their flags
127 YACC
*:= yacc # standard yacc
129 LEX
*:= lex # standard lex
132 # Other Compilers, Tools and their flags
133 PC
*:= pc # pascal compiler
134 RC
*:= f77
# ratfor compiler
135 FC
*:= f77
# fortran compiler
136 MV
*:= $/bin
$/mv
# File rename command
138 # Implicit generation rules for making inferences.
148 # Rules for making *$O
149 %$O : %.c
; $(CC
) $(CFLAGS
) -c
$<
150 %$O : %$P ; $(PC
) $(PFLAGS
) -c
$<
151 %$O : %$S ; $(AS
) $(ASFLAGS
) -o
$@
$<
152 %$O : %.cl
; class
-c
$<
153 %$O :|
%.e
%.r
%.F
%$F
154 $(FC
) $(RFLAGS
) $(EFLAGS
) $(FFLAGS
) -c
$<
156 # Defibe how to build simple executables
158 %$E : %$O ; $(CC
) $(LDFLAGS
) -o
$@
$< $(LDLIBS
)
161 # Recipe to make archive files, defined only if we have
162 # an archiver defined.
165 $(AR
) $(ARFLAGS
) $@
$?
171 CO
*:= co # check out for RCS
174 % : $$(@
:d
)RCS
$$/$$(@
:f
)$V
175 -$(CO
) $(COFLAGS
) $(null
,$(@
:d
) $@
$(<:d
:s
/RCS
/)$@
)
176 .NOINFER
: $$(@
:d
)RCS
$$/$$(@
:f
)$V
180 -$(CO
) $(COFLAGS
) $(null
,$(@
:d
) $@
$(<:d
:s
/RCS
/)$@
)
190 % : "$$(null,$$(@:d) s.$$@ $$(@:d)s.$$(@:f))"
192 .NOINFER
: "$$(null,$$(@:d) s.$$@ $$(@:d)s.$$(@:f))"
195 # Customize default recipe definitions for OS, OSRELEASE, etc. settings.
196 .INCLUDE .NOINFER .IGNORE
: $(INCFILENAME
:d
)$(OS
)$/recipes.mk
200 # Finally, define the default construction strategy
201 .ROOT .PHONY .NOSTATE .SEQUENTIAL
:- .INIT .TARGETS .DONE
;
202 .INIT .DONE .PHONY
: $(NULLPRQ
);
204 # Define the NULL Prerequisite as having no recipe.
207 # Reset warnings back to previous setting.
208 .SILENT
!:= $(__.silent
)
210 # Check for a Local project file, gets parsed before user makefile.
211 .INCLUDE .IGNORE .NOINFER
: "project.mk"