1 #*************************************************************************
3 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 # Copyright 2008 by Sun Microsystems, Inc.
7 # OpenOffice.org - a multi-platform office productivity suite
9 # $RCSfile: makefile.mk,v $
13 # This file is part of OpenOffice.org.
15 # OpenOffice.org is free software: you can redistribute it and/or modify
16 # it under the terms of the GNU Lesser General Public License version 3
17 # only, as published by the Free Software Foundation.
19 # OpenOffice.org is distributed in the hope that it will be useful,
20 # but WITHOUT ANY WARRANTY; without even the implied warranty of
21 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22 # GNU Lesser General Public License version 3 for more details
23 # (a copy is included in the LICENSE file that accompanied this code).
25 # You should have received a copy of the GNU Lesser General Public License
26 # version 3 along with OpenOffice.org. If not, see
27 # <http://www.openoffice.org/license.html>
28 # for a copy of the LGPLv3 License.
30 #*************************************************************************
36 ENABLE_EXCEPTIONS
=TRUE
41 PROJECTPCHSOURCE
=cont_pch
49 # --- Settings -----------------------------------------------------
51 .INCLUDE
: settings.mk
53 .IF
"$(ALLOC)" == "SYS_ALLOC" ||
"$(ALLOC)" == "TCMALLOC"
54 CDEFS
+= -DFORCE_SYSALLOC
57 CFLAGS
+= $(LFS_CFLAGS
)
58 CXXFLAGS
+= $(LFS_CFLAGS
)
60 # --- Files --------------------------------------------------------
62 # safe that way: gen_makefile doesn't want it,
63 # no other link target here
68 ALWAYSDBGFILES
=$(SLO
)$/debugprint.obj
70 .IF
"$(ALWAYSDBGFILES)" != ""
71 ALWAYSDBGTARGET
=do_it_alwaysdebug
88 $(SLO
)$/rtl_process.obj \
91 $(SLO
)$/bootstrap.obj \
96 $(SLO
)$/debugprint.obj \
98 $(SLO
)$/alloc_global.obj\
99 $(SLO
)$/alloc_cache.obj \
100 $(SLO
)$/alloc_arena.obj
102 .IF
"$(OS)"=="MACOSX"
103 SLOFILES
+=$(SLO
)$/memory_fini.obj
107 #.IF "$(UPDATER)"=="YES"
118 $(OBJ
)$/ustring.obj \
120 $(OBJ
)$/ustrbuf.obj \
122 $(OBJ
)$/rtl_process.obj \
123 $(OBJ
)$/byteseq.obj \
125 $(OBJ
)$/bootstrap.obj \
126 $(OBJ
)$/cmdargs.obj \
128 $(OBJ
)$/logfile.obj \
131 $(OBJ
)$/alloc_global.obj\
132 $(OBJ
)$/alloc_cache.obj \
133 $(OBJ
)$/alloc_arena.obj
135 .IF
"$(OS)"=="MACOSX"
136 OBJFILES
+=$(OBJ
)$/memory_fini.obj
140 APP1TARGET
=gen_makefile
141 APP1OBJS
=$(SLO
)$/gen_makefile.obj
145 # --- Extra objs ----------------------------------------------------
147 .IF
"$(OS)"=="LINUX" ||
"$(OS)"=="OS2"
150 # This part builds a second version of alloc.c, with
151 # FORCE_SYSALLOC defined. Is later used in util/makefile.mk
152 # to build a tiny replacement lib to LD_PRELOAD into the
153 # office, enabling e.g. proper valgrinding.
156 SECOND_BUILD
=SYSALLOC
157 SYSALLOC_SLOFILES
= $(SLO
)$/alloc_global.obj
158 SYSALLOCCDEFS
+=-DFORCE_SYSALLOC
160 .ENDIF
# .IF "$(OS)"=="LINUX"
166 # --- Makefile snippet --------------------------------------------
168 # used by e.g. update info file
169 BOOTSTRAPMK
= $(OUT
)$/inc
$/rtlbootstrap.mk
171 # --- Targets ------------------------------------------------------
173 .IF
"$(ALWAYSDBG_FLAG)"==""
174 TARGETDEPS
+=$(ALWAYSDBGTARGET
)
179 .IF
"$(ALWAYSDBGTARGET)" != ""
180 .IF
"$(ALWAYSDBG_FLAG)" == ""
181 # --------------------------------------------------
182 # - ALWAYSDBG - files always compiled with debugging
183 # --------------------------------------------------
185 @echo
--- ALWAYSDBGFILES
---
186 @dmake
$(MFLAGS
) $(MAKEFILE
) debug
=true
$(ALWAYSDBGFILES
) ALWAYSDBG_FLAG
=TRUE
$(CALLMACROS
)
187 @echo
--- ALWAYSDBGFILES OVER
---
190 @echo
--- ALWAYSDBG
---
191 @dmake
$(MFLAGS
) $(MAKEFILE
) debug
=true ALWAYSDBG_FLAG
=TRUE
$(CALLMACROS
) $@
192 @echo
--- ALWAYSDBG OVER
---
198 ALLTAR
: $(BOOTSTRAPMK
)
200 $(BOOTSTRAPMK
) : $(APP1TARGETN
)
201 $(AUGMENT_LIBRARY_PATH
) $< > $@