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