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