xref: /aoo41x/main/solenv/inc/settings.mk (revision 4c01c3a0)
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.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 infered
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.IF "$(COM)"=="GCC"
870SCPDEFS+=-DSHORTSTDCPP3=$(SHORTSTDCPP3) -DSHORTSTDC3=$(SHORTSTDC3)
871.ENDIF			# "$(SHORTSTDCPP3)"!=""
872# extend library path for OS/2 gcc/wlink
873.IF "$(GUI)"=="OS2"
874LIB:=$(LB);$(SLB);$(ILIB)
875.ENDIF
876
877
878UNOIDLDEFS+=-DSUPD=$(UPD) -DUPD=$(UPD)
879
880UNOIDLDEPFLAGS=-Mdepend=$(SOLARVER)
881
882UNOIDLINC+=-I. -I.. -I$(PRJ) -I$(PRJ)/inc -I$(PRJ)/$(INPATH)/idl -I$(OUT)/inc -I$(SOLARIDLDIR) -I$(SOLARINCDIR)
883
884CDEFS= -D$(OS) -D$(GUI) -D$(GVER) -D$(COM) -D$(CVER) -D$(CPUNAME)
885
886.IF "$(USE_STLP_DEBUG)" != "" && "$(GUI)"!="OS2"
887CDEFS+=-D_STLP_DEBUG
888.ENDIF
889
890.IF "$(CDEFS_PRESET)" != ""
891CDEFS+=$(CDEFS_PRESET)
892.ENDIF
893
894.IF "$(TIMELOG)" != ""
895CDEFS+=-DTIMELOG
896.ENDIF
897
898# Required for correct Windows function call ABI for expat static library
899.IF "$(SYSTEM_EXPAT)"=="NO"
900CDEFS+=-DXML_STATIC
901.ENDIF
902
903CDEFSCXX=
904CDEFSOBJ=
905CDEFSSLO=-DSHAREDLIB -D_DLL_
906CDEFSGUI=-DGUI
907CDEFSCUI=-DCUI
908#CDEFSMT=-DMULTITHREAD
909CDEFSPROF=-DPROFILE
910.IF "$(dbg_build_only)" == ""
911CDEFSDEBUG=-DDEBUG
912.ENDIF
913CDEFSDBGUTIL=-DDBG_UTIL
914CDEFSOPT=-DOPTIMIZE
915
916MKDEPFLAGS+=-I$(INCDEPN:s/ / -I/:s/-I-I/-I/)
917MKDEPALLINC=$(SOLARINC:s/-I/ -I/)
918MKDEPPREINC=-I$(PREPATH)/$(INPATH)/inc$(UPDMINOREXT)
919MKDEPSOLENV=-I$(SOLARENV)/inc -I$(SOLARENV)/$(GUI)$(CVER)$(COMEX)/inc
920MKDEPSOLVER=-I$(SOLARVERSION)/$(INPATH)/inc$(UPDMINOREXT) -I$(SOLARVERSION)/$(INPATH)/inc
921MKDEPLOCAL=-I$(INCCOM)
922
923.IF "$(MKDEPENDALL)"!=""
924MKDEPFLAGS+=$(MKDEPALLINC)
925.ENDIF
926
927.IF "$(MKDEPENDSOLENV)"!=""
928MKDEPFLAGS+=$(MKDEPSOLENV)
929.ENDIF
930
931.IF "$(MKDEPENDPREPATH)"!=""
932MKDEPFLAGS+=$(MKDEPPREINC)
933.ENDIF
934
935.IF "$(MKDEPENDSOLVER)"!=""
936MKDEPFLAGS+=$(MKDEPSOLVER)
937.ENDIF
938# unused - nodep should do the same now
939#.IF "$(MKDEPENDLOCAL)"!="NO"
940MKDEPFLAGS+=$(MKDEPLOCAL)
941#.ENDIF
942
943BISON*=bison
944YACCFLAGS*=-d
945
946SVIDL=$(AUGMENT_LIBRARY_PATH) $(SOLARBINDIR)/svidl
947
948LDUMP2*=$(SOLARBINDIR)/ldump4
949
950ZIPUPDATE=-u -j
951ZIPFLAGS=$(ZIPUPDATE)
952#hack for dynamic language subdirs
953LANGDIR=LANGDIR
954
955#scplinker flags
956SCPLINKFLAGS=-i $(PAR),$(SOLARPARDIR)
957.IF "$(SCPLINKVERSION)"!=""
958SCPLINKFLAGS+=-v $(SCPLINKVERSION)
959.ENDIF			# "$(SCPLINKVERSION)"!=""
960
961.IF "$(make_srs_deps)"!=""
962RSC=$(AUGMENT_LIBRARY_PATH) $(SOLARBINDIR)/rscdep
963.ELSE # "$(make_srs_deps)"!=""
964RSC=$(AUGMENT_LIBRARY_PATH) $(FLIPCMD) $(SOLARBINDIR)/rsc
965.ENDIF # "$(make_srs_deps)"!=""
966
967.IF "$(VERBOSE)" == "TRUE"
968    VERBOSITY=-verbose
969.ELSE
970    COMMAND_ECHO=@
971    .IF "$(VERBOSE)" == "FALSE"
972        VERBOSITY=-quiet
973        ZIP_VERBOSITY=-q
974    .ENDIF
975.ENDIF # "$(VERBOSE)" == "TRUE"
976COMPILE_ECHO_SWITCH=
977COMPILE_ECHO_FILE=$(<:f)
978
979#new
980RSCUPDVER=$(RSCREVISION)
981RSCUPDVERDEF=-DUPDVER="$(RSCUPDVER)"
982
983RSCFLAGS=-s
984RSCDEFS=-D$(GUI) -D$(GVER) -D$(COM) -D$(CVER) $(JAVADEF)
985
986.IF "$(BUILD_SPECIAL)"!=""
987RSCDEFS+=-DBUILD_SPECIAL=$(BUILD_SPECIAL)
988.ENDIF
989
990RSCDEFIMG*=default_images
991
992RSCEXTINC=.
993
994.IF "$(DEBUG)" != ""
995RSCDEFS+= -DDEBUG
996.ENDIF
997
998# settings for mozilla idl compiler
999XPIDL=xpidl
1000XPIDL_LINK=xpt_link
1001
1002# alle bisher verwendeten Linker benutzen + um LIBs auf der naechsten Zeile
1003# weiter zu schreiben, wenn es da eine Ausnahme geben sollte, muss
1004# LINKEXTENDLINE compilerabhaengig definiert werden
1005LINKEXTENDLINE=+
1006
1007LNT=$(DEVROOT)/lint/lint
1008#LNTFLAGS=+v -i$(DEVROOT)/lint\ -mL options.lnt -u
1009LNTFLAGS=+v -i$(DEVROOT)/lint/ -mL options.lnt -u
1010LNTFLAGSOUTOBJ=-os
1011
1012.IF "$(GUI)"=="WNT"
1013.INCLUDE : wnt.mk
1014.ENDIF
1015
1016.IF "$(GUI)" == "UNX"
1017.INCLUDE : unx.mk
1018.ENDIF
1019
1020.IF "$(GUI)" == "OS2"
1021.INCLUDE : os2.mk
1022.ENDIF
1023
1024.IF "$(OOO_LIBRARY_PATH_VAR)" != ""
1025# Add SOLARLIBDIR at the begin of a (potentially previously undefined) library
1026# path (LD_LIBRARY_PATH, PATH, etc.; prepending avoids fetching libraries from
1027# an existing office/URE installation; the ": &&" enables this to work at the
1028# start of a recipe line that is not prefixed by "+" as well as in the middle of
1029# an existing && chain:
1030AUGMENT_LIBRARY_PATH = : && \
1031    $(OOO_LIBRARY_PATH_VAR)=$(normpath, $(SOLARSHAREDBIN))$${{$(OOO_LIBRARY_PATH_VAR):+:$${{$(OOO_LIBRARY_PATH_VAR)}}}}
1032AUGMENT_LIBRARY_PATH_LOCAL = : && \
1033    $(OOO_LIBRARY_PATH_VAR)=$(normpath, $(PWD)/$(DLLDEST)):$(normpath, $(SOLARSHAREDBIN))$${{$(OOO_LIBRARY_PATH_VAR):+:$${{$(OOO_LIBRARY_PATH_VAR)}}}}
1034.END
1035
1036# remove if .Net 2003 support has expired
1037.IF "$(debug)"!=""
1038.IF "$(OS)$(COM)$(CPU)" == "WNTMSCI"
1039.IF "$(COMEX)" == "10"
1040.IF "$(SLOFILES)$(OBJFILES)$(DEPOBJFILES)"!=""
1041MAXPROCESS!:=1
1042.EXPORT : MAXPROCESS
1043.ENDIF			# "$(SLOFILES)$(OBJFILES)$(DEPOBJFILES)"!=""
1044.ENDIF			# "$(COMEX)" == "10"
1045.ENDIF			# "$(OS)$(COM)$(CPU)" == "WNTMSCI"
1046.ENDIF			# "$(debug)"!=""
1047
1048# for multiprocess building in external modules
1049# allow seperate handling
1050EXTMAXPROCESS*=$(MAXPROCESS)
1051
1052IDLC*=$(AUGMENT_LIBRARY_PATH) $(SOLARBINDIR)/idlc
1053REGMERGE*=$(AUGMENT_LIBRARY_PATH) $(SOLARBINDIR)/regmerge
1054REGCOMPARE*=$(AUGMENT_LIBRARY_PATH) $(SOLARBINDIR)/regcompare
1055REGCOMP*=$(AUGMENT_LIBRARY_PATH) $(SOLARBINDIR)/regcomp
1056CPPUMAKER*=$(AUGMENT_LIBRARY_PATH) $(SOLARBINDIR)/cppumaker
1057JAVAMAKER*=$(AUGMENT_LIBRARY_PATH) $(SOLARBINDIR)/javamaker
1058RDBMAKER*=$(AUGMENT_LIBRARY_PATH) $(SOLARBINDIR)/rdbmaker
1059CLIMAKER*=$(AUGMENT_LIBRARY_PATH) $(SOLARBINDIR)/climaker
1060
1061CPPUNITTESTER=$(AUGMENT_LIBRARY_PATH_LOCAL) $(SOLARBINDIR)/cppunittester
1062HELPEX=$(AUGMENT_LIBRARY_PATH) $(SOLARBINDIR)/helpex
1063LNGCONVEX=$(AUGMENT_LIBRARY_PATH) $(SOLARBINDIR)/lngconvex
1064HELPLINKER=$(AUGMENT_LIBRARY_PATH) $(SOLARBINDIR)/HelpLinker
1065
1066.IF "$(JAVAINTERPRETER)" == ""
1067JAVA*:=java
1068.ELSE
1069JAVA*:=$(JAVAINTERPRETER)
1070.ENDIF
1071.EXPORT : JAVA JAVAI
1072
1073# Define SCPCOMP without wrapper because pre2par.pl chokes on DOS style
1074# pathes. (See iz57443)
1075SCPCOMP=$(PERL) $(SOLARENV)/bin/pre2par.pl
1076SCPLINK=$(PERL) $(SOLARENV)/bin/par2script.pl
1077LZIP*=lzip
1078CPPLCC*=$(AUGMENT_LIBRARY_PATH) $(SOLARBINDIR)/cpplcc
1079
1080.IF "$(DISABLE_ENHANCED_COMID)"==""
1081.INCLUDE : tg_compv.mk
1082.ELSE          # "$(DISABLE_ENHANCED_COMID)"==""
1083COMID=$(COM)
1084.ENDIF          # "$(DISABLE_ENHANCED_COMID)"==""
1085.IF "$(SOLAR_JAVA)"=="TRUE"
1086.IF "$(USE_JAVAVER)"!=""
1087.INCLUDE : tg_javav.mk
1088.ENDIF "$(USE_JAVAVER)"!=""
1089.ENDIF			# "$(SOLAR_JAVA)"=="TRUE"
1090
1091.IF "$(COM)"=="GCC"
1092GXX_INCLUDE_PATH*:=$(COMPATH)/include/c++/$(CCVER)
1093.EXPORT : GXX_INCLUDE_PATH
1094CDEFS+= -DGXX_INCLUDE_PATH=$(GXX_INCLUDE_PATH)
1095.ENDIF
1096
1097# --- extend new environment ----------------------------------
1098CDEFS+= -DSUPD=$(UPD)
1099
1100# flags to enable build with symbols; required for crashdump feature
1101.IF ("$(ENABLE_CRASHDUMP)"!="" && "$(ENABLE_CRASHDUMP)"!="DUMMY") || "$(ENABLE_SYMBOLS)"!=""
1102CFLAGSENABLESYMBOLS_CC_ONLY*=$(CFLAGSENABLESYMBOLS)
1103CFLAGSCXX+=$(CFLAGSENABLESYMBOLS)
1104CFLAGSCC+=$(CFLAGSENABLESYMBOLS_CC_ONLY)
1105.ENDIF          # ("$(ENABLE_CRASHDUMP)"!="" && "$(ENABLE_CRASHDUMP)"!="DUMMY") || "$(ENABLE_SYMBOLS)"!=""
1106
1107.IF "$(profile)"!=""
1108CDEFS+= $(CDEFSPROF)
1109CFLAGS+= $(CFLAGSPROF)
1110.IF "$(WST)"!=""
1111LINKFLAGS=$(LINKFLAGSWST)
1112LINKCFLAGS=$(LINKFLAGSWST)
1113.ELSE
1114LINKFLAGSADD+=$(LINKFLAGSPROF)
1115.ENDIF
1116.ENDIF
1117
1118.IF "$(debug)"!=""
1119JAVAFLAGS+=$(JAVAFLAGSDEBUG)
1120CDEFS+= $(CDEFSDEBUG)
1121CFLAGS+= $(CFLAGSDEBUG)
1122LINKFLAGSADD+= $(LINKFLAGSDEBUG)
1123.ENDIF
1124
1125.IF "$(dbgutil)"!=""
1126CDEFS+=$(CDEFSDBGUTIL)
1127CFLAGS+=$(CFLAGSDBGUTIL)
1128RSCDEFS+=-DDBG_UTIL
1129.ENDIF
1130
1131.IF "$(product)"!=""
1132CDEFS+= -DPRODUCT -DNDEBUG
1133RSCDEFS+= -DPRODUCT
1134RSCDEFS+= -DNDEBUG
1135.ENDIF
1136
1137.IF "$(DBG_LEVEL)"!=""
1138CDEFS+=-DOSL_DEBUG_LEVEL=$(DBG_LEVEL)
1139RSCDEFS+=-DOSL_DEBUG_LEVEL=$(DBG_LEVEL)
1140.ENDIF
1141
1142.IF "$(optimize)"!=""
1143CDEFS+=$(CDEFSOPT)
1144CFLAGS+=$(CFLAGSOPT)
1145LINKFLAGSADD+=$(LINKFLAGSOPT)
1146.ELSE
1147CFLAGS+=$(CFLAGSNOOPT)
1148.ENDIF
1149
1150.IF "$(ENABLE_EXCEPTIONS)"!=""
1151GLOBAL_EXCEPTIONS_FLAGS+=$(CFLAGSEXCEPTIONS)
1152GLOBAL_EXCEPTIONS_FLAGS+=-DEXCEPTIONS_ON
1153.ELSE
1154GLOBAL_EXCEPTIONS_FLAGS+=$(CFLAGS_NO_EXCEPTIONS)
1155GLOBAL_EXCEPTIONS_FLAGS+=-DEXCEPTIONS_OFF
1156.ENDIF
1157# used if an object appears in the EXCEPTIONSFILES list
1158# see also rules.mk
1159LOCAL_EXCEPTIONS_FLAGS+=$(CFLAGSEXCEPTIONS)
1160LOCAL_EXCEPTIONS_FLAGS+=-DEXCEPTIONS_ON
1161
1162.IF "$(ENABLE_LAYOUT)" == "TRUE"
1163CDEFS+=-DENABLE_LAYOUT=1
1164.ELSE # ENABLE_LAYOUT != TRUE
1165CFLAGS+=-DENABLE_LAYOUT=0
1166.ENDIF # ENABLE_LAYOUT != TRUE
1167
1168.IF "$(ENABLE_LAYOUT_EXPERIMENTAL)" == "TRUE"
1169CDEFS+=-DENABLE_LAYOUT_EXPERIMENTAL=1
1170.ELSE # ENABLE_LAYOUT_EXPERIMENTAL != TRUE
1171CFLAGS+=-DENABLE_LAYOUT_EXPERIMENTAL=0
1172.ENDIF # ENABLE_LAYOUT_EXPERIMENTAL != TRUE
1173
1174# compose flags and defines for GUI
1175.IF "$(TARGETTYPE)"=="GUI"
1176CDEFS+= $(CDEFSGUI)
1177CFLAGSSLO+=$(CFLAGSSLOGUIMT)
1178CDEFSSLO+=$(CDEFSSLOMT)
1179LINKFLAGSAPP=$(LINKFLAGSAPPGUI)
1180LINKFLAGSSHL=$(LINKFLAGSSHLGUI)
1181STDOBJ=$(STDOBJGUI)
1182STDSLO=$(STDSLOGUI)
1183
1184CDEFSOBJ+= $(CDEFSMT) $(CDEFSOBJMT)
1185CFLAGSOBJ+=$(CFLAGSOBJGUIMT)
1186STDLIB=$(STDLIBGUIMT)
1187STDSHL=$(STDSHLGUIMT)
1188
1189.ENDIF
1190
1191# compose flags and defines for CUI
1192.IF "$(TARGETTYPE)" == "CUI" || "$(TARGETTYPE)"=="cui"
1193CDEFS+= $(CDEFSCUI)
1194CFLAGSSLO+=$(CFLAGSSLOCUIMT)
1195CDEFSSLO+=$(CDEFSSLOMT)
1196LINKFLAGSAPP=$(LINKFLAGSAPPCUI)
1197LINKFLAGSSHL=$(LINKFLAGSSHLCUI)
1198STDOBJ=$(STDOBJCUI)
1199STDSLO=$(STDSLOCUI)
1200
1201CDEFSOBJ+=$(CDEFSMT) $(CDEFSOBJMT)
1202CFLAGSOBJ+=$(CFLAGSOBJCUIMT)
1203STDLIB=$(STDLIBCUIMT)
1204STDSHL=$(STDSHLCUIMT)
1205
1206.ENDIF
1207
1208.EXPORT : PICSWITCH
1209
1210.IF "$(USE_SYSTEM_STL)"=="YES"
1211.IF "$(GUI)"=="OS2"
1212LIBSTLPORT=
1213.ELSE
1214LIBSTLPORT=""
1215.ENDIF
1216.ENDIF
1217
1218.IF "$(NO_DEFAULT_STL)"==""
1219STDLIB+=$(LIBSTLPORT)
1220STDSHL+=$(LIBSTLPORT)
1221.ENDIF			# "$(NO_DEFAULT_STL)"==""
1222
1223# fill up unresolved symbols not found else where
1224.IF "$(FILLUPARC)"!=""
1225STDLIB+=$(FILLUPARC)
1226STDSHL+=$(FILLUPARC)
1227.ENDIF			# "$(FILUPARC)"!=""
1228
1229.IF "$(SOLAR_JAVA)"!=""
1230CDEFS+=$(JAVADEF)
1231.ENDIF          # "$(SOLAR_JAVA)"!=""
1232
1233.INCLUDE .IGNORE: $(UPD)$(LAST_MINOR).mk
1234
1235# Once all modules on a given platform compile without warnings, the specific
1236# .mk file for that platform should set COMPILER_WARN_ERRORS=TRUE and no longer
1237# set MODULES_WITH_WARNINGS, and once no platform sets MODULES_WITH_WARNINGS any
1238# longer, this code can go away:
1239.IF "$(MODULES_WITH_WARNINGS)" != ""
1240MODULES_WITH_WARNINGS_1 := $(foreach,i,$(MODULES_WITH_WARNINGS) .$(i).)
1241MODULES_WITH_WARNINGS_2 := $(subst,.$(PRJNAME)., $(MODULES_WITH_WARNINGS_1))
1242.IF "$(MODULES_WITH_WARNINGS_1)" == "$(MODULES_WITH_WARNINGS_2)"
1243COMPILER_WARN_ERRORS = TRUE
1244.ENDIF
1245.ENDIF
1246
1247CFLAGSWARNCXX *= $(CFLAGSWARNCC)
1248CFLAGSWALLCXX *= $(CFLAGSWALLCC)
1249CFLAGSWERRCXX *= $(CFLAGSWERRCC)
1250
1251.IF "$(ENVWARNFLAGS)"==""
1252.IF "$(COMPILER_WARN_ALL)"==""
1253CFLAGSCC+=$(CFLAGSWARNCC)
1254CFLAGSCXX+=$(CFLAGSWARNCXX)
1255.ELSE
1256CFLAGSCC+=$(CFLAGSWALLCC)
1257CFLAGSCXX+=$(CFLAGSWALLCXX)
1258.ENDIF
1259.IF "$(COMPILER_WARN_ERRORS)"!="" && "$(EXTERNAL_WARNINGS_NOT_ERRORS)"==""
1260CFLAGSCC+=$(CFLAGSWERRCC)
1261CFLAGSCXX+=$(CFLAGSWERRCXX)
1262.ENDIF
1263.ELSE			# "$(ENVWARNFLAGS)"==""
1264CFLAGSAPPEND+=$(ENVWARNFLAGS)
1265.ENDIF			# "$(ENVWARNFLAGS)"==""
1266
1267CDEFS+= $(ADDCDEFS)
1268CDEFS+= $(ENVCDEFS)
1269CFLAGS+= $(CFLAGSCALL) $(ENVCFLAGS)
1270CFLAGSCXX+= $(ENVCFLAGSCXX)
1271# andersrum wg. -TPxxxx
1272CFLAGSINCXX+:=$(ENVCFLAGSINCXX)
1273LIBFLAGS+= $(ENVLIBFLAGS)
1274LINKFLAGSADD+= $(ENVLINKFLAGS)
1275RSCFLAGS+= $(ENVRSCFLAGS)
1276RSCDEFS+= $(ENVRSCDEFS)
1277# RSCLINKFLAGS+= $(ENVRSCLINKFLAGS)
1278RCFLAGS+= $(ENVRCFLAGS)
1279RCLINKFLAGS+= $(ENVRCLINKFLAGS)
1280
1281LINKFLAGSRUNPATH_URELIB*=
1282LINKFLAGSRUNPATH_UREBIN*=
1283LINKFLAGSRUNPATH_OOO*=
1284LINKFLAGSRUNPATH_SDK*=
1285LINKFLAGSRUNPATH_BRAND*=
1286LINKFLAGSRUNPATH_OXT*=
1287LINKFLAGSRUNPATH_BOXT*=
1288LINKFLAGSRUNPATH_NONE*=
1289
1290# make sure both linker variables are set
1291LINKC*=$(LINK)
1292LINKCFLAGS*=$(LINKFLAGS)
1293LINKFLAGS+=$(LINKFLAGSADD)
1294LINKCFLAGS+=$(LINKFLAGSADD)
1295
1296#defaults for UCR HEADER
1297UNOUCRBASE*=UCR
1298UNOUCROUT*=$(OUT)/inc/$(TARGET)
1299INCPRE+=-I$(UNOUCROUT)
1300UNOUCRRDB*=$(SOLARBINDIR)/types.rdb
1301
1302# location of trustedinfo.manifest for Windows Vista
1303.IF "$(COM)"=="MSC"
1304TRUSTED_MANIFEST_LOCATION*=$(SOLARENV)/inc
1305.ENDIF # "$(COM)"=="MSC"
1306
1307# --- Compiler -----------------------------------------------------
1308.INCLUDE : rules.mk
1309
1310# --- include typelists --------------------------------------------
1311
1312.IF "$(COMP1TYPELIST)"!=""
1313.INCLUDE .IGNORE : $(MISC)/$(COMP1TYPELIST).mk
1314$(COMP1TYPELIST)_XML2CMPTYPES:=$(shell @$(AUGMENT_LIBRARY_PATH) $(SOLARBINDIR)/xml2cmp -types stdout $(MISC)/$(COMP1TYPELIST)$($(WINVERSIONNAMES)_MAJOR).xml)
1315.ENDIF
1316
1317.IF "$(COMP2TYPELIST)"!=""
1318.INCLUDE .IGNORE : $(MISC)/$(COMP2TYPELIST).mk
1319$(COMP2TYPELIST)_XML2CMPTYPES:=$(shell @$(AUGMENT_LIBRARY_PATH) $(SOLARBINDIR)/xml2cmp -types stdout $(MISC)/$(COMP2TYPELIST)$($(WINVERSIONNAMES)_MAJOR).xml)
1320.ENDIF
1321
1322.IF "$(COMP3TYPELIST)"!=""
1323.INCLUDE .IGNORE : $(MISC)/$(COMP3TYPELIST).mk
1324$(COMP3TYPELIST)_XML2CMPTYPES:=$(shell @$(AUGMENT_LIBRARY_PATH) $(SOLARBINDIR)/xml2cmp -types stdout $(MISC)/$(COMP3TYPELIST)$($(WINVERSIONNAMES)_MAJOR).xml)
1325.ENDIF
1326
1327.IF "$(COMP4TYPELIST)"!=""
1328.INCLUDE .IGNORE : $(MISC)/$(COMP4TYPELIST).mk
1329$(COMP4TYPELIST)_XML2CMPTYPES:=$(shell @$(AUGMENT_LIBRARY_PATH) $(SOLARBINDIR)/xml2cmp -types stdout $(MISC)/$(COMP4TYPELIST)$($(WINVERSIONNAMES)_MAJOR).xml)
1330.ENDIF
1331
1332.IF "$(COMP5TYPELIST)"!=""
1333.INCLUDE .IGNORE : $(MISC)/$(COMP5TYPELIST).mk
1334$(COMP5TYPELIST)_XML2CMPTYPES:=$(shell @$(AUGMENT_LIBRARY_PATH) $(SOLARBINDIR)/xml2cmp -types stdout $(MISC)/$(COMP5TYPELIST)$($(WINVERSIONNAMES)_MAJOR).xml)
1335.ENDIF
1336
1337.IF "$(COMP6TYPELIST)"!=""
1338.INCLUDE .IGNORE : $(MISC)/$(COMP6TYPELIST).mk
1339$(COMP6TYPELIST)_XML2CMPTYPES:=$(shell @$(AUGMENT_LIBRARY_PATH) $(SOLARBINDIR)/xml2cmp -types stdout $(MISC)/$(COMP6TYPELIST)$($(WINVERSIONNAMES)_MAJOR).xml)
1340.ENDIF
1341
1342.IF "$(COMP7TYPELIST)"!=""
1343.INCLUDE .IGNORE : $(MISC)/$(COMP7TYPELIST).mk
1344$(COMP7TYPELIST)_XML2CMPTYPES:=$(shell @$(AUGMENT_LIBRARY_PATH) $(SOLARBINDIR)/xml2cmp -types stdout $(MISC)/$(COMP7TYPELIST)$($(WINVERSIONNAMES)_MAJOR).xml)
1345.ENDIF
1346
1347.IF "$(COMP8TYPELIST)"!=""
1348.INCLUDE .IGNORE : $(MISC)/$(COMP8TYPELIST).mk
1349$(COMP8TYPELIST)_XML2CMPTYPES:=$(shell @$(AUGMENT_LIBRARY_PATH) $(SOLARBINDIR)/xml2cmp -types stdout $(MISC)/$(COMP8TYPELIST)$($(WINVERSIONNAMES)_MAJOR).xml)
1350.ENDIF
1351
1352.IF "$(COMP9TYPELIST)"!=""
1353.INCLUDE .IGNORE : $(MISC)/$(COMP9TYPELIST).mk
1354$(COMP9TYPELIST)_XML2CMPTYPES:=$(shell @$(AUGMENT_LIBRARY_PATH) $(SOLARBINDIR)/xml2cmp -types stdout $(MISC)/$(COMP9TYPELIST)$($(WINVERSIONNAMES)_MAJOR).xml)
1355.ENDIF
1356
1357# some place to define these jars for SO environment
1358XML_APIS_JAR*=$(SOLARBINDIR)/xml-apis.jar
1359XERCES_JAR*=$(SOLARBINDIR)/xercesImpl.jar
1360
1361.IF "$(SYSTEM_CPPUNIT)" != "YES"
1362CPPUNIT_CFLAGS =
1363.END
1364
1365COMPONENTPREFIX_URE_NATIVE = vnd.sun.star.expand:$$URE_INTERNAL_LIB_DIR/
1366COMPONENTPREFIX_URE_JAVA = vnd.sun.star.expand:$$URE_INTERNAL_JAVA_DIR/
1367#.IF "$(OS)" == "WNT" || "$(OS)" == "OS2"
1368#COMPONENTPREFIX_BASIS_NATIVE = vnd.sun.star.expand:$$OOO_BASE_DIR/program/
1369#.ELSE
1370COMPONENTPREFIX_BASIS_NATIVE = vnd.sun.star.expand:$$OOO_BASE_DIR/program/
1371#.END
1372COMPONENTPREFIX_BASIS_JAVA = vnd.sun.star.expand:$$OOO_BASE_DIR/program/classes/
1373COMPONENTPREFIX_BASIS_PYTHON = vnd.openoffice.pymodule:
1374COMPONENTPREFIX_INBUILD_NATIVE = \
1375    vnd.sun.star.expand:$$OOO_INBUILD_SHAREDLIB_DIR/
1376COMPONENTPREFIX_INBUILD_JAVA = vnd.sun.star.expand:$$OOO_INBUILD_JAR_DIR/
1377COMPONENTPREFIX_EXTENSION = ./
1378
1379# workaround for strange dmake bug:
1380# if the previous block was a rule or a target, "\#" isn't recognized
1381# as an escaped "#". if it was an assignment, escaping works...
1382some_unique_variable_name:=1
1383