xref: /aoo41x/main/solenv/inc/startup/startup.mk (revision bb113e63)
1*bb113e63SAndrew Rist# *************************************************************
2*bb113e63SAndrew Rist#
3*bb113e63SAndrew Rist#  Licensed to the Apache Software Foundation (ASF) under one
4*bb113e63SAndrew Rist#  or more contributor license agreements.  See the NOTICE file
5*bb113e63SAndrew Rist#  distributed with this work for additional information
6*bb113e63SAndrew Rist#  regarding copyright ownership.  The ASF licenses this file
7*bb113e63SAndrew Rist#  to you under the Apache License, Version 2.0 (the
8*bb113e63SAndrew Rist#  "License"); you may not use this file except in compliance
9*bb113e63SAndrew Rist#  with the License.  You may obtain a copy of the License at
10*bb113e63SAndrew Rist#
11*bb113e63SAndrew Rist#    http://www.apache.org/licenses/LICENSE-2.0
12*bb113e63SAndrew Rist#
13*bb113e63SAndrew Rist#  Unless required by applicable law or agreed to in writing,
14*bb113e63SAndrew Rist#  software distributed under the License is distributed on an
15*bb113e63SAndrew Rist#  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16*bb113e63SAndrew Rist#  KIND, either express or implied.  See the License for the
17*bb113e63SAndrew Rist#  specific language governing permissions and limitations
18*bb113e63SAndrew Rist#  under the License.
19*bb113e63SAndrew Rist#
20*bb113e63SAndrew Rist# *************************************************************
21cdf0e10cSrcweir# This is the root DMAKE startup file.
22cdf0e10cSrcweir#
23cdf0e10cSrcweir# Definitions common to all environments are given at the root.
24cdf0e10cSrcweir# Definitions parameterized at the root have their parameters specified
25cdf0e10cSrcweir# in sub-makefiles which are included based on the values of the three
26cdf0e10cSrcweir# make variables:
27cdf0e10cSrcweir#
28cdf0e10cSrcweir#	OS		- core operating system flavour
29cdf0e10cSrcweir#
30cdf0e10cSrcweir# See the file 'summary', found in this directory for a list of
31cdf0e10cSrcweir# environments supported by this release.
32cdf0e10cSrcweir
33cdf0e10cSrcweir# Disable warnings for macros given on the command line but redefined here.
34cdf0e10cSrcweir__.silent !:= $(.SILENT)	# Preserve user's .SILENT flag
35cdf0e10cSrcweir.SILENT   !:= yes
36cdf0e10cSrcweir.NOTABS	  !:= yes
37cdf0e10cSrcweir.ERROR :
38cdf0e10cSrcweir	@echo '---* $(MKFILENAME) *---'
39cdf0e10cSrcweir
40cdf0e10cSrcweir# Define the directory separator string.
41cdf0e10cSrcweir/ *=  $(DIRSEPSTR)
42cdf0e10cSrcweir
43cdf0e10cSrcweir.IMPORT .IGNORE : .EVERYTHING
44cdf0e10cSrcweir
45cdf0e10cSrcweir.IF "$(TNR)" == ""
46cdf0e10cSrcweir
47cdf0e10cSrcweirCALLMACROS:=$(MAKEMACROS)
48cdf0e10cSrcweir.EXPORT : CALLMACROS
49cdf0e10cSrcweir
50cdf0e10cSrcweirCALLTARGETS=$(MAKETARGETS)
51cdf0e10cSrcweir.ENDIF			# "$(TNR)" == ""
52cdf0e10cSrcweir
53cdf0e10cSrcweir.INCLUDEDIRS : $(DMAKE_INC) $(SOLARVERSION)$/$(INPATH)$/inc$(UPDMINOREXT) $(SOLARENV)$/inc
54cdf0e10cSrcweir
55cdf0e10cSrcweir# Grab key definitions from the environment
56cdf0e10cSrcweir# .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
57cdf0e10cSrcweir
58cdf0e10cSrcweir.IF "$(OS)" == "" || "$(OS)" == "Windows_NT"
59cdf0e10cSrcweir.ERROR : ; @echo Forced error: Environment variable OS has to be set for OOo build!
60cdf0e10cSrcweirOS_variable_needed
61cdf0e10cSrcweir.ENDIF
62cdf0e10cSrcweir
63cdf0e10cSrcweir# Customize macro definitions based on seting of OS.
64cdf0e10cSrcweir# This must come before the default macro definitions which follow.
65cdf0e10cSrcweir.IF "$(OS)" == "OS2"
66cdf0e10cSrcweir.INCLUDE: $(INCFILENAME:d)OS2/macros.mk
67cdf0e10cSrcweir.ELIF "$(OS)" == "WNT"
68cdf0e10cSrcweir.INCLUDE: $(INCFILENAME:d)wnt/macros.mk
69cdf0e10cSrcweir.END
70cdf0e10cSrcweir
71cdf0e10cSrcweir# ----------------- Default Control Macro definitions -----------------------
72cdf0e10cSrcweir# Select appropriate defaults for basic macros
73cdf0e10cSrcweirMAKE          *=  $(MAKECMD) $(MFLAGS)
74cdf0e10cSrcweirTMPDIR        *:= $/tmp
75cdf0e10cSrcweirDIVFILE       *=  $(TMPFILE)
76cdf0e10cSrcweir
77cdf0e10cSrcweirMAXLINELENGTH	= 65530
78cdf0e10cSrcweir
79cdf0e10cSrcweir# Recipe execution configuration
80cdf0e10cSrcweirSHELL := $(OOO_SHELL)
81cdf0e10cSrcweirSHELLFLAGS := -c
82cdf0e10cSrcweirSHELLMETAS := !"\#$$%&'()*;<=>?[\]`{{|}}~
83cdf0e10cSrcweir    # the colon (":") utility is typically only available as a shell built-in,
84cdf0e10cSrcweir    # so it should be included in SHELLMETAS; however, this would result in very
85cdf0e10cSrcweir    # many false positives on Windows where ":" is used in drive letter notation
86cdf0e10cSrcweirGROUPSHELL := $(SHELL)
87cdf0e10cSrcweirGROUPFLAGS :=
88cdf0e10cSrcweirGROUPSUFFIX :=
89cdf0e10cSrcweir
90cdf0e10cSrcweir# Intermediate target removal configuration
91cdf0e10cSrcweirRM            *:= rm
92cdf0e10cSrcweirRMFLAGS       *=  -f
93cdf0e10cSrcweirRMTARGET      *=  $<
94cdf0e10cSrcweir
95cdf0e10cSrcweir# Default recipe that is used to remove intermediate targets.
96cdf0e10cSrcweir.REMOVE :; #echo dummy remove #$(RM) $(RMFLAGS) $(RMTARGET)
97cdf0e10cSrcweir#.REMOVE :; echo $(RM) $(RMFLAGS) $(RMTARGET)
98cdf0e10cSrcweir
99cdf0e10cSrcweir# Directory caching configuration.
100cdf0e10cSrcweir.DIRCACHE         *:= yes
101cdf0e10cSrcweir.DIRCACHERESPCASE *:= yes
102cdf0e10cSrcweir
103cdf0e10cSrcweir# Define the special NULL Prerequisite
104cdf0e10cSrcweirNULLPRQ *:= __.NULLPRQ
105cdf0e10cSrcweir
106cdf0e10cSrcweir# Primary suffixes in common use
107cdf0e10cSrcweirE *:= # Executables
108cdf0e10cSrcweir
109cdf0e10cSrcweir# Other Compilers, Tools and their flags
110cdf0e10cSrcweirMV *:= mv     # File rename command
111cdf0e10cSrcweir
112cdf0e10cSrcweir
113cdf0e10cSrcweir# Finally, define the default construction strategy
114cdf0e10cSrcweir.ROOT .PHONY .NOSTATE .SEQUENTIAL :- .INIT .TARGETS .DONE;
115cdf0e10cSrcweir.INIT .DONE .PHONY: $(NULLPRQ);
116cdf0e10cSrcweir
117cdf0e10cSrcweir# Define the NULL Prerequisite as having no recipe.
118cdf0e10cSrcweir$(NULLPRQ) .PHONY :;
119cdf0e10cSrcweir
120cdf0e10cSrcweir# Reset warnings back to previous setting.
121cdf0e10cSrcweir.SILENT !:= $(__.silent)
122cdf0e10cSrcweir
123cdf0e10cSrcweir# Check for a Local project file, gets parsed before user makefile.
124cdf0e10cSrcweir.INCLUDE .IGNORE .NOINFER: "project.mk"
125cdf0e10cSrcweir
126cdf0e10cSrcweir.MAKEFILES :- makefile.mk MAKEFILE.MK $(CONFIG_PROJECT)$/makefile.rc $(SOLARENV)$/inc$/found_no.mk
127cdf0e10cSrcweir
128cdf0e10cSrcweirLANG=C
129cdf0e10cSrcweir.EXPORT : LANG
130