xref: /aoo41x/main/sal/rtl/source/makefile.mk (revision 7871dc3e)
1*7871dc3eSAndrew Rist#**************************************************************
2*7871dc3eSAndrew Rist#
3*7871dc3eSAndrew Rist#  Licensed to the Apache Software Foundation (ASF) under one
4*7871dc3eSAndrew Rist#  or more contributor license agreements.  See the NOTICE file
5*7871dc3eSAndrew Rist#  distributed with this work for additional information
6*7871dc3eSAndrew Rist#  regarding copyright ownership.  The ASF licenses this file
7*7871dc3eSAndrew Rist#  to you under the Apache License, Version 2.0 (the
8*7871dc3eSAndrew Rist#  "License"); you may not use this file except in compliance
9*7871dc3eSAndrew Rist#  with the License.  You may obtain a copy of the License at
10*7871dc3eSAndrew Rist#
11*7871dc3eSAndrew Rist#    http://www.apache.org/licenses/LICENSE-2.0
12*7871dc3eSAndrew Rist#
13*7871dc3eSAndrew Rist#  Unless required by applicable law or agreed to in writing,
14*7871dc3eSAndrew Rist#  software distributed under the License is distributed on an
15*7871dc3eSAndrew Rist#  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16*7871dc3eSAndrew Rist#  KIND, either express or implied.  See the License for the
17*7871dc3eSAndrew Rist#  specific language governing permissions and limitations
18*7871dc3eSAndrew Rist#  under the License.
19*7871dc3eSAndrew Rist#
20*7871dc3eSAndrew Rist#**************************************************************
21*7871dc3eSAndrew Rist
22*7871dc3eSAndrew Rist
23cdf0e10cSrcweir
24cdf0e10cSrcweirPRJ=..$/..
25cdf0e10cSrcweir
26cdf0e10cSrcweirPRJNAME=sal
27cdf0e10cSrcweirTARGET=cpprtl
28cdf0e10cSrcweirENABLE_EXCEPTIONS=TRUE
29cdf0e10cSrcweirUSE_LDUMP2=TRUE
30cdf0e10cSrcweir
31cdf0e10cSrcweirPROJECTPCH4DLL=TRUE
32cdf0e10cSrcweirPROJECTPCH=cont_pch
33cdf0e10cSrcweirPROJECTPCHSOURCE=cont_pch
34cdf0e10cSrcweir
35cdf0e10cSrcweir.IF "$(GUI)" == "OS2"
36cdf0e10cSrcweirSTL_OS2_BUILDING=1
37cdf0e10cSrcweir.ENDIF
38cdf0e10cSrcweir
39cdf0e10cSrcweirTARGETTYPE=CUI
40cdf0e10cSrcweir
41cdf0e10cSrcweir# --- Settings -----------------------------------------------------
42cdf0e10cSrcweir
43cdf0e10cSrcweir.INCLUDE :  settings.mk
44cdf0e10cSrcweir
45cdf0e10cSrcweir.IF "$(VALGRIND_CFLAGS)" != ""
46cdf0e10cSrcweirCFLAGS += $(VALGRIND_CFLAGS)
47cdf0e10cSrcweirCDEFS  += -DHAVE_MEMCHECK_H=1
48cdf0e10cSrcweir.ENDIF # VALGRIND_CFLAGS
49cdf0e10cSrcweir
50cdf0e10cSrcweir.IF "$(ALLOC)" == "SYS_ALLOC" || "$(ALLOC)" == "TCMALLOC" || "$(ALLOC)" == "JEMALLOC"
51cdf0e10cSrcweirCDEFS+= -DFORCE_SYSALLOC
52cdf0e10cSrcweir.ENDIF
53cdf0e10cSrcweir
54cdf0e10cSrcweirCFLAGS+= $(LFS_CFLAGS)
55cdf0e10cSrcweirCXXFLAGS+= $(LFS_CFLAGS)
56cdf0e10cSrcweir
57cdf0e10cSrcweir# --- Files --------------------------------------------------------
58cdf0e10cSrcweir
59cdf0e10cSrcweir# safe that way: gen_makefile doesn't want it,
60cdf0e10cSrcweir# no other link target here
61cdf0e10cSrcweirUWINAPILIB:=
62cdf0e10cSrcweir
63cdf0e10cSrcweir.IF "$(header)" == ""
64cdf0e10cSrcweir
65cdf0e10cSrcweirALWAYSDBGFILES=$(SLO)$/debugprint.obj
66cdf0e10cSrcweir
67cdf0e10cSrcweir.IF "$(ALWAYSDBGFILES)" != ""
68cdf0e10cSrcweirALWAYSDBGTARGET=do_it_alwaysdebug
69cdf0e10cSrcweir.ENDIF
70cdf0e10cSrcweir
71cdf0e10cSrcweirSLOFILES=   \
72cdf0e10cSrcweir            $(SLO)$/memory.obj      \
73cdf0e10cSrcweir            $(SLO)$/cipher.obj      \
74cdf0e10cSrcweir            $(SLO)$/crc.obj         \
75cdf0e10cSrcweir            $(SLO)$/digest.obj      \
76cdf0e10cSrcweir            $(SLO)$/random.obj      \
77cdf0e10cSrcweir            $(SLO)$/locale.obj      \
78cdf0e10cSrcweir            $(SLO)$/strimp.obj      \
79cdf0e10cSrcweir            $(SLO)$/hash.obj        \
80cdf0e10cSrcweir            $(SLO)$/string.obj      \
81cdf0e10cSrcweir            $(SLO)$/ustring.obj     \
82cdf0e10cSrcweir            $(SLO)$/strbuf.obj      \
83cdf0e10cSrcweir            $(SLO)$/ustrbuf.obj     \
84cdf0e10cSrcweir            $(SLO)$/uuid.obj        \
85cdf0e10cSrcweir            $(SLO)$/rtl_process.obj \
86cdf0e10cSrcweir            $(SLO)$/byteseq.obj     \
87cdf0e10cSrcweir            $(SLO)$/uri.obj			\
88cdf0e10cSrcweir            $(SLO)$/bootstrap.obj  	\
89cdf0e10cSrcweir            $(SLO)$/cmdargs.obj		\
90cdf0e10cSrcweir            $(SLO)$/unload.obj		\
91cdf0e10cSrcweir            $(SLO)$/logfile.obj     \
92cdf0e10cSrcweir            $(SLO)$/tres.obj        \
93cdf0e10cSrcweir            $(SLO)$/debugprint.obj  \
94cdf0e10cSrcweir            $(SLO)$/math.obj        \
95cdf0e10cSrcweir            $(SLO)$/alloc_global.obj\
96cdf0e10cSrcweir            $(SLO)$/alloc_cache.obj \
97cdf0e10cSrcweir            $(SLO)$/alloc_arena.obj
98cdf0e10cSrcweir
99cdf0e10cSrcweir.IF "$(OS)"=="MACOSX"
100cdf0e10cSrcweirSLOFILES+=$(SLO)$/alloc_fini.obj
101cdf0e10cSrcweir.ENDIF
102cdf0e10cSrcweir
103cdf0e10cSrcweir
104cdf0e10cSrcweir#.IF "$(UPDATER)"=="YES"
105cdf0e10cSrcweirOBJFILES=   \
106cdf0e10cSrcweir            $(OBJ)$/memory.obj      \
107cdf0e10cSrcweir            $(OBJ)$/cipher.obj      \
108cdf0e10cSrcweir            $(OBJ)$/crc.obj         \
109cdf0e10cSrcweir            $(OBJ)$/digest.obj      \
110cdf0e10cSrcweir            $(OBJ)$/random.obj      \
111cdf0e10cSrcweir            $(OBJ)$/locale.obj      \
112cdf0e10cSrcweir            $(OBJ)$/strimp.obj      \
113cdf0e10cSrcweir            $(OBJ)$/hash.obj        \
114cdf0e10cSrcweir            $(OBJ)$/string.obj      \
115cdf0e10cSrcweir            $(OBJ)$/ustring.obj     \
116cdf0e10cSrcweir            $(OBJ)$/strbuf.obj      \
117cdf0e10cSrcweir            $(OBJ)$/ustrbuf.obj     \
118cdf0e10cSrcweir            $(OBJ)$/uuid.obj        \
119cdf0e10cSrcweir            $(OBJ)$/rtl_process.obj \
120cdf0e10cSrcweir            $(OBJ)$/byteseq.obj     \
121cdf0e10cSrcweir            $(OBJ)$/uri.obj			\
122cdf0e10cSrcweir            $(OBJ)$/bootstrap.obj  	\
123cdf0e10cSrcweir            $(OBJ)$/cmdargs.obj		\
124cdf0e10cSrcweir            $(OBJ)$/unload.obj		\
125cdf0e10cSrcweir            $(OBJ)$/logfile.obj     \
126cdf0e10cSrcweir            $(OBJ)$/tres.obj        \
127cdf0e10cSrcweir            $(OBJ)$/math.obj \
128cdf0e10cSrcweir            $(OBJ)$/alloc_global.obj\
129cdf0e10cSrcweir            $(OBJ)$/alloc_cache.obj \
130cdf0e10cSrcweir            $(OBJ)$/alloc_arena.obj
131cdf0e10cSrcweir
132cdf0e10cSrcweir.IF "$(OS)"=="MACOSX"
133cdf0e10cSrcweirOBJFILES+=$(OBJ)$/alloc_fini.obj
134cdf0e10cSrcweir.ENDIF
135cdf0e10cSrcweir
136cdf0e10cSrcweir
137cdf0e10cSrcweirAPP1TARGET=gen_makefile
138cdf0e10cSrcweirAPP1OBJS=$(SLO)$/gen_makefile.obj
139cdf0e10cSrcweirAPP1LIBSALCPPRT=
140cdf0e10cSrcweirAPP1RPATH=NONE
141cdf0e10cSrcweir
142cdf0e10cSrcweir# --- Extra objs ----------------------------------------------------
143cdf0e10cSrcweir
144cdf0e10cSrcweir.IF "$(OS)"=="LINUX" || "$(OS)"=="OS2"
145cdf0e10cSrcweir
146cdf0e10cSrcweir#
147cdf0e10cSrcweir# This part builds a second version of alloc.c, with
148cdf0e10cSrcweir# FORCE_SYSALLOC defined. Is later used in util/makefile.mk
149cdf0e10cSrcweir# to build a tiny replacement lib to LD_PRELOAD into the
150cdf0e10cSrcweir# office, enabling e.g. proper valgrinding.
151cdf0e10cSrcweir#
152cdf0e10cSrcweir
153cdf0e10cSrcweirSECOND_BUILD=SYSALLOC
154cdf0e10cSrcweirSYSALLOC_SLOFILES=	$(SLO)$/alloc_global.obj
155cdf0e10cSrcweirSYSALLOCCDEFS+=-DFORCE_SYSALLOC
156cdf0e10cSrcweir
157cdf0e10cSrcweir.ENDIF # .IF "$(OS)"=="LINUX"
158cdf0e10cSrcweir
159cdf0e10cSrcweir#.ENDIF
160cdf0e10cSrcweir
161cdf0e10cSrcweir.ENDIF
162cdf0e10cSrcweir
163cdf0e10cSrcweir# --- Makefile snippet  --------------------------------------------
164cdf0e10cSrcweir
165cdf0e10cSrcweir# used by e.g. update info file
166cdf0e10cSrcweirBOOTSTRAPMK = $(OUT)$/inc$/rtlbootstrap.mk
167cdf0e10cSrcweir
168cdf0e10cSrcweir# --- Targets ------------------------------------------------------
169cdf0e10cSrcweir
170cdf0e10cSrcweir.IF "$(ALWAYSDBG_FLAG)"==""
171cdf0e10cSrcweirTARGETDEPS+=$(ALWAYSDBGTARGET)
172cdf0e10cSrcweir.ENDIF
173cdf0e10cSrcweir
174cdf0e10cSrcweir.INCLUDE :  target.mk
175cdf0e10cSrcweir
176cdf0e10cSrcweir.IF "$(ALWAYSDBGTARGET)" != ""
177cdf0e10cSrcweir.IF "$(ALWAYSDBG_FLAG)" == ""
178cdf0e10cSrcweir# --------------------------------------------------
179cdf0e10cSrcweir# - ALWAYSDBG - files always compiled with debugging
180cdf0e10cSrcweir# --------------------------------------------------
181cdf0e10cSrcweir$(ALWAYSDBGTARGET):
182cdf0e10cSrcweir	@echo --- ALWAYSDBGFILES ---
183cdf0e10cSrcweir	@dmake $(MFLAGS) $(MAKEFILE) debug=true $(ALWAYSDBGFILES) ALWAYSDBG_FLAG=TRUE $(CALLMACROS)
184cdf0e10cSrcweir	@echo --- ALWAYSDBGFILES OVER ---
185cdf0e10cSrcweir
186cdf0e10cSrcweir$(ALWAYSDBGFILES):
187cdf0e10cSrcweir	@echo --- ALWAYSDBG ---
188cdf0e10cSrcweir	@dmake $(MFLAGS) $(MAKEFILE) debug=true ALWAYSDBG_FLAG=TRUE $(CALLMACROS) $@
189cdf0e10cSrcweir	@echo --- ALWAYSDBG OVER ---
190cdf0e10cSrcweir
191cdf0e10cSrcweir.ENDIF
192cdf0e10cSrcweir.ENDIF
193cdf0e10cSrcweir
194cdf0e10cSrcweir
195cdf0e10cSrcweirALLTAR : $(BOOTSTRAPMK)
196cdf0e10cSrcweir
197cdf0e10cSrcweir$(BOOTSTRAPMK) : $(APP1TARGETN)
198cdf0e10cSrcweir	$(AUGMENT_LIBRARY_PATH) $< > $@
199cdf0e10cSrcweir
200