1#************************************************************************* 2# 3# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4# 5# Copyright 2000, 2010 Oracle and/or its affiliates. 6# 7# OpenOffice.org - a multi-platform office productivity suite 8# 9# This file is part of OpenOffice.org. 10# 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. 14# 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). 20# 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. 25# 26#************************************************************************* 27 28PRJ=..$/.. 29 30PRJNAME=sal 31TARGET=cpprtl 32ENABLE_EXCEPTIONS=TRUE 33USE_LDUMP2=TRUE 34 35PROJECTPCH4DLL=TRUE 36PROJECTPCH=cont_pch 37PROJECTPCHSOURCE=cont_pch 38 39.IF "$(GUI)" == "OS2" 40STL_OS2_BUILDING=1 41.ENDIF 42 43TARGETTYPE=CUI 44 45# --- Settings ----------------------------------------------------- 46 47.INCLUDE : settings.mk 48 49.IF "$(VALGRIND_CFLAGS)" != "" 50CFLAGS += $(VALGRIND_CFLAGS) 51CDEFS += -DHAVE_MEMCHECK_H=1 52.ENDIF # VALGRIND_CFLAGS 53 54.IF "$(ALLOC)" == "SYS_ALLOC" || "$(ALLOC)" == "TCMALLOC" || "$(ALLOC)" == "JEMALLOC" 55CDEFS+= -DFORCE_SYSALLOC 56.ENDIF 57 58CFLAGS+= $(LFS_CFLAGS) 59CXXFLAGS+= $(LFS_CFLAGS) 60 61# --- Files -------------------------------------------------------- 62 63# safe that way: gen_makefile doesn't want it, 64# no other link target here 65UWINAPILIB:= 66 67.IF "$(header)" == "" 68 69ALWAYSDBGFILES=$(SLO)$/debugprint.obj 70 71.IF "$(ALWAYSDBGFILES)" != "" 72ALWAYSDBGTARGET=do_it_alwaysdebug 73.ENDIF 74 75SLOFILES= \ 76 $(SLO)$/memory.obj \ 77 $(SLO)$/cipher.obj \ 78 $(SLO)$/crc.obj \ 79 $(SLO)$/digest.obj \ 80 $(SLO)$/random.obj \ 81 $(SLO)$/locale.obj \ 82 $(SLO)$/strimp.obj \ 83 $(SLO)$/hash.obj \ 84 $(SLO)$/string.obj \ 85 $(SLO)$/ustring.obj \ 86 $(SLO)$/strbuf.obj \ 87 $(SLO)$/ustrbuf.obj \ 88 $(SLO)$/uuid.obj \ 89 $(SLO)$/rtl_process.obj \ 90 $(SLO)$/byteseq.obj \ 91 $(SLO)$/uri.obj \ 92 $(SLO)$/bootstrap.obj \ 93 $(SLO)$/cmdargs.obj \ 94 $(SLO)$/unload.obj \ 95 $(SLO)$/logfile.obj \ 96 $(SLO)$/tres.obj \ 97 $(SLO)$/debugprint.obj \ 98 $(SLO)$/math.obj \ 99 $(SLO)$/alloc_global.obj\ 100 $(SLO)$/alloc_cache.obj \ 101 $(SLO)$/alloc_arena.obj 102 103.IF "$(OS)"=="MACOSX" 104SLOFILES+=$(SLO)$/alloc_fini.obj 105.ENDIF 106 107 108#.IF "$(UPDATER)"=="YES" 109OBJFILES= \ 110 $(OBJ)$/memory.obj \ 111 $(OBJ)$/cipher.obj \ 112 $(OBJ)$/crc.obj \ 113 $(OBJ)$/digest.obj \ 114 $(OBJ)$/random.obj \ 115 $(OBJ)$/locale.obj \ 116 $(OBJ)$/strimp.obj \ 117 $(OBJ)$/hash.obj \ 118 $(OBJ)$/string.obj \ 119 $(OBJ)$/ustring.obj \ 120 $(OBJ)$/strbuf.obj \ 121 $(OBJ)$/ustrbuf.obj \ 122 $(OBJ)$/uuid.obj \ 123 $(OBJ)$/rtl_process.obj \ 124 $(OBJ)$/byteseq.obj \ 125 $(OBJ)$/uri.obj \ 126 $(OBJ)$/bootstrap.obj \ 127 $(OBJ)$/cmdargs.obj \ 128 $(OBJ)$/unload.obj \ 129 $(OBJ)$/logfile.obj \ 130 $(OBJ)$/tres.obj \ 131 $(OBJ)$/math.obj \ 132 $(OBJ)$/alloc_global.obj\ 133 $(OBJ)$/alloc_cache.obj \ 134 $(OBJ)$/alloc_arena.obj 135 136.IF "$(OS)"=="MACOSX" 137OBJFILES+=$(OBJ)$/alloc_fini.obj 138.ENDIF 139 140 141APP1TARGET=gen_makefile 142APP1OBJS=$(SLO)$/gen_makefile.obj 143APP1LIBSALCPPRT= 144APP1RPATH=NONE 145 146# --- Extra objs ---------------------------------------------------- 147 148.IF "$(OS)"=="LINUX" || "$(OS)"=="OS2" 149 150# 151# This part builds a second version of alloc.c, with 152# FORCE_SYSALLOC defined. Is later used in util/makefile.mk 153# to build a tiny replacement lib to LD_PRELOAD into the 154# office, enabling e.g. proper valgrinding. 155# 156 157SECOND_BUILD=SYSALLOC 158SYSALLOC_SLOFILES= $(SLO)$/alloc_global.obj 159SYSALLOCCDEFS+=-DFORCE_SYSALLOC 160 161.ENDIF # .IF "$(OS)"=="LINUX" 162 163#.ENDIF 164 165.ENDIF 166 167# --- Makefile snippet -------------------------------------------- 168 169# used by e.g. update info file 170BOOTSTRAPMK = $(OUT)$/inc$/rtlbootstrap.mk 171 172# --- Targets ------------------------------------------------------ 173 174.IF "$(ALWAYSDBG_FLAG)"=="" 175TARGETDEPS+=$(ALWAYSDBGTARGET) 176.ENDIF 177 178.INCLUDE : target.mk 179 180.IF "$(ALWAYSDBGTARGET)" != "" 181.IF "$(ALWAYSDBG_FLAG)" == "" 182# -------------------------------------------------- 183# - ALWAYSDBG - files always compiled with debugging 184# -------------------------------------------------- 185$(ALWAYSDBGTARGET): 186 @echo --- ALWAYSDBGFILES --- 187 @dmake $(MFLAGS) $(MAKEFILE) debug=true $(ALWAYSDBGFILES) ALWAYSDBG_FLAG=TRUE $(CALLMACROS) 188 @echo --- ALWAYSDBGFILES OVER --- 189 190$(ALWAYSDBGFILES): 191 @echo --- ALWAYSDBG --- 192 @dmake $(MFLAGS) $(MAKEFILE) debug=true ALWAYSDBG_FLAG=TRUE $(CALLMACROS) $@ 193 @echo --- ALWAYSDBG OVER --- 194 195.ENDIF 196.ENDIF 197 198 199ALLTAR : $(BOOTSTRAPMK) 200 201$(BOOTSTRAPMK) : $(APP1TARGETN) 202 $(AUGMENT_LIBRARY_PATH) $< > $@ 203 204