xref: /trunk/main/solenv/inc/settings.mk (revision 190cb148)
1#**************************************************************
2#
3#  Licensed to the Apache Software Foundation (ASF) under one
4#  or more contributor license agreements.  See the NOTICE file
5#  distributed with this work for additional information
6#  regarding copyright ownership.  The ASF licenses this file
7#  to you under the Apache License, Version 2.0 (the
8#  "License"); you may not use this file except in compliance
9#  with the License.  You may obtain a copy of the License at
10#
11#    http://www.apache.org/licenses/LICENSE-2.0
12#
13#  Unless required by applicable law or agreed to in writing,
14#  software distributed under the License is distributed on an
15#  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16#  KIND, either express or implied.  See the License for the
17#  specific language governing permissions and limitations
18#  under the License.
19#
20#**************************************************************
21
22
23MKFILENAME:=SETTINGS.MK
24
25# smaller/greater arithmetic's like ".IF 400<=200" are an OOo extension to
26# the initial dmake 4.1PL0 (unfortunately called 4.10) version and are
27# tested implicitly by the construction below.
28.IF $(MAKEVERSION:s/-cvs//:s/.//)<=410
29.ERROR : ; @echo Forced error: dmake version 4.11 or newer is needed!
30force_dmake_to_error
31.ENDIF
32
33.INCLUDE .IGNORE : ooo_vendor.mk
34
35# --- common tool makros --------------------------------------
36
37.IF "$(USE_PCH)"!=""
38ENABLE_PCH=TRUE
39.ENDIF			# "$(USE_PCH)"!=""
40
41.INCLUDE : unitools.mk
42
43.INCLUDE : minor.mk
44
45.INCLUDE .IGNORE : rtlbootstrap.mk
46
47PLATFORMID = $(RTL_OS:l)_$(RTL_ARCH:l)
48EXTNAME*=$(EXTENSIONNAME)_in
49
50.IF "$(UPDATER)"!="" || "$(CWS_WORK_STAMP)"!=""
51
52.IF "$(SOURCEVERSION)"!="$(WORK_STAMP)"
53.ERROR : ; @echo Forced error: minor.mk in solenv/inc does not match your version!
54WRONG_SOURCEVERSION
55.ENDIF
56
57# Create $(SOLARVERSION)/$(INPATH)/inc$(UPDMINOREXT)/$(UPD)minor.mk if needed
58%minor.mk : $(SOLARENV)/inc/minor.mk
59	@@-$(MKDIRHIER) $(SOLARVERSION)/$(INPATH)/inc$(UPDMINOREXT)
60	@@$(COPY) $(SOLARENV)/inc/minor.mk $(SOLARVERSION)/$(INPATH)/inc$(UPDMINOREXT)/$(UPD)minor.mk
61	@@$(TOUCH) $(SOLARVERSION)/$(INPATH)/inc$(UPDMINOREXT)/minormkchanged.flg
62.ENDIF          # "$(UPDATER)"!="" || "$(CWS_WORK_STAMP)"!=""
63
64# Force creation of $(SOLARVERSION)/$(INPATH)/inc$(UPDMINOREXT)/
65# $(UPD)minor.mk could be empty as it's contents were already included from minor.mk
66.INCLUDE : $(SOLARVERSION)/$(INPATH)/inc$(UPDMINOREXT)/$(UPD)minor.mk
67
68.IF "$(BSCLIENT)"=="TRUE"
69.IF "$(UPDATER)"!="YES"
70incorrect_settings:
71	@echo "#"
72	@echo "#" ERROR: setsolar option -bsclient used but UPDATER=YES not set!
73	@echo "#"
74	force_dmake_to_error
75.ENDIF
76.ENDIF
77
78.INCLUDE : udkversion.mk
79
80# --- reset defined Environments --------------------
81ASM=
82AFLAGS=
83
84
85#START JAVA
86
87#interpreter location
88.IF "$(JAVAINTERPRETER)" == ""
89.IF "$(JDK)" == "J++"
90JAVAINTERPRETER=jview.exe
91.ELSE
92.IF "$(JDK)" == "SCAFE"
93.IF "$(JDK_VERSION)" != ""
94JAVAINTERPRETER=$(DEVROOT)/vcafe11/java/bin/java.exe
95.ELSE
96JAVAINTERPRETER=$(DEVROOT)/cafepro/java/bin/java.exe
97.ENDIF
98.ELSE
99.IF "$(JAVACISGCJ)" == "yes"
100JAVAINTERPRETER=gij
101.ELSE
102JAVAINTERPRETER=java
103.ENDIF
104.ENDIF
105.ENDIF
106.ENDIF
107
108#compiler location
109.IF "$(JAVACOMPILER)" == ""
110.IF "$(JDK)" == "J++"
111JAVACOMPILER=jvc.exe
112.ELSE
113.IF "$(JDK)" == "SCAFE"
114.IF "$(JDK_VERSION)" != ""
115JAVACOMPILER=$(DEVROOT)/vcafe11/bin/sj.exe
116.ELSE
117JAVACOMPILER=$(DEVROOT)/cafepro/bin/sj.exe
118.ENDIF
119.ELSE
120.IF "$(JAVACISGCJ)" == "yes"
121JAVACOMPILER=gcj
122.ELSE
123JAVACOMPILER=javac
124.ENDIF
125.ENDIF
126.ENDIF
127.ENDIF
128
129#if javadoc is not already set
130.IF "$(JAVADOC)"==""
131JAVADOC=javadoc -J-Xmx120m
132.ENDIF
133
134#required arguments
135JAVAC=$(JAVACOMPILER)
136JAVAI:=$(JAVAINTERPRETER)
137.IF "$(JAVACISGCJ)" == "yes"
138JAVAC+=--encoding=UTF-8 -O2 -fno-assert -Wno-deprecated -C
139.ENDIF
140
141#classpath and response
142.IF "$(JDK)" == "J++"
143JAVACPS=/cp
144.ELSE
145.IF "$(JDK)" == "SCAFE"
146JAVACPS=-classpath
147JAVARESPONSE=TRUE
148.ELSE
149JAVACPS=-classpath
150JAVARESPONSE=
151.ENDIF
152.ENDIF
153
154JAVAFLAGS+=$(JAVA_TARGET_FLAG)
155
156#END JAVA
157
158CDEFS=
159CXXDEFS=
160CDEFSCXX=
161CDEFSOBJ=
162CDEFSSLO=
163CDEFSGUI=
164CDEFSCUI=
165CDEFSMT=
166CDEFSPROF=
167CDEFSDEBUG=
168CDEFSDBGUTIL=
169CDEFSOPT=
170
171CFLAGS=
172CFLAGSCALL=
173CFLAGSCXX=
174CFLAGSCC=
175CFLAGSOBJ=
176CFLAGSSLO=
177CFLAGSOBJGUIMT=
178CFLAGSOBJCUIMT=
179CFLAGSSLOGUIMT=
180CFLAGSSLOCUIMT=
181CFLAGSPROF=
182CFLAGSDEBUG=
183CFLAGSDBGUTIL=
184CFLAGSOPT=
185CFLAGSNOOPT=
186CFLAGSOUTOBJ=
187
188CFLAGSINCXX=
189
190LINKFLAGS=
191LINKFLAGSAPPGUI=
192LINKFLAGSSHLGUI=
193LINKFLAGSAPPCUI=
194LINKFLAGSSHLCUI=
195LINKFLAGSTACK=
196LINKFLAGSPROF=
197LINKFLAGSDEBUG=
198LINKFLAGSOPT=
199LINKFLAGSAPP=
200LINKFLAGSSHL=
201LINKEXTENDLINE=
202
203STDOBJGUI=
204STDSLOGUI=
205STDOBJCUI=
206STDSLOCUI=
207STDLIBGUIMT=
208STDLIBCUIMT=
209STDSHLGUIMT=
210STDSHLCUIMT=
211STDOBJ=
212STDSLO=
213STDLIB=
214STDSHL=
215
216LIBFLAGS=
217
218IMPLIBMGR=
219IMPLIBFLAGS=
220
221MAPSYM=
222MAPSYMFLAGS=
223
224RSC=
225RSCFLAGS=
226RSCDEFS=
227RSCLANG=
228
229RC=
230RCFLAGS=
231RCLINK=
232RCLINKFLAGS=
233RCSETVERSION=
234
235DLLPOSTFIX=
236
237HC=
238HCFLAGS=
239
240MKDEP=
241
242AS=
243BC=
244COBOL=
245CPP=
246FOR=
247PASCAL=
248
249BFLAGS=
250COBFLAGS=
251CPPFLAGS=
252CXXFLAGS=
253FFLAGS=
254PFLAGS=
255RFLAGS=
256
257LNT=
258LNTFLAGS=
259LNTFLAGSGUI=
260LNTFLAGSCOM=
261
262# doesn't make sense
263#IDLSTATICOBJS=
264
265E2P=
266CAP=
267cap=
268
269# not to reset because possibly taken from environment
270#CC=
271#CXX=
272#LINK=
273#LIBMGR=
274
275
276# avoid confusion with CUE PROFILE variable...
277PROFILE=
278
279# can be set on the command line. we shouldn't delete them!
280#profile=
281
282# reset as setting those manually is no lonjger supported
283DBGUTIL=
284dbgutil=
285
286# ===========================================================================
287# unter NT werden Variablennamen an untergeordnete makefiles UPPERCASE
288# weitergereicht, aber case significant ausgewertet!
289# ---------------------------------------------------------------------------
290
291DMAKE_WORK_DIR*:=$(subst,/,/ $(PWD))
292.IF "$(GUI)"=="WNT"
293posix_PWD:=/cygdrive/$(PWD:s/://)
294.ELIF "$(GUI)"=="OS2"
295# add /drives/ prefix, requires libc pathrewriter, otherwise breaks dmake % rule
296posix_PWD:=/drives/$(PWD:s/://)
297.ELSE			#GUI)"=="WNT"
298posix_PWD:=$(PWD)
299.ENDIF			#GUI)"=="WNT"
300
301
302.IF "$(TMP)"!=""
303tmp*=$(TMP)
304.ENDIF
305
306.IF "$(tmp)"!=""
307TMP*=$(tmp)
308.ENDIF
309
310.IF "$(TEMP)"!=""
311temp*=$(TEMP)
312.ENDIF
313
314.IF "$(temp)"!=""
315TEMP*=$(temp)
316.ENDIF
317
318.IF "$(DEPEND)"!=""
319depend=$(DEPEND)
320.ENDIF
321
322.IF "$(OPTIMIZE)"!=""
323optimize=$(OPTIMIZE)
324.ENDIF
325
326.IF "$(NOPT)"!=""
327nopt*=$(NOPT)
328.ENDIF
329
330.IF "$(GROUP)"!=""
331group*=$(GROUP)
332.ENDIF
333
334.IF "$(group)"!=""
335GROUP*=$(group)
336.ENDIF
337
338# override dbglevel if set manually
339.IF "$(dbglevel)"!=""
340DBG_LEVEL=$(dbglevel)
341.ENDIF
342
343.IF "$(NODEBUG)"!=""
344nodebug=$(NODEBUG)
345.ENDIF
346
347.IF "$(hbtoolkit)"!=""
348HBTOOLKIT=$(hbtoolkit)
349.ENDIF
350
351.IF "$(PRODUCT)"!=""
352product*=$(PRODUCT)
353.ENDIF
354
355.IF "$(product)"!=""
356PRODUCT*=$(product)
357.ENDIF
358
359.IF "$(VERBOSE)"!=""
360verbose*=$(VERBOSE)
361.ENDIF
362
363.IF "$(verbose)"!=""
364# normalize: "false" (any upper/lower case) and "0" mean FALSE, everything else means TRUE
365VERBOSE_IS_FALSE:=$(or $(eq,"$(verbose:u)","FALSE" "false"  ) $(eq,"$(verbose)","0" "false"  ))
366VERBOSE!:=$(eq,"$(VERBOSE_IS_FALSE)","t" FALSE TRUE)
367.ENDIF
368
369.IF "$(SOLARLANG)" != ""
370solarlang*=$(SOLARLANG)
371.ENDIF
372
373.IF "$(solarlang)" != ""
374SOLARLANG:=$(solarlang)
375.ENDIF
376
377.IF "$(wall)"!=""
378COMPILER_WARN_ALL=TRUE
379.ENDIF          # "$(wall)"!=""
380
381.IF "$(werror)"!=""
382COMPILER_WARN_ERRORS=TRUE
383.ENDIF
384
385.IF "$(RSC_ONCE)"!=""
386rsc_once*=$(RSC_ONCE)
387.ENDIF
388
389#.IF "$(COMMON_BUILD)"!=""
390#common_build*=$(COMMON_BUILD)
391#.ENDIF
392common_build:=
393COMMON_BUILD:=
394
395.IF "$(USE_SHL_VERSIONS)"!=""
396use_shl_versions*=$(USE_SHL_VERSIONS)
397.ENDIF
398
399.IF "$(noremove)"!=""
400NOREMOVE*=$(noremove)
401.ENDIF
402
403# --- env flags not case sensitive --------------------------------
404
405#.IF "$(envcflags)"!=""
406ENVCFLAGS*=$(envcflags)
407#.ENDIF
408
409#.IF "$(envcflagscxx)"!=""
410ENVCFLAGSCXX*=$(envcflagscxx)
411#.ENDIF
412
413
414.IF "$(envcdefs)"!=""
415ENVCDEFS*=$(envcdefs)
416.ENDIF
417
418.IF "$(envlibflags)"!=""
419ENVLIBFLAGS*=$(envlibflags)
420.ENDIF
421
422.IF "$(envcflagsincxx)"!=""
423ENVCFLAGSINCXX*=$(envcflagsincxx)
424.ENDIF
425
426.IF "$(envlinkflags)"!=""
427ENVLINKFLAGS*=$(envlinkflags)
428.ENDIF
429
430.IF "$(envrscflags)"!=""
431ENVRSCFLAGS*=$(envrscflags)
432.ENDIF
433
434.IF "$(envrscdefs)"!=""
435ENVRSCDEFS*=$(envrscdefs)
436.ENDIF
437
438.IF "$(envrsclinkflags)"!=""
439# ENVRSCLINKFLAGS*=$(envrsclinkflags)
440.ENDIF
441
442.IF "$(envrcflags)"!=""
443ENVRCFLAGS*=$(envrcflags)
444.ENDIF
445
446.IF "$(envrclinkflags)"!=""
447ENVRCLINKFLAGS*=$(envrclinkflags)
448.ENDIF
449
450# --- set both L10N variables to keep things working ---------------
451
452L10N-framework=$(L10N_framework)
453
454# --- Parameter Einstellungen ueberpruefen und umsetzen ------------
455
456# profile immer mit product
457.IF "$(profile)"!=""
458.IF "$(product)"==""
459product=full
460.ENDIF
461.ENDIF
462
463.IF "$(debug)"!=""
464DBG_LEVEL*=2
465.ENDIF
466
467# Produkt auf einen Wert setzen (alles klein)
468.IF "$(product)" != ""
469optimize=true
470.IF "$(product)" == "full" || "$(product)" == "Full" || "$(product)" == "FULL"
471product!=full
472.ENDIF
473.IF "$(product)" == "demo" || "$(product)" == "Demo" || "$(product)" == "DEMO"
474product!=demo
475.ENDIF
476.IF "$(product)" == "compact" || "$(product)" == "Compact" || "$(product)" == "COMPACT"
477product!=compact
478.ENDIF
479DBG_LEVEL*=0
480.ELSE
481optimize!=true
482dbgutil!=true
483DBG_LEVEL*=1
484USE_STLP_DEBUG*=TRUE
485.ENDIF
486
487.IF "$(debug)"!=""
488.IF "$(debug)"!="D_FORCE_OPT"
489optimize=
490OPTIMIZE=
491.ENDIF
492.ENDIF
493
494.IF "$(nopt)"!=""
495optimize=
496OPTIMIZE=
497.ENDIF
498
499# Optimierung bei FinalCheck funktioniert nicht!
500.IF "$(bndchk)" != ""
501optimize=
502OPTIMIZE=
503.ENDIF
504
505######################################################
506#
507# sprachabh. einstellungen
508#
509######################################################
510
511.INCLUDE : lang.mk
512
513.INCLUDE : postset.mk
514
515RSC_LANG_ISO+:=$(completelangiso)
516.EXPORT : RSC_LANG_ISO
517
518######################################################
519
520.IF "$(TARGETTYPE)"==""
521TARGETTYPE=CUI
522.ENDIF
523
524# --- Pfade setzen -------------------------------------------------
525
526# Output-Pfad
527# profile has to be first for not getting the .pro extension
528.IF "$(profile)"!=""
529OUT=$(PRJ)/$(OUTPATH).cap
530ROUT=$(OUTPATH).cap
531.ELSE
532
533.IF "$(product)"!=""
534OUT=$(PRJ)/$(OUTPATH).pro
535ROUT=$(OUTPATH).pro
536
537.ELSE
538.IF "$(profile)"!=""
539OUT=$(PRJ)/$(OUTPATH).cap
540ROUT=$(OUTPATH).cap
541.ENDIF
542.IF "$(dbcs)"!=""
543OUT=$(PRJ)/$(OUTPATH).w
544ROUT=$(OUTPATH).w
545.ENDIF
546# could already be set by makefile.mk
547.IF "$(OUT)" == ""
548OUT*=$(PRJ)/$(OUTPATH)
549ROUT*=$(OUTPATH)
550.ENDIF
551.ENDIF
552.ENDIF
553
554.IF "$(bndchk)" != ""
555OUT:=$(PRJ)/$(OUTPATH).bnd
556ROUT=$(OUTPATH).bnd
557.ENDIF
558.IF "$(truetime)" != ""
559OUT=$(PRJ)/$(OUTPATH).tt
560ROUT=$(OUTPATH).tt
561.ENDIF
562.IF "$(hbtoolkit)"!=""
563OUT=$(PRJ)/$(OUTPATH).tlk
564ROUT=$(OUTPATH).tlk
565.ENDIF
566
567.IF "$(PRJ)"!="."
568.IF "$(GUI)"=="WNT" || "$(GUI)"=="OS2"
569PATH_IN_MODULE:=\
570    $(subst,$(normpath $(shell @+cd $(PRJ) && pwd $(PWDFLAGS)))/, $(PWD))
571.ELSE			# "$(GUI)"=="WNT"
572PATH_IN_MODULE:=$(subst,$(shell @+cd $(PRJ) && pwd $(PWDFLAGS))/, $(PWD))
573.ENDIF			# "$(GUI)"=="WNT"
574.ELSE			# "$(PRJ)"!="."
575PATH_IN_MODULE:=
576.ENDIF			# "$(PRJ)"!="."
577
578## common output tree
579#.IF "$(common_build)"!=""
580#COMMON_OUTDIR*=common
581#.IF "$(no_common_build_reslib)"==""
582#common_build_reslib=true
583#.ENDIF			# "$(no_common_build_reslib)"==""
584#.IF "$(no_common_build_zip)"==""
585#common_build_zip=true
586#.ENDIF			# "$(no_common_build_zip)"==""
587#.IF "$(no_common_build_sign_jar)"==""
588#common_build_sign_jar=true
589#.ENDIF			# "$(no_common_build_sign_jar)"==""
590#.IF "$(no_common_build_srs)"==""
591#common_build_srs=true
592#.ENDIF			# "$(no_common_build_srs)"==""
593#.ELSE			# "$(common_build)"!=""
594COMMON_OUTDIR:=$(OUTPATH)
595#.ENDIF			# "$(common_build)"!=""
596
597LOCAL_OUT:=$(OUT)
598LOCAL_COMMON_OUT:=$(subst,$(OUTPATH),$(COMMON_OUTDIR) $(OUT))
599.EXPORT : LOCAL_OUT LOCAL_COMMON_OUT
600
601# --- generate output tree -----------------------------------------
602
603# disable for makefiles wrapping a gnumake module
604.IF "$(TARGET)"!="prj"
605# As this is not part of the initial startup makefile we define an inferred
606# target instead of using $(OUT)/inc/myworld.mk as target name.
607# (See iz62795)
608$(posix_PWD)/$(OUT)/inc/%world.mk :
609	@$(MKOUT) $(ROUT)
610	@echo $(EMQ)# > $@
611
612.INCLUDE :  $(posix_PWD)/$(OUT)/inc/myworld.mk
613
614.IF "$(common_build)"!=""
615$(posix_PWD)/$(LOCAL_COMMON_OUT)/inc/%world.mk :
616	@$(MKOUT) $(subst,$(OUTPATH),$(COMMON_OUTDIR) $(ROUT))
617	@echo $(EMQ)# > $@
618
619.INCLUDE : $(posix_PWD)/$(LOCAL_COMMON_OUT)/inc/myworld.mk
620.ENDIF			# "$(common_build)"!=""
621.ENDIF          # "$(TARGET)"!="prj"
622
623.INCLUDE .IGNORE : office.mk
624
625# Misc-Pfad
626.IF "$(UNR)"!=""
627MISCX=$(OUT)/umisc
628MISC=$(OUT)/umisc
629.ELSE
630MISC=$(OUT)/misc
631# pointing to misc in common output tree if exists
632COMMONMISC={$(subst,$(OUTPATH),$(COMMON_OUTDIR) $(MISC))}
633.ENDIF
634
635OUTCXX=$(OUT)/cxx
636
637.IF "$(PACKAGE)"!=""
638IDLPACKAGE:=$(PACKAGE)
639IDLPACKAGENAME:=$(IDLPACKAGE:sX\X/X)
640.ELSE
641IDLPACKAGE=$(PRJNAME)
642IDLPACKAGENAME=$(PRJNAME)
643.ENDIF
644
645# Objekt-Pfad
646OBJ=$(OUT)/obj
647SLO=$(OUT)/slo
648ROBJ=$(ROUT)/obj
649RSLO=$(ROUT)/slo
650
651# Particle Path
652PAR=$(OUT)/par
653
654# Library-Pfad
655LB=$(OUT)/lib
656SLB=$(OUT)/slb
657
658# wir haben ein ucr verzeichnis
659UCR=$(OUT)/ucr
660
661# $(L) nur noch pfad ins solver\upd\...\lib
662#L:={$(LB);$(SLB);$(ILIB)}
663L=$(SOLARLIBDIR)
664
665#.EXPORT : SLB LB L LIB
666ENVPRJ:=$(PRJ)
667#todo: check PRJ is still expected to exist in environment
668.EXPORT : PRJ ENVPRJ
669
670# Class-Path for java-classes
671# obwohl der generierte Bytecode plattformunabhg. sein sollte
672# generieren wir ihn ersteinmal ins abhaengige Verzeichnis
673CLASSDIR=$(OUT)/class
674CLASSPATH!:=.$(PATH_SEPERATOR)$(CLASSDIR)$(PATH_SEPERATOR)$(CLASSPATH)
675STARJAR=java -classpath $(CLASSPATH)$(PATH_SEPERATOR)$(SOLARENV)/bin/jtools.jar com.sun.star.tool.starjar.StarJar
676
677STARDEP=$(AUGMENT_LIBRARY_PATH) $(SOLARBINDIR)/javadep
678.IF "$(PRJNAME)"=="sj2"
679CLASSPATH!:=$(CLASSPATH:s/sj2/no/)
680.ENDIF
681.IF "$(PRJNAME)"=="uno"
682CLASSPATH!:=$(CLASSPATH:s/uno/no/)
683.ENDIF
684.IF "$(PRJNAME)"=="tkt"
685CLASSPATH!:=$(CLASSPATH:s/tkt/no/)
686.ENDIF
687
688# default output directory when processing
689# configuration files
690PROCESSOUT*:=$(MISC)
691
692# Makros fuer die Librarynamen des Solar
693.INCLUDE : libs.mk
694
695.IF "$(GUI)"=="WNT" || "$(GUI)"=="OS2"
696VERSIONOBJ=$(SLO)/_version.obj
697.ENDIF
698
699.IF "$(GUI)"=="UNX"
700VERSIONOBJ=$(SLO)/_version.o
701.ENDIF
702
703.IF "$(GUI)"=="WNT" || "$(GUI)"=="OS2"
704WINVERSIONNAMES=$(UNIXVERSIONNAMES)
705.ENDIF			# "$(GUI)"=="WNT"
706
707.IF "$(GUI)"=="WNT" || "$(GUI)"=="OS2"
708.IF "$(COM)"=="GCC"
709SHELLLIB=-lgdi32 -lshell32 -ladvapi32 -lcomdlg32
710.ELSE
711SHELLLIB=gdi32.lib shell32.lib advapi32.lib comdlg32.lib
712.ENDIF
713.ENDIF
714
715# BIN-Pfad
716.IF "$(UNR)"!=""
717BIN=$(OUT)/ubin
718.ELSE
719BIN=$(OUT)/bin
720.ENDIF
721# pointing to misc in common output tree if exists
722COMMONBIN=$(LOCAL_COMMON_OUT)/bin
723
724# Include-Pfad
725# still without -I here s.a. target.mk INCLUDE
726INC=$(PRJ)/inc
727INCPCH=$(PRJ)/inc/pch
728INCLOCAL=../inc
729INCGUI=$(PRJ)/$(GUIBASE)/inc
730INCCOM=$(OUT)/inc
731INCCOMX=$(OUT)/inc
732INCUNOIDL=$(INCCOM)/$(PRJNAME)
733INCDEPN=. $(INCGUI) $(INCLOCAL) $(INC) $(INC)/$(PRJNAME)
734.IF "$(PRJINC)"!=""
735INCLOCPRJ=$(foreach,i,$(PRJINC) $i/inc)
736INCDEPN+=$(INCLOCPRJ)
737.ENDIF
738.IF "$(INCPRE)"!=""
739INCDEPN+=$(INCPRE)
740.ENDIF
741
742# Resource-Pfad fuer .SRS
743
744.IF "$(common_build_srs)"!=""
745SRS=$(subst,$(OUTPATH),$(COMMON_OUTDIR) $(OUT))/srs
746SRSX=$(subst,$(OUTPATH),$(COMMON_OUTDIR) $(OUT))/srs
747.ELSE          # "$(common_build_srs)"!=""
748SRS=$(OUT)/srs
749SRSX=$(OUT)/srs
750.ENDIF          # "$(common_build_srs)"!=""
751
752# Resource-Pfad fuer .RC und .RES
753RES=$(OUT)/res
754
755# das normale MISC wird nicht an LDMISC angepasst, stattdessen MISCX
756
757.IF "$(make_xl)"!=""
758BIN=$(PRJ)/$(OUTPATH).xl/bin
759.ENDIF
760
761# damit gezielt Abhaengigkeiten auf s: angegeben werden koennen
762
763.IF "$(common_build)"!=""
764SOLARIDLDIR=$(SOLARVERSION)/common$(PROEXT)/idl$(UPDMINOREXT)
765.ELSE
766SOLARIDLDIR=$(SOLARVERSION)/$(INPATH)/idl$(UPDMINOREXT)
767.ENDIF
768
769#.IF "$(UPDMINOR)" != ""
770#UPDMINOREXT=.$(UPDMINOR)
771#.ELSE
772#UPDMINOREXT=
773#.ENDIF
774SOLARRESDIR=$(SOLARVERSION)/$(INPATH)/res$(UPDMINOREXT)
775SOLARRESXDIR=$(SOLARVERSION)/$(INPATH)/res$(UPDMINOREXT)
776SOLARLIBDIR=$(SOLARVERSION)/$(INPATH)/lib$(UPDMINOREXT)
777SOLARJAVADIR=$(SOLARVERSION)/$(INPATH)/java$(UPDMINOREXT)
778SOLARINCDIR=$(SOLARVERSION)/$(INPATH)/inc$(UPDMINOREXT)
779SOLARINCXDIR=$(SOLARVERSION)/$(INPATH)/inc$(UPDMINOREXT)
780.IF "$(SOLARLANG)"!="deut"
781.IF "$(SOLARLANG)" != ""
782SOLARINCXDIR=$(SOLARVERSION)/$(INPATH)/inc$(UPDMINOREXT)/$(SOLARLANG)
783SOLARRESXDIR=$(SOLARVERSION)/$(INPATH)/res$(UPDMINOREXT)/$(SOLARLANG)
784.ENDIF
785.ENDIF
786SOLARBINDIR:=$(SOLARVERSION)/$(INPATH)/bin$(UPDMINOREXT)
787SOLARUCRDIR=$(SOLARVERSION)/$(INPATH)/ucr$(UPDMINOREXT)
788SOLARPARDIR=$(SOLARVERSION)/$(INPATH)/par$(UPDMINOREXT)
789SOLARXMLDIR=$(SOLARVERSION)/$(INPATH)/xml$(UPDMINOREXT)
790SOLARDOCDIR=$(SOLARVERSION)/$(INPATH)/doc$(UPDMINOREXT)
791SOLARPCKDIR=$(SOLARVERSION)/$(INPATH)/pck$(UPDMINOREXT)
792SOLARSDFDIR=$(SOLARVERSION)/$(INPATH)/sdf$(UPDMINOREXT)
793SOLARCOMMONBINDIR=$(SOLARVERSION)/common$(PROEXT)/bin$(UPDMINOREXT)
794SOLARCOMMONRESDIR=$(SOLARVERSION)/common$(PROEXT)/res$(UPDMINOREXT)
795SOLARCOMMONPCKDIR=$(SOLARVERSION)/common$(PROEXT)/pck$(UPDMINOREXT)
796SOLARCOMMONSDFDIR=$(SOLARVERSION)/common$(PROEXT)/sdf$(UPDMINOREXT)
797.IF "$(common_build)"==""
798SOLARCOMMONBINDIR=$(SOLARBINDIR)
799SOLARCOMMONRESDIR=$(SOLARRESDIR)
800SOLARCOMMONPCKDIR=$(SOLARPCKDIR)
801SOLARCOMMONSDFDIR=$(SOLARSDFDIR)
802.ENDIF
803
804.EXPORT : SOLARBINDIR
805
806L10N_MODULE*=$(SOURCE_ROOT_DIR)/extras/l10n
807ALT_L10N_MODULE*=$(SOLARSRC)$/l10n_so
808
809.IF "$(WITH_LANG)"!=""
810.INCLUDE .IGNORE: $(L10N_MODULE)/$(COMMON_OUTDIR)$(PROEXT)/inc/localization_present.mk
811.INCLUDE .IGNORE: $(ALT_L10N_MODULE)/$(COMMON_OUTDIR)$(PROEXT)/inc/localization_present.mk
812
813# check for localizations not hosted in l10n module. if a file exists there
814# it won't in l10n
815.IF "$(ALT_LOCALIZATION_FOUND)"!=""
816TRYALTSDF:=$(ALT_L10N_MODULE)$/$(COMMON_OUTDIR)$(PROEXT)$/misc/sdf$/$(PRJNAME)$/$(PATH_IN_MODULE)$/localize.sdf
817LOCALIZESDF:=$(strip $(shell @+$(IFEXIST) $(TRYALTSDF) $(THEN) echo $(TRYALTSDF) $(FI)))
818.ENDIF			# "$(ALT_LOCALIZATION_FOUND)"!=""
819# if the l10n module exists, use split localize.sdf directly from there
820.IF "$(LOCALIZATION_FOUND)"!="" && "$(LOCALIZESDF)"==""
821# still check for existence as there may be no localization yet
822TRYSDF:=$(L10N_MODULE)$/$(COMMON_OUTDIR)$(PROEXT)$/misc/sdf$/$(PRJNAME)$/$(PATH_IN_MODULE)$/localize.sdf
823LOCALIZESDF:=$(strip $(shell @+$(IFEXIST) $(TRYSDF) $(THEN) echo $(TRYSDF) $(FI)))
824.ENDIF			# "$(LOCALIZATION_FOUND)"!="" && "$(LOCALIZESDF)"==""
825# else use localize.sdf from local output tree if localization .zip exists
826.IF  "$(LOCALIZESDF)"==""
827LOCALSDFFILE:=$(COMMONMISC)$/$(PRJNAME)$/$(PATH_IN_MODULE)$/localize.sdf
828LOCALIZESDF:=$(strip $(shell @+$(IFEXIST) $(SOLARCOMMONSDFDIR)$/$(PRJNAME).zip $(THEN) echo $(LOCALSDFFILE) $(FI)))
829.IF  "$(LOCALIZESDF)"==""
830LOCALSDFFILE!:=
831.ENDIF			# "$(LOCALIZESDF)"==""
832.ENDIF			# "$(LOCALIZESDF)"==""
833# dummy target to keep the build happy.
834.IF  "$(LOCALIZESDF)"==""
835LOCALIZESDF:=$(COMMONMISC)$/$(PRJNAME)$/dummy$/localize.sdf
836.ENDIF			# "$(LOCALIZESDF)"==""
837.ENDIF			# "$(WITH_LANG)"!=""
838
839JARDIR=$(OUT)/class
840
841# needs to be expanded!!!
842
843# extend library path for MS Compiler
844.IF "$(COM)"=="MSC"
845LIB:=$(LB);$(SLB);$(ILIB)
846.ENDIF
847
848# extend library path for MinGW Compiler
849.IF "$(GUI)$(COM)"=="WNTGCC"
850LIB:=$(LB);$(BIN);$(ILIB)
851.ENDIF
852
853# --- Environment-Allgemein ----------------------------------------
854
855.IF "$(CPUNAME)" == ""
856CPUNAME=CPUNAME_HAS_TO_BE_SET_IN_ENVIRONMENT
857.ENDIF
858
859.IF "$(USE_STLP_DEBUG)" != ""
860SCPCDEFS+=-D_STLP_DEBUG
861.ENDIF
862
863.IF "$(UDK_MAJOR)"!=""
864SCPDEFS+=-DUDK_MAJOR=$(UDK_MAJOR)
865.ENDIF			# "$(UDK_MAJOR)"!=""
866
867SCPDEFS+=-U$(COMID) -DCOMID=$(COMID) -DCOMNAME=$(COMNAME) -D_$(COMID)
868SCPDEFS+=-DCCNUMVER=$(CCNUMVER)
869# extend library path for OS/2 gcc/wlink
870.IF "$(GUI)"=="OS2"
871LIB:=$(LB);$(SLB);$(ILIB)
872.ENDIF
873
874
875UNOIDLDEFS+=-DSUPD=$(UPD) -DUPD=$(UPD)
876
877UNOIDLDEPFLAGS=-Mdepend=$(SOLARVER)
878
879UNOIDLINC+=-I. -I.. -I$(PRJ) -I$(PRJ)/inc -I$(PRJ)/$(INPATH)/idl -I$(OUT)/inc -I$(SOLARIDLDIR) -I$(SOLARINCDIR)
880
881CDEFS= -D$(OS) -D$(GUI) -D$(GVER) -D$(COM) -D$(CVER) -D$(ALIGN) -D$(CPUNAME) -DCPPU_ENV=$(COMNAME)
882
883.IF "$(USE_STLP_DEBUG)" != "" && "$(GUI)"!="OS2"
884CDEFS+=-D_STLP_DEBUG
885.ENDIF
886
887.IF "$(CDEFS_PRESET)" != ""
888CDEFS+=$(CDEFS_PRESET)
889.ENDIF
890
891.IF "$(TIMELOG)" != ""
892CDEFS+=-DTIMELOG
893.ENDIF
894
895# Required for correct Windows function call ABI for expat static library
896.IF "$(SYSTEM_EXPAT)"=="NO"
897CDEFS+=-DXML_STATIC
898.ENDIF
899
900CDEFSCXX=
901CDEFSOBJ=
902CDEFSSLO=-DSHAREDLIB -D_DLL_
903CDEFSGUI=-DGUI
904CDEFSCUI=-DCUI
905#CDEFSMT=-DMULTITHREAD
906CDEFSPROF=-DPROFILE
907.IF "$(dbg_build_only)" == ""
908CDEFSDEBUG=-DDEBUG
909.ENDIF
910CDEFSDBGUTIL=-DDBG_UTIL
911CDEFSOPT=-DOPTIMIZE
912
913MKDEPFLAGS+=-I$(INCDEPN:s/ / -I/:s/-I-I/-I/)
914MKDEPALLINC=$(SOLARINC:s/-I/ -I/)
915MKDEPPREINC=-I$(PREPATH)/$(INPATH)/inc$(UPDMINOREXT)
916MKDEPSOLENV=-I$(SOLARENV)/inc -I$(SOLARENV)/$(GUI)$(CVER)$(COMEX)/inc
917MKDEPSOLVER=-I$(SOLARVERSION)/$(INPATH)/inc$(UPDMINOREXT) -I$(SOLARVERSION)/$(INPATH)/inc
918MKDEPLOCAL=-I$(INCCOM)
919
920.IF "$(MKDEPENDALL)"!=""
921MKDEPFLAGS+=$(MKDEPALLINC)
922.ENDIF
923
924.IF "$(MKDEPENDSOLENV)"!=""
925MKDEPFLAGS+=$(MKDEPSOLENV)
926.ENDIF
927
928.IF "$(MKDEPENDPREPATH)"!=""
929MKDEPFLAGS+=$(MKDEPPREINC)
930.ENDIF
931
932.IF "$(MKDEPENDSOLVER)"!=""
933MKDEPFLAGS+=$(MKDEPSOLVER)
934.ENDIF
935# unused - nodep should do the same now
936#.IF "$(MKDEPENDLOCAL)"!="NO"
937MKDEPFLAGS+=$(MKDEPLOCAL)
938#.ENDIF
939
940BISON*=bison
941YACCFLAGS*=-d
942
943SVIDL=$(AUGMENT_LIBRARY_PATH) $(SOLARBINDIR)/svidl
944
945LDUMP2*=$(SOLARBINDIR)/ldump4
946
947ZIPUPDATE=-u -j
948ZIPFLAGS=$(ZIPUPDATE)
949#hack for dynamic language subdirs
950LANGDIR=LANGDIR
951
952#scplinker flags
953SCPLINKFLAGS=-i $(PAR),$(SOLARPARDIR)
954.IF "$(SCPLINKVERSION)"!=""
955SCPLINKFLAGS+=-v $(SCPLINKVERSION)
956.ENDIF			# "$(SCPLINKVERSION)"!=""
957
958.IF "$(make_srs_deps)"!=""
959RSC=$(AUGMENT_LIBRARY_PATH) $(SOLARBINDIR)/rscdep
960.ELSE # "$(make_srs_deps)"!=""
961RSC=$(AUGMENT_LIBRARY_PATH) $(FLIPCMD) $(SOLARBINDIR)/rsc
962.ENDIF # "$(make_srs_deps)"!=""
963
964.IF "$(VERBOSE)" == "TRUE"
965    VERBOSITY=-verbose
966.ELSE
967    COMMAND_ECHO=@
968    .IF "$(VERBOSE)" == "FALSE"
969        VERBOSITY=-quiet
970        ZIP_VERBOSITY=-q
971    .ENDIF
972.ENDIF # "$(VERBOSE)" == "TRUE"
973COMPILE_ECHO_SWITCH=
974COMPILE_ECHO_FILE=$(<:f)
975
976#new
977RSCUPDVER=$(RSCREVISION)
978RSCUPDVERDEF=-DUPDVER="$(RSCUPDVER)"
979
980RSCFLAGS=-s
981RSCDEFS=-D$(GUI) -D$(GVER) -D$(COM) -D$(CVER) $(JAVADEF)
982
983.IF "$(BUILD_SPECIAL)"!=""
984RSCDEFS+=-DBUILD_SPECIAL=$(BUILD_SPECIAL)
985.ENDIF
986
987RSCDEFIMG*=default_images
988
989RSCEXTINC=.
990
991.IF "$(DEBUG)" != ""
992RSCDEFS+= -DDEBUG
993.ENDIF
994
995# settings for mozilla idl compiler
996XPIDL=xpidl
997XPIDL_LINK=xpt_link
998
999# alle bisher verwendeten Linker benutzen + um LIBs auf der naechsten Zeile
1000# weiter zu schreiben, wenn es da eine Ausnahme geben sollte, muss
1001# LINKEXTENDLINE compilerabhaengig definiert werden
1002LINKEXTENDLINE=+
1003
1004LNT=$(DEVROOT)/lint/lint
1005#LNTFLAGS=+v -i$(DEVROOT)/lint\ -mL options.lnt -u
1006LNTFLAGS=+v -i$(DEVROOT)/lint/ -mL options.lnt -u
1007LNTFLAGSOUTOBJ=-os
1008
1009.IF "$(GUI)"=="WNT"
1010.INCLUDE : wnt.mk
1011.ENDIF
1012
1013.IF "$(GUI)" == "UNX"
1014.INCLUDE : unx.mk
1015.ENDIF
1016
1017.IF "$(GUI)" == "OS2"
1018.INCLUDE : os2.mk
1019.ENDIF
1020
1021.IF "$(OOO_LIBRARY_PATH_VAR)" != ""
1022# Add SOLARLIBDIR at the begin of a (potentially previously undefined) library
1023# path (LD_LIBRARY_PATH, PATH, etc.; prepending avoids fetching libraries from
1024# an existing office/URE installation; the ": &&" enables this to work at the
1025# start of a recipe line that is not prefixed by "+" as well as in the middle of
1026# an existing && chain:
1027AUGMENT_LIBRARY_PATH = : && \
1028    $(OOO_LIBRARY_PATH_VAR)=$(normpath, $(SOLARSHAREDBIN))$${{$(OOO_LIBRARY_PATH_VAR):+:$${{$(OOO_LIBRARY_PATH_VAR)}}}}
1029AUGMENT_LIBRARY_PATH_LOCAL = : && \
1030    $(OOO_LIBRARY_PATH_VAR)=$(normpath, $(PWD)/$(DLLDEST)):$(normpath, $(SOLARSHAREDBIN))$${{$(OOO_LIBRARY_PATH_VAR):+:$${{$(OOO_LIBRARY_PATH_VAR)}}}}
1031.END
1032
1033# remove if .Net 2003 support has expired
1034.IF "$(debug)"!=""
1035.IF "$(OS)$(COM)$(CPU)" == "WNTMSCI"
1036.IF "$(COMEX)" == "10"
1037.IF "$(SLOFILES)$(OBJFILES)$(DEPOBJFILES)"!=""
1038MAXPROCESS!:=1
1039.EXPORT : MAXPROCESS
1040.ENDIF			# "$(SLOFILES)$(OBJFILES)$(DEPOBJFILES)"!=""
1041.ENDIF			# "$(COMEX)" == "10"
1042.ENDIF			# "$(OS)$(COM)$(CPU)" == "WNTMSCI"
1043.ENDIF			# "$(debug)"!=""
1044
1045# for multiprocess building in external modules
1046# allow separate handling
1047EXTMAXPROCESS*=$(MAXPROCESS)
1048
1049IDLC*=$(AUGMENT_LIBRARY_PATH) $(SOLARBINDIR)/idlc
1050REGMERGE*=$(AUGMENT_LIBRARY_PATH) $(SOLARBINDIR)/regmerge
1051REGCOMPARE*=$(AUGMENT_LIBRARY_PATH) $(SOLARBINDIR)/regcompare
1052REGCOMP*=$(AUGMENT_LIBRARY_PATH) $(SOLARBINDIR)/regcomp
1053CPPUMAKER*=$(AUGMENT_LIBRARY_PATH) $(SOLARBINDIR)/cppumaker
1054JAVAMAKER*=$(AUGMENT_LIBRARY_PATH) $(SOLARBINDIR)/javamaker
1055RDBMAKER*=$(AUGMENT_LIBRARY_PATH) $(SOLARBINDIR)/rdbmaker
1056CLIMAKER*=$(AUGMENT_LIBRARY_PATH) $(SOLARBINDIR)/climaker
1057
1058HELPEX=$(AUGMENT_LIBRARY_PATH) $(SOLARBINDIR)/helpex
1059LNGCONVEX=$(AUGMENT_LIBRARY_PATH) $(SOLARBINDIR)/lngconvex
1060HELPLINKER=$(AUGMENT_LIBRARY_PATH) $(SOLARBINDIR)/HelpLinker
1061
1062.IF "$(JAVAINTERPRETER)" == ""
1063JAVA*:=java
1064.ELSE
1065JAVA*:=$(JAVAINTERPRETER)
1066.ENDIF
1067.EXPORT : JAVA JAVAI
1068
1069# Define SCPCOMP without wrapper because pre2par.pl chokes on DOS style
1070# paths. (See iz57443)
1071SCPCOMP=$(PERL) $(SOLARENV)/bin/pre2par.pl
1072SCPLINK=$(PERL) $(SOLARENV)/bin/par2script.pl
1073LZIP*=lzip
1074CPPLCC*=$(AUGMENT_LIBRARY_PATH) $(SOLARBINDIR)/cpplcc
1075
1076.IF "$(SOLAR_JAVA)"=="TRUE"
1077.IF "$(USE_JAVAVER)"!=""
1078.INCLUDE : tg_javav.mk
1079.ENDIF "$(USE_JAVAVER)"!=""
1080.ENDIF			# "$(SOLAR_JAVA)"=="TRUE"
1081
1082# --- extend new environment ----------------------------------
1083CDEFS+= -DSUPD=$(UPD)
1084
1085# flags to enable build with symbols; required for crashdump feature
1086.IF ("$(ENABLE_CRASHDUMP)"!="" && "$(ENABLE_CRASHDUMP)"!="DUMMY") || "$(ENABLE_SYMBOLS)"!=""
1087CFLAGSENABLESYMBOLS_CC_ONLY*=$(CFLAGSENABLESYMBOLS)
1088CFLAGSCXX+=$(CFLAGSENABLESYMBOLS)
1089CFLAGSCC+=$(CFLAGSENABLESYMBOLS_CC_ONLY)
1090.ENDIF          # ("$(ENABLE_CRASHDUMP)"!="" && "$(ENABLE_CRASHDUMP)"!="DUMMY") || "$(ENABLE_SYMBOLS)"!=""
1091
1092.IF "$(profile)"!=""
1093CDEFS+= $(CDEFSPROF)
1094CFLAGS+= $(CFLAGSPROF)
1095.IF "$(WST)"!=""
1096LINKFLAGS=$(LINKFLAGSWST)
1097LINKCFLAGS=$(LINKFLAGSWST)
1098.ELSE
1099LINKFLAGSADD+=$(LINKFLAGSPROF)
1100.ENDIF
1101.ENDIF
1102
1103.IF "$(debug)"!=""
1104JAVAFLAGS+=$(JAVAFLAGSDEBUG)
1105CDEFS+= $(CDEFSDEBUG)
1106CFLAGS+= $(CFLAGSDEBUG)
1107LINKFLAGSADD+= $(LINKFLAGSDEBUG)
1108.ENDIF
1109
1110.IF "$(dbgutil)"!=""
1111CDEFS+=$(CDEFSDBGUTIL)
1112CFLAGS+=$(CFLAGSDBGUTIL)
1113RSCDEFS+=-DDBG_UTIL
1114.ENDIF
1115
1116.IF "$(product)"!=""
1117CDEFS+= -DPRODUCT -DNDEBUG
1118RSCDEFS+= -DPRODUCT
1119RSCDEFS+= -DNDEBUG
1120.ENDIF
1121
1122.IF "$(DBG_LEVEL)"!=""
1123CDEFS+=-DOSL_DEBUG_LEVEL=$(DBG_LEVEL)
1124RSCDEFS+=-DOSL_DEBUG_LEVEL=$(DBG_LEVEL)
1125.ENDIF
1126
1127.IF "$(optimize)"!=""
1128CDEFS+=$(CDEFSOPT)
1129CFLAGS+=$(CFLAGSOPT)
1130LINKFLAGSADD+=$(LINKFLAGSOPT)
1131.ELSE
1132CFLAGS+=$(CFLAGSNOOPT)
1133.ENDIF
1134
1135.IF "$(ENABLE_EXCEPTIONS)"!=""
1136GLOBAL_EXCEPTIONS_FLAGS+=$(CFLAGSEXCEPTIONS)
1137GLOBAL_EXCEPTIONS_FLAGS+=-DEXCEPTIONS_ON
1138.ELSE
1139GLOBAL_EXCEPTIONS_FLAGS+=$(CFLAGS_NO_EXCEPTIONS)
1140GLOBAL_EXCEPTIONS_FLAGS+=-DEXCEPTIONS_OFF
1141.ENDIF
1142# used if an object appears in the EXCEPTIONSFILES list
1143# see also rules.mk
1144LOCAL_EXCEPTIONS_FLAGS+=$(CFLAGSEXCEPTIONS)
1145LOCAL_EXCEPTIONS_FLAGS+=-DEXCEPTIONS_ON
1146
1147.IF "$(ENABLE_LAYOUT)" == "TRUE"
1148CDEFS+=-DENABLE_LAYOUT=1
1149.ELSE # ENABLE_LAYOUT != TRUE
1150CFLAGS+=-DENABLE_LAYOUT=0
1151.ENDIF # ENABLE_LAYOUT != TRUE
1152
1153.IF "$(ENABLE_LAYOUT_EXPERIMENTAL)" == "TRUE"
1154CDEFS+=-DENABLE_LAYOUT_EXPERIMENTAL=1
1155.ELSE # ENABLE_LAYOUT_EXPERIMENTAL != TRUE
1156CFLAGS+=-DENABLE_LAYOUT_EXPERIMENTAL=0
1157.ENDIF # ENABLE_LAYOUT_EXPERIMENTAL != TRUE
1158
1159# compose flags and defines for GUI
1160.IF "$(TARGETTYPE)"=="GUI"
1161CDEFS+= $(CDEFSGUI)
1162CFLAGSSLO+=$(CFLAGSSLOGUIMT)
1163CDEFSSLO+=$(CDEFSSLOMT)
1164LINKFLAGSAPP=$(LINKFLAGSAPPGUI)
1165LINKFLAGSSHL=$(LINKFLAGSSHLGUI)
1166STDOBJ=$(STDOBJGUI)
1167STDSLO=$(STDSLOGUI)
1168
1169CDEFSOBJ+= $(CDEFSMT) $(CDEFSOBJMT)
1170CFLAGSOBJ+=$(CFLAGSOBJGUIMT)
1171STDLIB=$(STDLIBGUIMT)
1172STDSHL=$(STDSHLGUIMT)
1173
1174.ENDIF
1175
1176# compose flags and defines for CUI
1177.IF "$(TARGETTYPE)" == "CUI" || "$(TARGETTYPE)"=="cui"
1178CDEFS+= $(CDEFSCUI)
1179CFLAGSSLO+=$(CFLAGSSLOCUIMT)
1180CDEFSSLO+=$(CDEFSSLOMT)
1181LINKFLAGSAPP=$(LINKFLAGSAPPCUI)
1182LINKFLAGSSHL=$(LINKFLAGSSHLCUI)
1183STDOBJ=$(STDOBJCUI)
1184STDSLO=$(STDSLOCUI)
1185
1186CDEFSOBJ+=$(CDEFSMT) $(CDEFSOBJMT)
1187CFLAGSOBJ+=$(CFLAGSOBJCUIMT)
1188STDLIB=$(STDLIBCUIMT)
1189STDSHL=$(STDSHLCUIMT)
1190
1191.ENDIF
1192
1193.EXPORT : PICSWITCH
1194
1195.IF "$(USE_SYSTEM_STL)"=="YES"
1196.IF "$(GUI)"=="OS2"
1197LIBSTLPORT=
1198.ELSE
1199LIBSTLPORT=""
1200.ENDIF
1201.ENDIF
1202
1203.IF "$(NO_DEFAULT_STL)"==""
1204STDLIB+=$(LIBSTLPORT)
1205STDSHL+=$(LIBSTLPORT)
1206.ENDIF			# "$(NO_DEFAULT_STL)"==""
1207
1208# fill up unresolved symbols not found else where
1209.IF "$(FILLUPARC)"!=""
1210STDLIB+=$(FILLUPARC)
1211STDSHL+=$(FILLUPARC)
1212.ENDIF			# "$(FILUPARC)"!=""
1213
1214.IF "$(SOLAR_JAVA)"!=""
1215CDEFS+=$(JAVADEF)
1216.ENDIF          # "$(SOLAR_JAVA)"!=""
1217
1218.INCLUDE .IGNORE: $(UPD)$(LAST_MINOR).mk
1219
1220# Once all modules on a given platform compile without warnings, the specific
1221# .mk file for that platform should set COMPILER_WARN_ERRORS=TRUE and no longer
1222# set MODULES_WITH_WARNINGS, and once no platform sets MODULES_WITH_WARNINGS any
1223# longer, this code can go away:
1224.IF "$(MODULES_WITH_WARNINGS)" != ""
1225MODULES_WITH_WARNINGS_1 := $(foreach,i,$(MODULES_WITH_WARNINGS) .$(i).)
1226MODULES_WITH_WARNINGS_2 := $(subst,.$(PRJNAME)., $(MODULES_WITH_WARNINGS_1))
1227.IF "$(MODULES_WITH_WARNINGS_1)" == "$(MODULES_WITH_WARNINGS_2)"
1228COMPILER_WARN_ERRORS = TRUE
1229.ENDIF
1230.ENDIF
1231
1232CFLAGSWARNCXX *= $(CFLAGSWARNCC)
1233CFLAGSWALLCXX *= $(CFLAGSWALLCC)
1234CFLAGSWERRCXX *= $(CFLAGSWERRCC)
1235
1236.IF "$(ENVWARNFLAGS)"==""
1237.IF "$(COMPILER_WARN_ALL)"==""
1238CFLAGSCC+=$(CFLAGSWARNCC)
1239CFLAGSCXX+=$(CFLAGSWARNCXX)
1240.ELSE
1241CFLAGSCC+=$(CFLAGSWALLCC)
1242CFLAGSCXX+=$(CFLAGSWALLCXX)
1243.ENDIF
1244.IF "$(COMPILER_WARN_ERRORS)"!="" && "$(EXTERNAL_WARNINGS_NOT_ERRORS)"==""
1245CFLAGSCC+=$(CFLAGSWERRCC)
1246CFLAGSCXX+=$(CFLAGSWERRCXX)
1247.ENDIF
1248.ELSE			# "$(ENVWARNFLAGS)"==""
1249CFLAGSAPPEND+=$(ENVWARNFLAGS)
1250.ENDIF			# "$(ENVWARNFLAGS)"==""
1251
1252CDEFS+= $(ADDCDEFS)
1253CDEFS+= $(ENVCDEFS)
1254CFLAGS+= $(CFLAGSCALL) $(ENVCFLAGS)
1255CFLAGSCXX+= $(ENVCFLAGSCXX)
1256# andersrum wg. -TPxxxx
1257CFLAGSINCXX+:=$(ENVCFLAGSINCXX)
1258LIBFLAGS+= $(ENVLIBFLAGS)
1259LINKFLAGSADD+= $(ENVLINKFLAGS)
1260RSCFLAGS+= $(ENVRSCFLAGS)
1261RSCDEFS+= $(ENVRSCDEFS)
1262# RSCLINKFLAGS+= $(ENVRSCLINKFLAGS)
1263RCFLAGS+= $(ENVRCFLAGS)
1264RCLINKFLAGS+= $(ENVRCLINKFLAGS)
1265
1266LINKFLAGSRUNPATH_URELIB*=
1267LINKFLAGSRUNPATH_UREBIN*=
1268LINKFLAGSRUNPATH_OOO*=
1269LINKFLAGSRUNPATH_SDK*=
1270LINKFLAGSRUNPATH_BRAND*=
1271LINKFLAGSRUNPATH_OXT*=
1272LINKFLAGSRUNPATH_BOXT*=
1273LINKFLAGSRUNPATH_NONE*=
1274
1275# make sure both linker variables are set
1276LINKC*=$(LINK)
1277LINKCFLAGS*=$(LINKFLAGS)
1278LINKFLAGS+=$(LINKFLAGSADD)
1279LINKCFLAGS+=$(LINKFLAGSADD)
1280
1281#defaults for UCR HEADER
1282UNOUCRBASE*=UCR
1283UNOUCROUT*=$(OUT)/inc/$(TARGET)
1284INCPRE+=-I$(UNOUCROUT)
1285UNOUCRRDB*=$(SOLARBINDIR)/types.rdb
1286
1287# location of trustedinfo.manifest for Windows Vista
1288.IF "$(COM)"=="MSC"
1289TRUSTED_MANIFEST_LOCATION*=$(SOLARENV)/inc
1290.ENDIF # "$(COM)"=="MSC"
1291
1292# --- Compiler -----------------------------------------------------
1293.INCLUDE : rules.mk
1294
1295# --- include typelists --------------------------------------------
1296
1297.IF "$(COMP1TYPELIST)"!=""
1298.INCLUDE .IGNORE : $(MISC)/$(COMP1TYPELIST).mk
1299$(COMP1TYPELIST)_XML2CMPTYPES:=$(shell @$(AUGMENT_LIBRARY_PATH) $(SOLARBINDIR)/xml2cmp -types stdout $(MISC)/$(COMP1TYPELIST)$($(WINVERSIONNAMES)_MAJOR).xml)
1300.ENDIF
1301
1302.IF "$(COMP2TYPELIST)"!=""
1303.INCLUDE .IGNORE : $(MISC)/$(COMP2TYPELIST).mk
1304$(COMP2TYPELIST)_XML2CMPTYPES:=$(shell @$(AUGMENT_LIBRARY_PATH) $(SOLARBINDIR)/xml2cmp -types stdout $(MISC)/$(COMP2TYPELIST)$($(WINVERSIONNAMES)_MAJOR).xml)
1305.ENDIF
1306
1307.IF "$(COMP3TYPELIST)"!=""
1308.INCLUDE .IGNORE : $(MISC)/$(COMP3TYPELIST).mk
1309$(COMP3TYPELIST)_XML2CMPTYPES:=$(shell @$(AUGMENT_LIBRARY_PATH) $(SOLARBINDIR)/xml2cmp -types stdout $(MISC)/$(COMP3TYPELIST)$($(WINVERSIONNAMES)_MAJOR).xml)
1310.ENDIF
1311
1312.IF "$(COMP4TYPELIST)"!=""
1313.INCLUDE .IGNORE : $(MISC)/$(COMP4TYPELIST).mk
1314$(COMP4TYPELIST)_XML2CMPTYPES:=$(shell @$(AUGMENT_LIBRARY_PATH) $(SOLARBINDIR)/xml2cmp -types stdout $(MISC)/$(COMP4TYPELIST)$($(WINVERSIONNAMES)_MAJOR).xml)
1315.ENDIF
1316
1317.IF "$(COMP5TYPELIST)"!=""
1318.INCLUDE .IGNORE : $(MISC)/$(COMP5TYPELIST).mk
1319$(COMP5TYPELIST)_XML2CMPTYPES:=$(shell @$(AUGMENT_LIBRARY_PATH) $(SOLARBINDIR)/xml2cmp -types stdout $(MISC)/$(COMP5TYPELIST)$($(WINVERSIONNAMES)_MAJOR).xml)
1320.ENDIF
1321
1322.IF "$(COMP6TYPELIST)"!=""
1323.INCLUDE .IGNORE : $(MISC)/$(COMP6TYPELIST).mk
1324$(COMP6TYPELIST)_XML2CMPTYPES:=$(shell @$(AUGMENT_LIBRARY_PATH) $(SOLARBINDIR)/xml2cmp -types stdout $(MISC)/$(COMP6TYPELIST)$($(WINVERSIONNAMES)_MAJOR).xml)
1325.ENDIF
1326
1327.IF "$(COMP7TYPELIST)"!=""
1328.INCLUDE .IGNORE : $(MISC)/$(COMP7TYPELIST).mk
1329$(COMP7TYPELIST)_XML2CMPTYPES:=$(shell @$(AUGMENT_LIBRARY_PATH) $(SOLARBINDIR)/xml2cmp -types stdout $(MISC)/$(COMP7TYPELIST)$($(WINVERSIONNAMES)_MAJOR).xml)
1330.ENDIF
1331
1332.IF "$(COMP8TYPELIST)"!=""
1333.INCLUDE .IGNORE : $(MISC)/$(COMP8TYPELIST).mk
1334$(COMP8TYPELIST)_XML2CMPTYPES:=$(shell @$(AUGMENT_LIBRARY_PATH) $(SOLARBINDIR)/xml2cmp -types stdout $(MISC)/$(COMP8TYPELIST)$($(WINVERSIONNAMES)_MAJOR).xml)
1335.ENDIF
1336
1337.IF "$(COMP9TYPELIST)"!=""
1338.INCLUDE .IGNORE : $(MISC)/$(COMP9TYPELIST).mk
1339$(COMP9TYPELIST)_XML2CMPTYPES:=$(shell @$(AUGMENT_LIBRARY_PATH) $(SOLARBINDIR)/xml2cmp -types stdout $(MISC)/$(COMP9TYPELIST)$($(WINVERSIONNAMES)_MAJOR).xml)
1340.ENDIF
1341
1342# some place to define these jars for SO environment
1343XML_APIS_JAR*=$(SOLARBINDIR)/xml-apis.jar
1344XERCES_JAR*=$(SOLARBINDIR)/xercesImpl.jar
1345
1346COMPONENTPREFIX_URE_NATIVE = vnd.sun.star.expand:$$URE_INTERNAL_LIB_DIR/
1347COMPONENTPREFIX_URE_JAVA = vnd.sun.star.expand:$$URE_INTERNAL_JAVA_DIR/
1348#.IF "$(OS)" == "WNT" || "$(OS)" == "OS2"
1349#COMPONENTPREFIX_BASIS_NATIVE = vnd.sun.star.expand:$$OOO_BASE_DIR/program/
1350#.ELSE
1351COMPONENTPREFIX_BASIS_NATIVE = vnd.sun.star.expand:$$OOO_BASE_DIR/program/
1352#.END
1353COMPONENTPREFIX_BASIS_JAVA = vnd.sun.star.expand:$$OOO_BASE_DIR/program/classes/
1354COMPONENTPREFIX_BASIS_PYTHON = vnd.openoffice.pymodule:
1355COMPONENTPREFIX_INBUILD_NATIVE = \
1356    vnd.sun.star.expand:$$OOO_INBUILD_SHAREDLIB_DIR/
1357COMPONENTPREFIX_INBUILD_JAVA = vnd.sun.star.expand:$$OOO_INBUILD_JAR_DIR/
1358COMPONENTPREFIX_EXTENSION = ./
1359
1360# workaround for strange dmake bug:
1361# if the previous block was a rule or a target, "\#" isn't recognized
1362# as an escaped "#". if it was an assignment, escaping works...
1363some_unique_variable_name:=1
1364