xref: /trunk/main/solenv/inc/startup/startup.mk (revision cdf0e10c)
1# This is the root DMAKE startup file.
2#
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
6# make variables:
7#
8#	OS		- core operating system flavour
9#
10# See the file 'summary', found in this directory for a list of
11# environments supported by this release.
12
13# Disable warnings for macros given on the command line but redefined here.
14__.silent !:= $(.SILENT)	# Preserve user's .SILENT flag
15.SILENT   !:= yes
16.NOTABS	  !:= yes
17.ERROR :
18	@echo '---* $(MKFILENAME) *---'
19
20# Define the directory separator string.
21/ *=  $(DIRSEPSTR)
22
23.IMPORT .IGNORE : .EVERYTHING
24
25.IF "$(TNR)" == ""
26
27CALLMACROS:=$(MAKEMACROS)
28.EXPORT : CALLMACROS
29
30CALLTARGETS=$(MAKETARGETS)
31.ENDIF			# "$(TNR)" == ""
32
33.INCLUDEDIRS : $(DMAKE_INC) $(SOLARVERSION)$/$(INPATH)$/inc$(UPDMINOREXT) $(SOLARENV)$/inc
34
35# Grab key definitions from the environment
36# .IMPORT .IGNORE : OS TMPDIR UPD INPATH OUTPATH GUI COM EX CLASSPATH PRODUCT GUIBASE SOLARENV SOLARVER GUIENV CPU CPUNAME CVER GVER COMPATH LIB INCLUDE TR SORT UNIQ ROOTDIR SED AWK TOUCH IENV ILIB PRODUCT_ENV COMEX UPD BUILD DEVROOT VCL SO3 ENVCFLAGS
37
38.IF "$(OS)" == "" || "$(OS)" == "Windows_NT"
39.ERROR : ; @echo Forced error: Environment variable OS has to be set for OOo build!
40OS_variable_needed
41.ENDIF
42
43# Customize macro definitions based on seting of OS.
44# This must come before the default macro definitions which follow.
45.IF "$(OS)" == "OS2"
46.INCLUDE: $(INCFILENAME:d)OS2/macros.mk
47.ELIF "$(OS)" == "WNT"
48.INCLUDE: $(INCFILENAME:d)wnt/macros.mk
49.END
50
51# ----------------- Default Control Macro definitions -----------------------
52# Select appropriate defaults for basic macros
53MAKE          *=  $(MAKECMD) $(MFLAGS)
54TMPDIR        *:= $/tmp
55DIVFILE       *=  $(TMPFILE)
56
57MAXLINELENGTH	= 65530
58
59# Recipe execution configuration
60SHELL := $(OOO_SHELL)
61SHELLFLAGS := -c
62SHELLMETAS := !"\#$$%&'()*;<=>?[\]`{{|}}~
63    # the colon (":") utility is typically only available as a shell built-in,
64    # so it should be included in SHELLMETAS; however, this would result in very
65    # many false positives on Windows where ":" is used in drive letter notation
66GROUPSHELL := $(SHELL)
67GROUPFLAGS :=
68GROUPSUFFIX :=
69
70# Intermediate target removal configuration
71RM            *:= rm
72RMFLAGS       *=  -f
73RMTARGET      *=  $<
74
75# Default recipe that is used to remove intermediate targets.
76.REMOVE :; #echo dummy remove #$(RM) $(RMFLAGS) $(RMTARGET)
77#.REMOVE :; echo $(RM) $(RMFLAGS) $(RMTARGET)
78
79# Directory caching configuration.
80.DIRCACHE         *:= yes
81.DIRCACHERESPCASE *:= yes
82
83# Define the special NULL Prerequisite
84NULLPRQ *:= __.NULLPRQ
85
86# Primary suffixes in common use
87E *:= # Executables
88
89# Other Compilers, Tools and their flags
90MV *:= mv     # File rename command
91
92
93# Finally, define the default construction strategy
94.ROOT .PHONY .NOSTATE .SEQUENTIAL :- .INIT .TARGETS .DONE;
95.INIT .DONE .PHONY: $(NULLPRQ);
96
97# Define the NULL Prerequisite as having no recipe.
98$(NULLPRQ) .PHONY :;
99
100# Reset warnings back to previous setting.
101.SILENT !:= $(__.silent)
102
103# Check for a Local project file, gets parsed before user makefile.
104.INCLUDE .IGNORE .NOINFER: "project.mk"
105
106.MAKEFILES :- makefile.mk MAKEFILE.MK $(CONFIG_PROJECT)$/makefile.rc $(SOLARENV)$/inc$/found_no.mk
107
108LANG=C
109.EXPORT : LANG
110