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