1 #*************************************************************************
3 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 # Copyright 2000, 2010 Oracle and/or its affiliates.
7 # OpenOffice.org - a multi-platform office productivity suite
9 # This file is part of OpenOffice.org.
11 # OpenOffice.org is free software: you can redistribute it and/or modify
12 # it under the terms of the GNU Lesser General Public License version 3
13 # only, as published by the Free Software Foundation.
15 # OpenOffice.org is distributed in the hope that it will be useful,
16 # but WITHOUT ANY WARRANTY; without even the implied warranty of
17 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 # GNU Lesser General Public License version 3 for more details
19 # (a copy is included in the LICENSE file that accompanied this code).
21 # You should have received a copy of the GNU Lesser General Public License
22 # version 3 along with OpenOffice.org. If not, see
23 # <http://www.openoffice.org/license.html>
24 # for a copy of the LGPLv3 License.
26 #*************************************************************************
27 MKFILENAME
:=SETTINGS.MK
29 # smaller/greater arithmetic's like ".IF 400<=200" are an OOo extention to
30 # the initial dmake 4.1PL0 (unfortunately called 4.10) version and are
31 # tested implicitly by the construction below.
32 .IF
$(MAKEVERSION
:s
/-cvs
//:s
/.
//)<=410
33 .ERROR
: ; @echo Forced error
: dmake version
4.11 or newer is needed
!
37 .INCLUDE .IGNORE
: ooo_vendor.mk
39 # --- common tool makros --------------------------------------
41 .INCLUDE
: unitools.mk
45 PLATFORMID
= $(RTL_OS
:l
)_
$(RTL_ARCH
:l
)
46 EXTNAME
*=$(EXTENSIONNAME
)_in
48 .IF
"$(SOURCEVERSION)"!="$(WORK_STAMP)"
49 .ERROR
: ; @echo Forced error
: minor.mk in solenv
/inc does not match your version
!
53 # Force creation of $(SOLARVERSION)/$(INPATH)/inc/
54 # $(UPD)minor.mk could be empty as it's contents were already included from minor.mk
55 .INCLUDE
: $(SOLARVERSION
)/$(INPATH
)/inc
/$(UPD
)minor.mk
57 .INCLUDE
: udkversion.mk
59 # --- reset defined Environments --------------------
67 .IF
"$(JAVAINTERPRETER)" == ""
69 JAVAINTERPRETER
=jview.exe
71 .IF
"$(JDK)" == "SCAFE"
72 .IF
"$(JDK_VERSION)" != ""
73 JAVAINTERPRETER
=$(DEVROOT
)/vcafe11
/java
/bin
/java.exe
75 JAVAINTERPRETER
=$(DEVROOT
)/cafepro
/java
/bin
/java.exe
78 .IF
"$(JAVACISGCJ)" == "yes"
88 .IF
"$(JAVACOMPILER)" == ""
92 .IF
"$(JDK)" == "SCAFE"
93 .IF
"$(JDK_VERSION)" != ""
94 JAVACOMPILER
=$(DEVROOT
)/vcafe11
/bin
/sj.exe
96 JAVACOMPILER
=$(DEVROOT
)/cafepro
/bin
/sj.exe
99 .IF
"$(JAVACISGCJ)" == "yes"
108 #if javadoc is not already set
110 JAVADOC
=javadoc
-J-Xmx120m
114 JAVAC
=$(JAVACOMPILER
)
115 JAVAI
:=$(JAVAINTERPRETER
)
116 .IF
"$(JAVACISGCJ)" == "yes"
117 JAVAC
+=--encoding
=UTF-8
-O2
-fno-assert
-Wno-deprecated
-C
119 .IF
$(JAVACISKAFFE
) != "yes"
120 JAVAC
+=-source
$(JAVA_SOURCE_VER
) -target
$(JAVA_TARGET_VER
)
123 #classpath and response
124 .IF
"$(JDK)" == "J++"
127 .IF
"$(JDK)" == "SCAFE"
247 # not to reset because possibly taken from environment
254 # avoid confusion with CUE PROFILE variable...
257 # can be set on the command line. we shouldn't delete them!
260 # reset as setting those manually is no lonjger supported
267 # ===========================================================================
268 # unter NT werden Variablennamen an untergeordnete makefiles UPPERCASE
269 # weitergereicht, aber case significant ausgewertet!
270 # ---------------------------------------------------------------------------
272 DMAKE_WORK_DIR
*:=$(subst,/,/ $(PWD
))
273 .IF
"$(GUI_FOR_BUILD)"=="WNT"
274 posix_PWD
:=/cygdrive
/$(PWD
:s
/://)
300 .IF
"$(OPTIMIZE)"!=""
316 # override dbglevel if set manually
317 .IF
"$(dbglevel)"!=""
318 DBG_LEVEL
=$(dbglevel
)
338 # normalize: "false" (any upper/lower case) and "0" mean FALSE, everything else means TRUE
339 VERBOSE_IS_FALSE
:=$(or
$(eq
,"$(verbose:u)","FALSE" "false" ) $(eq
,"$(verbose)","0" "false" ))
340 VERBOSE
!:=$(eq
,"$(VERBOSE_IS_FALSE)","t" FALSE TRUE
)
343 .IF
"$(SOLARLANG)" != ""
344 solarlang
*=$(SOLARLANG
)
347 .IF
"$(solarlang)" != ""
348 SOLARLANG
:=$(solarlang
)
352 COMPILER_WARN_ALL
=TRUE
353 .ENDIF
# "$(wall)"!=""
356 COMPILER_WARN_ERRORS
=TRUE
359 .IF
"$(USE_SHL_VERSIONS)"!=""
360 use_shl_versions
*=$(USE_SHL_VERSIONS
)
363 .IF
"$(noremove)"!=""
364 NOREMOVE
*=$(noremove
)
367 # --- env flags not case sensitive --------------------------------
369 #.IF "$(envcflags)"!=""
370 ENVCFLAGS
*=$(envcflags
)
373 #.IF "$(envcflagscxx)"!=""
374 ENVCFLAGSCXX
*=$(envcflagscxx
)
378 .IF
"$(envcdefs)"!=""
379 ENVCDEFS
*=$(envcdefs
)
382 .IF
"$(envlibflags)"!=""
383 ENVLIBFLAGS
*=$(envlibflags
)
386 .IF
"$(envcflagsincxx)"!=""
387 ENVCFLAGSINCXX
*=$(envcflagsincxx
)
390 .IF
"$(envlinkflags)"!=""
391 ENVLINKFLAGS
*=$(envlinkflags
)
394 .IF
"$(envrscflags)"!=""
395 ENVRSCFLAGS
*=$(envrscflags
)
398 .IF
"$(envrscdefs)"!=""
399 ENVRSCDEFS
*=$(envrscdefs
)
402 .IF
"$(envrsclinkflags)"!=""
403 # ENVRSCLINKFLAGS*=$(envrsclinkflags)
406 .IF
"$(envrcflags)"!=""
407 ENVRCFLAGS
*=$(envrcflags
)
410 .IF
"$(envrclinkflags)"!=""
411 ENVRCLINKFLAGS
*=$(envrclinkflags
)
414 # --- set both L10N variables to keep things working ---------------
416 L10N-framework
=$(L10N_framework
)
418 # --- Parameter Einstellungen ueberpruefen und umsetzen ------------
420 # profile immer mit product
431 # Produkt auf einen Wert setzen (alles klein)
432 .IF
"$(product)" != ""
434 .IF
"$(product)" == "full" ||
"$(product)" == "Full" ||
"$(product)" == "FULL"
437 .IF
"$(product)" == "demo" ||
"$(product)" == "Demo" ||
"$(product)" == "DEMO"
440 .IF
"$(product)" == "compact" ||
"$(product)" == "Compact" ||
"$(product)" == "COMPACT"
451 .IF
"$(debug)"!="D_FORCE_OPT"
462 # Optimierung bei FinalCheck funktioniert nicht!
463 .IF
"$(bndchk)" != ""
468 ######################################################
470 # sprachabh. einstellungen
472 ######################################################
476 .INCLUDE
: postset.mk
478 RSC_LANG_ISO
+:=$(completelangiso
)
479 .EXPORT
: RSC_LANG_ISO
481 ######################################################
483 .IF
"$(TARGETTYPE)"==""
487 # --- Pfade setzen -------------------------------------------------
490 # profile has to be first for not getting the .pro extension
492 OUT
=$(PRJ
)/$(OUTPATH
).cap
493 OUT_FOR_BUILD
=$(PRJ
)/$(OUTPATH_FOR_BUILD
).cap
498 OUT
=$(PRJ
)/$(OUTPATH
).pro
499 OUT_FOR_BUILD
=$(PRJ
)/$(OUTPATH_FOR_BUILD
).pro
504 OUT
=$(PRJ
)/$(OUTPATH
).cap
505 OUT_FOR_BUILD
=$(PRJ
)/$(OUTPATH_FOR_BUILD
).cap
509 OUT
=$(PRJ
)/$(OUTPATH
).w
510 OUT_FOR_BUILD
=$(PRJ
)/$(OUTPATH_FOR_BUILD
).w
513 # could already be set by makefile.mk
515 OUT
*=$(PRJ
)/$(OUTPATH
)
516 OUT_FOR_BUILD
*=$(PRJ
)/$(OUTPATH_FOR_BUILD
)
522 .IF
"$(bndchk)" != ""
523 OUT
:=$(PRJ
)/$(OUTPATH
).bnd
524 OUT_FOR_BUILD
=$(PRJ
)/$(OUTPATH_FOR_BUILD
).bnd
527 .IF
"$(truetime)" != ""
528 OUT
=$(PRJ
)/$(OUTPATH
).tt
529 OUT_FOR_BUILD
=$(PRJ
)/$(OUTPATH_FOR_BUILD
).tt
536 $(subst,$(normpath
$(shell @
+cd
$(PRJ
) && pwd
$(PWDFLAGS
)))/, $(PWD
))
537 .ELSE
# "$(GUI)"=="WNT"
538 PATH_IN_MODULE
:=$(subst,$(shell @
+cd
$(PRJ
) && pwd
$(PWDFLAGS
))/, $(PWD
))
539 .ENDIF
# "$(GUI)"=="WNT"
540 .ELSE
# "$(PRJ)"!="."
542 .ENDIF
# "$(PRJ)"!="."
544 COMMON_OUTDIR
:=$(OUTPATH
)
547 LOCAL_OUT_FOR_BUILD
:=$(OUT_FOR_BUILD
)
548 LOCAL_COMMON_OUT
:=$(subst,$(OUTPATH
),$(COMMON_OUTDIR
) $(OUT
))
549 .EXPORT
: LOCAL_OUT LOCAL_COMMON_OUT
551 # --- generate output tree -----------------------------------------
553 # disable for makefiles wrapping a gnumake module
554 .IF
"$(TARGET)"!="prj"
555 # As this is not part of the initial startup makefile we define an infered
556 # target instead of using $(OUT)/inc/myworld.mk as target name.
558 $(posix_PWD
)/$(OUT
)/inc
/%world.mk
:
562 .INCLUDE
: $(posix_PWD
)/$(OUT
)/inc
/myworld.mk
564 .ENDIF
# "$(TARGET)"!="prj"
566 .INCLUDE .IGNORE
: office.mk
574 MISC_FOR_BUILD
=$(OUT_FOR_BUILD
)/misc
575 # pointing to misc in common output tree if exists
576 COMMONMISC
={$(subst,$(OUTPATH
),$(COMMON_OUTDIR
) $(MISC
))}
582 IDLPACKAGE
:=$(PACKAGE
)
583 IDLPACKAGENAME
:=$(IDLPACKAGE
:sX\X
/X
)
585 IDLPACKAGE
=$(PRJNAME
)
586 IDLPACKAGENAME
=$(PRJNAME
)
602 # wir haben ein ucr verzeichnis
605 # $(L) nur noch pfad ins solver\upd\...\lib
606 #L:={$(LB);$(SLB);$(ILIB)}
609 #.EXPORT : SLB LB L LIB
611 #todo: check PRJ is still expected to exist in environment
614 # Class-Path for java-classes
615 # obwohl der generierte Bytecode plattformunabhg. sein sollte
616 # generieren wir ihn ersteinmal ins abhaengige Verzeichnis
617 CLASSDIR
=$(OUT
)/class
618 CLASSPATH
!:=.
$(PATH_SEPERATOR
)$(CLASSDIR
)$(PATH_SEPERATOR
)$(CLASSPATH
)
619 STARJAR
=java
-classpath
$(CLASSPATH
)$(PATH_SEPERATOR
)$(SOLARENV
)/bin
/jtools.jar com.sun.star.tool.starjar.StarJar
621 STARDEP
=$(AUGMENT_LIBRARY_PATH
) $(SOLARBINDIR
)/javadep
622 .IF
"$(PRJNAME)"=="sj2"
623 CLASSPATH
!:=$(CLASSPATH
:s
/sj2
/no
/)
625 .IF
"$(PRJNAME)"=="uno"
626 CLASSPATH
!:=$(CLASSPATH
:s
/uno
/no
/)
628 .IF
"$(PRJNAME)"=="tkt"
629 CLASSPATH
!:=$(CLASSPATH
:s
/tkt
/no
/)
632 # default output directory when processing
633 # configuration files
636 # Makros fuer die Librarynamen des Solar
640 VERSIONOBJ
=$(SLO
)/_version.obj
644 VERSIONOBJ
=$(SLO
)/_version.o
648 WINVERSIONNAMES
=$(UNIXVERSIONNAMES
)
649 .ENDIF
# "$(GUI)"=="WNT"
653 SHELLLIB
=-lgdi32
-lshell32
-ladvapi32
-lcomdlg32
655 SHELLLIB
=gdi32.lib shell32.lib advapi32.lib comdlg32.lib
665 # pointing to misc in common output tree if exists
666 COMMONBIN
=$(LOCAL_COMMON_OUT
)/bin
669 # still without -I here s.a. target.mk INCLUDE
672 INCGUI
=$(PRJ
)/$(GUIBASE
)/inc
675 INCUNOIDL
=$(INCCOM
)/$(PRJNAME
)
676 INCDEPN
=.
$(INCGUI
) $(INCLOCAL
) $(INC
) $(INC
)/$(PRJNAME
)
678 INCLOCPRJ
=$(foreach,i
,$(PRJINC
) $i/inc
)
679 INCDEPN
+=$(INCLOCPRJ
)
685 # Resource-Pfad fuer .SRS
690 # Resource-Pfad fuer .RC und .RES
693 # das normale MISC wird nicht an LDMISC angepasst, stattdessen MISCX
696 BIN
=$(PRJ
)/$(OUTPATH
).xl
/bin
699 # damit gezielt Abhaengigkeiten auf s: angegeben werden koennen
701 SOLARIDLDIR
=$(SOLARVERSION
)/$(INPATH
)/idl
703 SOLARRESDIR
=$(SOLARVERSION
)/$(INPATH
)/res
704 SOLARRESXDIR
=$(SOLARVERSION
)/$(INPATH
)/res
705 SOLARLIBDIR
=$(SOLARVERSION
)/$(INPATH
)/lib
706 SOLARLIBDIR_FOR_BUILD
=$(SOLARVERSION
)/$(INPATH_FOR_BUILD
)/lib
707 SOLARJAVADIR
=$(SOLARVERSION
)/$(INPATH
)/java
708 SOLARINCDIR
=$(SOLARVERSION
)/$(INPATH
)/inc
709 SOLARINCXDIR
=$(SOLARVERSION
)/$(INPATH
)/inc
710 .IF
"$(SOLARLANG)"!="deut"
711 .IF
"$(SOLARLANG)" != ""
712 SOLARINCXDIR
=$(SOLARVERSION
)/$(INPATH
)/inc
/$(SOLARLANG
)
713 SOLARRESXDIR
=$(SOLARVERSION
)/$(INPATH
)/res
/$(SOLARLANG
)
716 SOLARBINDIR
:=$(SOLARVERSION
)/$(INPATH_FOR_BUILD
)/bin
717 SOLARUCRDIR
=$(SOLARVERSION
)/$(INPATH
)/ucr
718 SOLARPARDIR
=$(SOLARVERSION
)/$(INPATH
)/par
719 SOLARXMLDIR
=$(SOLARVERSION
)/$(INPATH
)/xml
720 SOLARDOCDIR
=$(SOLARVERSION
)/$(INPATH
)/doc
721 SOLARPCKDIR
=$(SOLARVERSION
)/$(INPATH
)/pck
722 SOLARSDFDIR
=$(SOLARVERSION
)/$(INPATH
)/sdf
723 SOLARCOMMONBINDIR
=$(SOLARVERSION
)/common
$(PROEXT
)/bin
724 SOLARCOMMONRESDIR
=$(SOLARVERSION
)/common
$(PROEXT
)/res
725 SOLARCOMMONPCKDIR
=$(SOLARVERSION
)/common
$(PROEXT
)/pck
726 SOLARCOMMONSDFDIR
=$(SOLARVERSION
)/common
$(PROEXT
)/sdf
727 SOLARCOMMONBINDIR
=$(SOLARBINDIR
)
728 SOLARCOMMONRESDIR
=$(SOLARRESDIR
)
729 SOLARCOMMONPCKDIR
=$(SOLARPCKDIR
)
730 SOLARCOMMONSDFDIR
=$(SOLARSDFDIR
)
732 .EXPORT
: SOLARBINDIR
734 .IF
"$(WITH_LANG)"!=""
735 .INCLUDE .IGNORE
: $(WORKDIR
)$/CustomTarget
$/translations
$/localization_present.mk
737 # if the l10n module exists, use split localize.sdf directly from there
738 .IF
"$(LOCALIZATION_FOUND)"!="" && "$(LOCALIZESDF)"==""
739 # still check for existence as there may be no localization yet
740 TRYSDF
:=$(WORKDIR
)$/CustomTarget
$/translations
$/translate
$/sdf
$/$(PRJNAME
)$/$(PATH_IN_MODULE
)$/localize.sdf
741 LOCALIZESDF
:=$(strip $(shell @
+$(IFEXIST
) $(TRYSDF
) $(THEN
) echo
$(TRYSDF
) $(FI
)))
742 .ENDIF
# "$(LOCALIZATION_FOUND)"!="" && "$(LOCALIZESDF)"==""
743 # else use localize.sdf from local output tree if localization .zip exists
744 .IF
"$(LOCALIZESDF)"==""
745 LOCALSDFFILE
:=$(COMMONMISC
)$/$(PRJNAME
)$/$(PATH_IN_MODULE
)$/localize.sdf
746 LOCALIZESDF
:=$(strip $(shell @
+$(IFEXIST
) $(SOLARCOMMONSDFDIR
)$/$(PRJNAME
).zip
$(THEN
) echo
$(LOCALSDFFILE
) $(FI
)))
747 .IF
"$(LOCALIZESDF)"==""
749 .ENDIF
# "$(LOCALIZESDF)"==""
750 .ENDIF
# "$(LOCALIZESDF)"==""
751 # dummy target to keep the build happy.
752 .IF
"$(LOCALIZESDF)"==""
753 LOCALIZESDF
:=$(COMMONMISC
)$/$(PRJNAME
)$/dummy
$/localize.sdf
754 .ENDIF
# "$(LOCALIZESDF)"==""
755 .ENDIF
# "$(WITH_LANG)"!=""
759 # needs to be expanded!!!
761 # extend library path for MS Compiler
763 LIB
:=$(LB
);$(SLB
);$(ILIB
)
766 # extend library path for MinGW Compiler
767 .IF
"$(GUI)$(COM)"=="WNTGCC"
768 LIB
:=$(LB
);$(BIN
);$(ILIB
)
771 # --- Environment-Allgemein ----------------------------------------
773 .IF
"$(CPUNAME)" == ""
774 CPUNAME
=CPUNAME_HAS_TO_BE_SET_IN_ENVIRONMENT
777 .IF
"$(USE_DEBUG_RUNTIME)" != ""
778 SCPCDEFS
+=-D_DEBUG_RUNTIME
781 .IF
"$(UDK_MAJOR)"!=""
782 SCPDEFS
+=-DUDK_MAJOR
=$(UDK_MAJOR
)
783 .ENDIF
# "$(UDK_MAJOR)"!=""
785 SCPDEFS
+=-U
$(COMID
) -DCOMID
=$(COMID
) -DCOMNAME
=$(COMNAME
) -D_
$(COMID
)
786 SCPDEFS
+=-DCCNUMVER
=$(CCNUMVER
)
788 SCPDEFS
+=-DSHORTSTDCPP3
=$(SHORTSTDCPP3
) -DSHORTSTDC3
=$(SHORTSTDC3
)
789 .ENDIF
# "$(SHORTSTDCPP3)"!=""
792 UNOIDLDEFS
+=-DSUPD
=$(UPD
) -DUPD
=$(UPD
)
794 UNOIDLDEPFLAGS
=-Mdepend
=$(SOLARVER
)
796 UNOIDLINC
+=-I.
-I..
-I
$(PRJ
) -I
$(PRJ
)/inc
-I
$(PRJ
)/$(INPATH
)/idl
-I
$(OUT
)/inc
-I
$(SOLARIDLDIR
) -I
$(SOLARINCDIR
)
799 .IF
"$(GUI)" != "$(OS)"
802 CDEFS
+=-D
$(COM
) -D
$(CPUNAME
)
804 .IF
"$(USE_DEBUG_RUNTIME)" != ""
805 CDEFS
+=-D_DEBUG_RUNTIME
808 .IF
"$(CDEFS_PRESET)" != ""
809 CDEFS
+=$(CDEFS_PRESET
)
812 .IF
"$(TIMELOG)" != ""
818 #CDEFSMT=-DMULTITHREAD
820 .IF
"$(dbg_build_only)" == ""
823 CDEFSDBGUTIL
=-DDBG_UTIL
826 MKDEPFLAGS
+=-I
$(INCDEPN
:s
/ / -I
/:s
/-I-I
/-I
/)
827 MKDEPALLINC
=$(SOLARINC
:s
/-I
/ -I
/)
828 MKDEPPREINC
=-I
$(PREPATH
)/$(INPATH
)/inc
829 MKDEPSOLENV
=-I
$(SOLARENV
)/inc
-I
$(SOLARENV
)/$(GUI
)$(COMEX
)/inc
830 MKDEPSOLVER
=-I
$(SOLARVERSION
)/$(INPATH
)/inc
831 MKDEPLOCAL
=-I
$(INCCOM
)
833 .IF
"$(MKDEPENDALL)"!=""
834 MKDEPFLAGS
+=$(MKDEPALLINC
)
837 .IF
"$(MKDEPENDSOLENV)"!=""
838 MKDEPFLAGS
+=$(MKDEPSOLENV
)
841 .IF
"$(MKDEPENDPREPATH)"!=""
842 MKDEPFLAGS
+=$(MKDEPPREINC
)
845 .IF
"$(MKDEPENDSOLVER)"!=""
846 MKDEPFLAGS
+=$(MKDEPSOLVER
)
848 # unused - nodep should do the same now
849 #.IF "$(MKDEPENDLOCAL)"!="NO"
850 MKDEPFLAGS
+=$(MKDEPLOCAL
)
856 SVIDL
=$(AUGMENT_LIBRARY_PATH
) $(SOLARBINDIR
)/svidl
858 LDUMP2
*=$(SOLARBINDIR
)/ldump4
861 ZIPFLAGS
=$(ZIPUPDATE
)
862 #hack for dynamic language subdirs
866 SCPLINKFLAGS
=-i
$(PAR
),$(SOLARPARDIR
)
867 .IF
"$(SCPLINKVERSION)"!=""
868 SCPLINKFLAGS
+=-v
$(SCPLINKVERSION
)
869 .ENDIF
# "$(SCPLINKVERSION)"!=""
871 .IF
"$(make_srs_deps)"!=""
872 RSC
=$(AUGMENT_LIBRARY_PATH
) $(SOLARBINDIR
)/rscdep
873 .ELSE
# "$(make_srs_deps)"!=""
874 RSC
=$(AUGMENT_LIBRARY_PATH
) $(FLIPCMD
) $(SOLARBINDIR
)/rsc
875 .ENDIF
# "$(make_srs_deps)"!=""
877 .IF
"$(VERBOSE)" == "TRUE"
883 .ENDIF
# "$(VERBOSE)" == "TRUE"
885 COMPILE_ECHO_FILE
=$(<:f
)
888 RSCUPDVER
=$(RSCREVISION
)
889 RSCUPDVERDEF
=-DUPDVER
="$(RSCUPDVER)"
892 RSCDEFS
=-D
$(GUI
) -D
$(COM
) $(JAVADEF
)
894 RSCDEFIMG
*=icon-themes
/galaxy
902 # settings for mozilla idl compiler
906 # alle bisher verwendeten Linker benutzen + um LIBs auf der naechsten Zeile
907 # weiter zu schreiben, wenn es da eine Ausnahme geben sollte, muss
908 # LINKEXTENDLINE compilerabhaengig definiert werden
911 LNT
=$(DEVROOT
)/lint
/lint
912 #LNTFLAGS=+v -i$(DEVROOT)/lint\ -mL options.lnt -u
913 LNTFLAGS
=+v
-i
$(DEVROOT
)/lint
/ -mL options.lnt
-u
920 .IF
"$(GUI)" == "UNX"
926 .IF
"$(CROSS_COMPILING)" == "YES"
927 # Assume always cross-compiling from Unix
930 EXECPOST_FOR_BUILD
=$(EXECPOST
)
933 .IF
"$(OOO_LIBRARY_PATH_VAR)" != ""
934 # Add SOLARLIBDIR at the begin of a (potentially previously undefined) library
935 # path (LD_LIBRARY_PATH, PATH, etc.; prepending avoids fetching libraries from
936 # an existing office/URE installation; the ": &&" enables this to work at the
937 # start of a recipe line that is not prefixed by "+" as well as in the middle of
938 # an existing && chain:
939 .IF
"$(CROSS_COMPILING)"=="YES" && "$(OS)"=="WNT"
940 # Sigh, special-case cross-compiling to Windows. Here OOO_LIBRARY_PATH_VAR is the correct one
941 # for the BUILD platform but SOLARSHAREDBIN is the one for Windows, i.e. "foo/bin".
942 AUGMENT_LIBRARY_PATH
= : && \
943 $(OOO_LIBRARY_PATH_VAR
)=$(normpath
, $(SOLARLIBDIR_FOR_BUILD
))$${{$(OOO_LIBRARY_PATH_VAR
):+:$${{$(OOO_LIBRARY_PATH_VAR
)}}}}
944 AUGMENT_LIBRARY_PATH_LOCAL
= : && \
945 $(OOO_LIBRARY_PATH_VAR
)=$(normpath
, $(PWD
)/$(DLLDEST
)):$(normpath
, $(SOLARSHAREDBIN
))$${{$(OOO_LIBRARY_PATH_VAR
):+:$${{$(OOO_LIBRARY_PATH_VAR
)}}}}
947 AUGMENT_LIBRARY_PATH
= : && \
948 $(OOO_LIBRARY_PATH_VAR
)=$(normpath
, $(SOLARSHAREDBIN
))$${{$(OOO_LIBRARY_PATH_VAR
):+:$${{$(OOO_LIBRARY_PATH_VAR
)}}}}
949 AUGMENT_LIBRARY_PATH_LOCAL
= : && \
950 $(OOO_LIBRARY_PATH_VAR
)=$(normpath
, $(PWD
)/$(DLLDEST
)):$(normpath
, $(SOLARSHAREDBIN
))$${{$(OOO_LIBRARY_PATH_VAR
):+:$${{$(OOO_LIBRARY_PATH_VAR
)}}}}
954 # for multiprocess building in external modules
955 # allow seperate handling
956 EXTMAXPROCESS
*=$(MAXPROCESS
)
958 GDBTRACE
=gdb
-nx
--command
=$(SOLARENV
)/bin
/gdbtrycatchtrace
--args
960 #use with export VALGRIND=memcheck, that method of invocation is used because
961 #hunspell will also run its own unit tests under valgrind when this variable is
963 .IF
"$(VALGRIND)" != ""
964 VALGRINDTOOL
=valgrind
--tool
=$(VALGRIND
) --num-callers
=50
965 .IF
"$(VALGRIND)" == "memcheck"
966 G_SLICE
*:=always-malloc
968 GLIBCXX_FORCE_NEW
*:=1
969 .EXPORT
: GLIBCXX_FORCE_NEW
973 IDLC
*=$(AUGMENT_LIBRARY_PATH
) $(SOLARBINDIR
)/idlc
974 REGMERGE
*=$(AUGMENT_LIBRARY_PATH
) $(VALGRINDTOOL
) $(SOLARBINDIR
)/regmerge
975 REGCOMPARE
*=$(AUGMENT_LIBRARY_PATH
) $(VALGRINDTOOL
) $(SOLARBINDIR
)/regcompare
977 .IF
"$(DEBUGREGCOMP)" != "" ||
"$(debugregcomp)" != ""
978 GDBREGCOMPTRACE
=$(GDBTRACE
)
981 REGCOMP
*=$(AUGMENT_LIBRARY_PATH_LOCAL
) $(GDBREGCOMPTRACE
) $(SOLARBINDIR
)/regcomp
982 CPPUMAKER
*=$(AUGMENT_LIBRARY_PATH
) $(SOLARBINDIR
)/cppumaker
983 JAVAMAKER
*=$(AUGMENT_LIBRARY_PATH
) $(SOLARBINDIR
)/javamaker
984 RDBMAKER
*=$(AUGMENT_LIBRARY_PATH
) $(SOLARBINDIR
)/rdbmaker
985 CLIMAKER
*=$(AUGMENT_LIBRARY_PATH
) $(SOLARBINDIR
)/climaker
987 .IF
"$(DEBUGCPPUNIT)" != "" ||
"$(debugcppunit)" != ""
988 GDBCPPUNITTRACE
=$(GDBTRACE
)
991 .IF
"$(CROSS_COMPILING)" == "YES"
994 CPPUNITTESTER
=$(AUGMENT_LIBRARY_PATH_LOCAL
) $(GDBCPPUNITTRACE
) $(VALGRINDTOOL
) $(SOLARBINDIR
)/cppunit
/cppunittester
996 HELPEX
=$(AUGMENT_LIBRARY_PATH
) $(SOLARBINDIR
)/helpex
997 LNGCONVEX
=$(AUGMENT_LIBRARY_PATH
) $(SOLARBINDIR
)/lngconvex
998 HELPLINKER
=$(AUGMENT_LIBRARY_PATH
) $(SOLARBINDIR
)/HelpLinker
999 HELPINDEXER
=$(AUGMENT_LIBRARY_PATH
) $(SOLARBINDIR
)/HelpIndexer
1001 .IF
"$(JAVAINTERPRETER)" == ""
1004 JAVA
*:=$(JAVAINTERPRETER
)
1006 .EXPORT
: JAVA JAVAI
1008 # Define SCPCOMP without wrapper because pre2par.pl chokes on DOS style
1009 # paths. (See iz57443)
1010 SCPCOMP
=$(PERL
) $(SOLARENV
)/bin
/pre2par.pl
1011 SCPLINK
=$(PERL
) $(SOLARENV
)/bin
/par2script.pl
1014 # Note that $(CPPLCC) is oddly enough only used when $(OS)==WNT, see pstrules.mk.
1015 # For the BUILD platform when cross-compiling (always Unix), it is called cpp.lcc
1016 .IF
"$(CROSS_COMPILING)" == "YES"
1017 CPPLCC
*=$(AUGMENT_LIBRARY_PATH
) $(SOLARBINDIR
)/cpp.lcc
1019 CPPLCC
*=$(AUGMENT_LIBRARY_PATH
) $(SOLARBINDIR
)/cpplcc
1022 .IF
"$(DISABLE_ENHANCED_COMID)"==""
1023 .INCLUDE
: tg_compv.mk
1024 .ELSE
# "$(DISABLE_ENHANCED_COMID)"==""
1026 .ENDIF
# "$(DISABLE_ENHANCED_COMID)"==""
1027 .IF
"$(SOLAR_JAVA)"=="TRUE"
1028 .IF
"$(USE_JAVAVER)"!=""
1029 .INCLUDE
: tg_javav.mk
1030 .ENDIF
"$(USE_JAVAVER)"!=""
1031 .ENDIF
# "$(SOLAR_JAVA)"=="TRUE"
1033 # --- extend new environment ----------------------------------
1034 CDEFS
+= -DSUPD
=$(UPD
)
1036 # flags to enable build with symbols; required for crashdump feature
1037 .IF
("$(ENABLE_CRASHDUMP)"!="" && "$(ENABLE_CRASHDUMP)"!="DUMMY") ||
("$(ENABLE_DEBUG)"!="" && "$(ENABLE_DEBUG)"!="FALSE")
1038 # if debug is enabled, this may enable less debug info than debug, so rely just on debug
1039 .IF
"$(debug)" == ""
1040 CFLAGSENABLESYMBOLS_CC_ONLY
*=$(CFLAGSENABLESYMBOLS
)
1041 CFLAGSCXX
+=$(CFLAGSENABLESYMBOLS
)
1042 CFLAGSCC
+=$(CFLAGSENABLESYMBOLS_CC_ONLY
)
1043 .ENDIF
# "$(DEBUG)" == ""
1044 .ENDIF
# ("$(ENABLE_CRASHDUMP)"!="" && "$(ENABLE_CRASHDUMP)"!="DUMMY") || "$(ENABLE_DEBUG)"!=""
1049 .IF
"$(CXXFLAGS)"!=""
1050 CFLAGSCXX
+=$(CXXFLAGS
)
1053 .IF
"$(profile)"!=""
1054 CDEFS
+= $(CDEFSPROF
)
1055 CFLAGS
+= $(CFLAGSPROF
)
1057 LINKFLAGS
=$(LINKFLAGSWST
)
1058 LINKCFLAGS
=$(LINKFLAGSWST
)
1060 LINKFLAGSADD
+=$(LINKFLAGSPROF
)
1065 JAVAFLAGS
+=$(JAVAFLAGSDEBUG
)
1066 CDEFS
+= $(CDEFSDEBUG
)
1067 CFLAGS
+= $(CFLAGSDEBUG
)
1068 LINKFLAGSADD
+= $(LINKFLAGSDEBUG
)
1071 .IF
"$(dbgutil)"!=""
1072 CDEFS
+=$(CDEFSDBGUTIL
)
1073 CFLAGS
+=$(CFLAGSDBGUTIL
)
1077 .IF
"$(product)"!=""
1080 .IF
"$(ASSERT_ALWAYS_ABORT)"=="FALSE"
1086 .IF
"$(DBG_LEVEL)"!=""
1087 CDEFS
+=-DOSL_DEBUG_LEVEL
=$(DBG_LEVEL
)
1088 RSCDEFS
+=-DOSL_DEBUG_LEVEL
=$(DBG_LEVEL
)
1089 .IF
"$(DBG_LEVEL)"!="0"
1090 CDEFS
+=-DSAL_LOG_INFO
-DSAL_LOG_WARN
1094 .IF
"$(optimize)"!=""
1096 CFLAGS
+=$(CFLAGSOPT
)
1097 LINKFLAGSADD
+=$(LINKFLAGSOPT
)
1099 CFLAGS
+=$(CFLAGSNOOPT
)
1102 .IF
"$(ENABLE_EXCEPTIONS)"!=""
1103 GLOBAL_EXCEPTIONS_FLAGS
+=$(CFLAGSEXCEPTIONS
)
1104 GLOBAL_EXCEPTIONS_FLAGS
+=-DEXCEPTIONS_ON
1106 GLOBAL_EXCEPTIONS_FLAGS
+=$(CFLAGS_NO_EXCEPTIONS
)
1107 GLOBAL_EXCEPTIONS_FLAGS
+=-DEXCEPTIONS_OFF
1109 # used if an object appears in the EXCEPTIONSFILES list
1111 LOCAL_EXCEPTIONS_FLAGS
+=$(CFLAGSEXCEPTIONS
)
1112 LOCAL_EXCEPTIONS_FLAGS
+=-DEXCEPTIONS_ON
1114 .IF
"$(ENABLE_GSTREAMER)" == "TRUE"
1118 .IF
"$(HAVE_THREADSAFE_STATICS)" == "TRUE"
1119 CDEFS
+= -DHAVE_THREADSAFE_STATICS
1122 .IF
"$(DISABLE_DYNLOADING)" == "TRUE"
1123 CDEFS
+= -DDISABLE_DYNLOADING
1126 CDEFS
+= -DRTL_USING
1128 # compose flags and defines for GUI
1129 .IF
"$(TARGETTYPE)"=="GUI"
1130 CFLAGSSLO
+=$(CFLAGSSLOGUIMT
)
1131 CDEFSSLO
+=$(CDEFSSLOMT
)
1132 LINKFLAGSAPP
=$(LINKFLAGSAPPGUI
)
1133 LINKFLAGSSHL
=$(LINKFLAGSSHLGUI
)
1137 CDEFSOBJ
+= $(CDEFSMT
) $(CDEFSOBJMT
)
1138 CFLAGSOBJ
+=$(CFLAGSOBJGUIMT
)
1139 STDLIB
=$(STDLIBGUIMT
)
1140 STDSHL
=$(STDSHLGUIMT
)
1144 # compose flags and defines for CUI
1145 .IF
"$(TARGETTYPE)" == "CUI" ||
"$(TARGETTYPE)"=="cui"
1146 CFLAGSSLO
+=$(CFLAGSSLOCUIMT
)
1147 CDEFSSLO
+=$(CDEFSSLOMT
)
1148 LINKFLAGSAPP
=$(LINKFLAGSAPPCUI
)
1149 LINKFLAGSSHL
=$(LINKFLAGSSHLCUI
)
1153 CDEFSOBJ
+=$(CDEFSMT
) $(CDEFSOBJMT
)
1154 CFLAGSOBJ
+=$(CFLAGSOBJCUIMT
)
1155 STDLIB
=$(STDLIBCUIMT
)
1156 STDSHL
=$(STDSHLCUIMT
)
1162 # fill up unresolved symbols not found else where
1163 .IF
"$(FILLUPARC)"!=""
1164 STDLIB
+=$(FILLUPARC
)
1165 STDSHL
+=$(FILLUPARC
)
1166 .ENDIF
# "$(FILUPARC)"!=""
1168 .IF
"$(SOLAR_JAVA)"!=""
1170 .ENDIF
# "$(SOLAR_JAVA)"!=""
1172 .INCLUDE .IGNORE
: $(UPD
)$(LAST_MINOR
).mk
1174 # Once all modules on a given platform compile without warnings, the specific
1175 # .mk file for that platform should set COMPILER_WARN_ERRORS=TRUE and no longer
1176 # set MODULES_WITH_WARNINGS, and once no platform sets MODULES_WITH_WARNINGS any
1177 # longer, this code can go away:
1178 .IF
"$(MODULES_WITH_WARNINGS)" == ""
1179 COMPILER_WARN_ERRORS
=TRUE
1181 MODULES_WITH_WARNINGS_1
:= $(foreach,i
,$(MODULES_WITH_WARNINGS
) .
$(i
).
)
1182 MODULES_WITH_WARNINGS_2
:= $(subst,.
$(PRJNAME
).
, $(MODULES_WITH_WARNINGS_1
))
1183 .IF
"$(MODULES_WITH_WARNINGS_1)" == "$(MODULES_WITH_WARNINGS_2)"
1184 COMPILER_WARN_ERRORS
=TRUE
1188 CFLAGSWARNCXX
*= $(CFLAGSWARNCC
)
1189 CFLAGSWALLCXX
*= $(CFLAGSWALLCC
)
1190 CFLAGSWERRCXX
*= $(CFLAGSWERRCC
)
1192 .IF
"$(ENVWARNFLAGS)"==""
1193 .IF
"$(COMPILER_WARN_ALL)"==""
1194 CFLAGSCC
+=$(CFLAGSWARNCC
)
1195 CFLAGSCXX
+=$(CFLAGSWARNCXX
)
1197 CFLAGSCC
+=$(CFLAGSWALLCC
)
1198 CFLAGSCXX
+=$(CFLAGSWALLCXX
)
1200 .IF
"$(COMPILER_WARN_ERRORS)"!="" && "$(EXTERNAL_WARNINGS_NOT_ERRORS)"=="FALSE"
1201 CFLAGSCC
+=$(CFLAGSWERRCC
)
1202 CFLAGSCXX
+=$(CFLAGSWERRCXX
)
1204 .ELSE
# "$(ENVWARNFLAGS)"==""
1205 CFLAGSAPPEND
+=$(ENVWARNFLAGS
)
1206 .ENDIF
# "$(ENVWARNFLAGS)"==""
1210 CFLAGS
+= $(CFLAGSCALL
) $(ENVCFLAGS
)
1211 CFLAGSCXX
+= $(ENVCFLAGSCXX
)
1212 # andersrum wg. -TPxxxx
1213 CFLAGSINCXX
+:=$(ENVCFLAGSINCXX
)
1214 LIBFLAGS
+= $(ENVLIBFLAGS
)
1215 LINKFLAGSADD
+= $(ENVLINKFLAGS
)
1216 RSCFLAGS
+= $(ENVRSCFLAGS
)
1217 RSCDEFS
+= $(ENVRSCDEFS
)
1218 # RSCLINKFLAGS+= $(ENVRSCLINKFLAGS)
1219 RCFLAGS
+= $(ENVRCFLAGS
)
1220 RCLINKFLAGS
+= $(ENVRCLINKFLAGS
)
1222 LINKFLAGSRUNPATH_URELIB
*=
1223 LINKFLAGSRUNPATH_UREBIN
*=
1224 LINKFLAGSRUNPATH_OOO
*=
1225 LINKFLAGSRUNPATH_SDKBIN
*=
1226 LINKFLAGSRUNPATH_OXT
*=
1227 LINKFLAGSRUNPATH_NONE
*=
1229 # make sure both linker variables are set
1231 LINKCFLAGS
*=$(LINKFLAGS
)
1232 LINKFLAGS
+=$(LINKFLAGSADD
)
1233 LINKCFLAGS
+=$(LINKFLAGSADD
)
1235 #defaults for UCR HEADER
1237 UNOUCROUT
*=$(OUT
)/inc
/$(TARGET
)
1238 INCPRE
+=-I
$(UNOUCROUT
)
1239 UNOUCRRDB
*=$(SOLARBINDIR
)/types.rdb
1241 # location of trustedinfo.manifest for Windows Vista
1243 TRUSTED_MANIFEST_LOCATION
*=$(SOLARENV
)/inc
1244 .ENDIF
# "$(COM)"=="MSC"
1246 # --- Compiler -----------------------------------------------------
1249 # some place to define these jars for SO environment
1250 XML_APIS_JAR
*=$(SOLARBINDIR
)/xml-apis.jar
1251 XERCES_JAR
*=$(SOLARBINDIR
)/xercesImpl.jar
1253 .IF
"$(SYSTEM_CPPUNIT)" != "YES"
1257 .IF
"$(DISABLE_DYNLOADING)" == "TRUE"
1258 COMPONENTPREFIX_URE_NATIVE
=
1259 COMPONENTPREFIX_BASIS_NATIVE
=
1260 COMPONENTPREFIX_INBUILD_NATIVE
=
1262 COMPONENTPREFIX_URE_NATIVE
= vnd.sun.star.expand
:$$URE_INTERNAL_LIB_DIR/
1263 COMPONENTPREFIX_BASIS_NATIVE
= vnd.sun.star.expand
:$$LO_LIB_DIR/
1264 COMPONENTPREFIX_INBUILD_NATIVE
= vnd.sun.star.expand
:$$LO_LIB_DIR/
1266 COMPONENTPREFIX_URE_JAVA
= vnd.sun.star.expand
:$$URE_INTERNAL_JAVA_DIR/
1267 COMPONENTPREFIX_BASIS_JAVA
= vnd.sun.star.expand
:$$LO_JAVA_DIR/
1268 COMPONENTPREFIX_BASIS_PYTHON
= vnd.openoffice.pymodule
:
1269 COMPONENTPREFIX_INBUILD_JAVA
= vnd.sun.star.expand
:$$LO_JAVA_DIR/
1270 COMPONENTPREFIX_EXTENSION
= .
/
1272 # workaround for strange dmake bug:
1273 # if the previous block was a rule or a target, "\#" isn't recognized
1274 # as an escaped "#". if it was an assignment, escaping works...
1275 some_unique_variable_name
:=1