do not compile part of shared lib RTS with -fno-PIC on Solaris
[ghc-hetmet.git] / rts / ghc.mk
1 # -----------------------------------------------------------------------------
2 #
3 # (c) 2009 The University of Glasgow
4 #
5 # This file is part of the GHC build system.
6 #
7 # To understand how the build system works and how to modify it, see
8 #      http://hackage.haskell.org/trac/ghc/wiki/Building/Architecture
9 #      http://hackage.haskell.org/trac/ghc/wiki/Building/Modifying
10 #
11 # -----------------------------------------------------------------------------
12
13 # -----------------------------------------------------------------------------
14 # Building the RTS
15
16 # We build the RTS with stage 1
17 rts_dist_HC = $(GHC_STAGE1)
18
19 # merge GhcLibWays and GhcRTSWays but strip out duplicates
20 rts_WAYS = $(GhcLibWays) $(filter-out $(GhcLibWays),$(GhcRTSWays))
21 rts_dist_WAYS = $(rts_WAYS)
22
23 ALL_RTS_LIBS = rts/dist/build/libHSrtsmain.a \
24                $(foreach way,$(rts_WAYS),rts/dist/build/libHSrts$($(way)_libsuf))
25 all_rts : $(ALL_RTS_LIBS)
26
27 # -----------------------------------------------------------------------------
28 # Defining the sources
29
30 ALL_DIRS = hooks parallel sm eventlog
31
32 ifeq "$(HOSTPLATFORM)" "i386-unknown-mingw32"
33 ALL_DIRS += win32
34 else
35 ALL_DIRS += posix
36 endif
37
38 EXCLUDED_SRCS += rts/Main.c
39 EXCLUDED_SRCS += rts/parallel/SysMan.c
40 EXCLUDED_SRCS += $(wildcard rts/Vis*.c)
41
42 rts_C_SRCS = $(filter-out $(EXCLUDED_SRCS),$(wildcard rts/*.c $(foreach dir,$(ALL_DIRS),rts/$(dir)/*.c)))
43 rts_CMM_SRCS = $(wildcard rts/*.cmm)
44
45 # Don't compile .S files when bootstrapping a new arch
46 ifneq "$(PORTING_HOST)" "YES"
47 ifneq "$(findstring $(TargetArch_CPP), powerpc powerpc64)" ""
48 rts_S_SRCS += rts/AdjustorAsm.S
49 else
50 ifneq "$(findstring $(TargetOS_CPP), darwin)" ""
51 rts_S_SRCS += rts/AdjustorAsm.S
52 endif
53 endif
54 endif
55
56 ifeq "$(GhcUnregisterised)" "YES"
57 GENAPPLY_OPTS = -u
58 endif
59
60 rts_AUTO_APPLY_CMM = rts/dist/build/AutoApply.cmm
61
62 $(rts_AUTO_APPLY_CMM): $(GENAPPLY_INPLACE)
63         "$(GENAPPLY_INPLACE)" >$@
64
65 rts/dist/build/sm/Evac_thr.c : rts/sm/Evac.c | $$(dir $$@)/.
66         cp $< $@
67 rts/dist/build/sm/Scav_thr.c : rts/sm/Scav.c | $$(dir $$@)/.
68         cp $< $@
69
70 rts_H_FILES = $(wildcard includes/*.h) $(wildcard rts/*.h)
71
72 ifeq "$(HaveDtrace)" "YES"
73 DTRACEPROBES_H = rts/dist/build/RtsProbes.h
74 rts_H_FILES += $(DTRACEPROBES_H)
75 endif
76
77 # collect the -l flags that we need to link the rts dyn lib.
78 rts/libs.depend : $(GHC_PKG_INPLACE)
79         "$(GHC_PKG_INPLACE)" field rts extra-libraries \
80           | sed -e 's/^extra-libraries: //' -e 's/\([a-z0-9]*\)[ ]*/-l\1 /g' > $@
81
82
83 # ----------------------------------------------------------------------------
84 # On Windows, as the RTS and base libraries have recursive imports,
85 #       we have to break the loop with "import libraries".
86 #       These are made from rts/win32/libHS*.def which contain lists of
87 #       all the symbols in those libraries used by the RTS.
88 #
89 ifneq "$$(findstring dyn, $1)" ""
90 ifeq  "$(HOSTPLATFORM)" "i386-unknown-mingw32" 
91
92 ALL_RTS_DEF_LIBNAMES    = base ghc-prim
93 ALL_RTS_DEF_LIBS        = \
94         rts/dist/build/win32/libHSbase.dll.a \
95         rts/dist/build/win32/libHSghc-prim.dll.a \
96         rts/dist/build/win32/libHSffi.dll.a 
97
98 # -- import libs for the regular Haskell libraries
99 define make-importlib-def # args $1 = lib name
100 rts/dist/build/win32/libHS$1.def : rts/win32/libHS$1.def
101         cat rts/win32/libHS$1.def \
102                 | sed "s/@LibVersion@/$$(libraries/$1_dist-install_VERSION)/" \
103                 | sed "s/@ProjectVersion@/$(ProjectVersion)/" \
104                 > rts/dist/build/win32/libHS$1.def
105
106 rts/dist/build/win32/libHS$1.dll.a : rts/dist/build/win32/libHS$1.def
107         "$$(DLLTOOL)"   -d rts/dist/build/win32/libHS$1.def \
108                         -l rts/dist/build/win32/libHS$1.dll.a
109 endef
110 $(foreach lib,$(ALL_RTS_DEF_LIBNAMES),$(eval $(call make-importlib-def,$(lib))))
111
112
113 # -- import libs for libffi
114 rts/dist/build/win32/libHSffi.def : rts/win32/libHSffi.def
115         cat rts/win32/libHSffi.def \
116                 | sed "s/@ProjectVersion@/$(ProjectVersion)/" \
117                 > rts/dist/build/win32/libHSffi.def
118
119 rts/dist/build/win32/libHSffi.dll.a : rts/dist/build/win32/libHSffi.def
120         "$(DLLTOOL)"    -d rts/dist/build/win32/libHSffi.def \
121                         -l rts/dist/build/win32/libHSffi.dll.a
122 endif
123 endif
124
125
126 #-----------------------------------------------------------------------------
127 # Building one way
128 define build-rts-way # args: $1 = way
129
130 ifneq "$$(BINDIST)" "YES"
131
132 # The per-way CC_OPTS
133 ifneq "$$(findstring debug, $1)" ""
134 rts_dist_$1_HC_OPTS =
135 rts_dist_$1_CC_OPTS = -g -O0
136 else
137 rts_dist_$1_HC_OPTS = $$(GhcRtsHcOpts)
138 rts_dist_$1_CC_OPTS = $$(GhcRtsCcOpts)
139 endif
140
141 ifneq "$$(findstring thr, $1)" ""
142 rts_$1_EXTRA_C_SRCS  =  rts/dist/build/sm/Evac_thr.c rts/dist/build/sm/Scav_thr.c
143 endif
144
145 $(call distdir-way-opts,rts,dist,$1)
146 $(call c-suffix-rules,rts,dist,$1,YES)
147 $(call cmm-suffix-rules,rts,dist,$1)
148 $(call hs-suffix-rules-srcdir,rts,dist,$1,$$(dir))
149 # hs-suffix-rules-srcdir is needed when BootingFromHc to get the .hc rules
150
151 rts_$1_LIB_NAME = libHSrts$$($1_libsuf)
152 rts_$1_LIB = rts/dist/build/$$(rts_$1_LIB_NAME)
153
154 rts_$1_C_OBJS   = $$(patsubst rts/%.c,rts/dist/build/%.$$($1_osuf),$$(rts_C_SRCS)) $$(patsubst %.c,%.$$($1_osuf),$$(rts_$1_EXTRA_C_SRCS))
155 rts_$1_S_OBJS   = $$(patsubst rts/%.S,rts/dist/build/%.$$($1_osuf),$$(rts_S_SRCS))
156 rts_$1_CMM_OBJS = $$(patsubst rts/%.cmm,rts/dist/build/%.$$($1_osuf),$$(rts_CMM_SRCS)) $$(patsubst %.cmm,%.$$($1_osuf),$$(rts_AUTO_APPLY_CMM))
157
158 rts_$1_OBJS = $$(rts_$1_C_OBJS) $$(rts_$1_S_OBJS) $$(rts_$1_CMM_OBJS)
159
160 rts_dist_$1_CC_OPTS += -DRtsWay=\"rts_$1\"
161
162 # Making a shared library for the RTS.
163 ifneq "$$(findstring dyn, $1)" ""
164 ifeq "$$(HOSTPLATFORM)" "i386-unknown-mingw32"
165 $$(rts_$1_LIB) : $$(rts_$1_OBJS) $$(ALL_RTS_DEF_LIBS) rts/libs.depend
166         "$$(RM)" $$(RM_OPTS) $$@
167         "$$(rts_dist_HC)" -package-name rts -shared -dynamic -dynload deploy \
168           -no-auto-link-packages `cat rts/libs.depend` $$(rts_$1_OBJS) $$(ALL_RTS_DEF_LIBS) -o $$@
169 else
170 $$(rts_$1_LIB) : $$(rts_$1_OBJS) rts/libs.depend
171         "$$(RM)" $$(RM_OPTS) $$@
172         "$$(rts_dist_HC)" -package-name rts -shared -dynamic -dynload deploy \
173           -no-auto-link-packages `cat rts/libs.depend` $$(rts_$1_OBJS) -o $$@
174 ifeq "$$(darwin_HOST_OS)" "1"
175         # Ensure library's install name is correct before anyone links with it.
176         install_name_tool -id $(ghclibdir)/$$(rts_$1_LIB_NAME) $$@
177 endif
178 endif
179 else
180 $$(rts_$1_LIB) : $$(rts_$1_OBJS)
181         "$$(RM)" $$(RM_OPTS) $$@
182         echo $$(rts_$1_OBJS) | "$$(XARGS)" $$(XARGS_OPTS) "$$(AR)" $$(AR_OPTS) $$(EXTRA_AR_ARGS) $$@
183 endif
184
185 endif
186
187 endef
188
189 # And expand the above for each way:
190 $(foreach way,$(rts_WAYS),$(eval $(call build-rts-way,$(way))))
191
192 #-----------------------------------------------------------------------------
193 # Flags for compiling every file
194
195 # We like plenty of warnings.
196 WARNING_OPTS += -Wall
197 ifeq "$(GccLT34)" "YES"
198 WARNING_OPTS += -W
199 else
200 WARNING_OPTS += -Wextra
201 endif
202 WARNING_OPTS += -Wstrict-prototypes 
203 WARNING_OPTS += -Wmissing-prototypes 
204 WARNING_OPTS += -Wmissing-declarations
205 WARNING_OPTS += -Winline
206 WARNING_OPTS += -Waggregate-return
207 WARNING_OPTS += -Wpointer-arith
208 WARNING_OPTS += -Wmissing-noreturn
209 WARNING_OPTS += -Wnested-externs
210 WARNING_OPTS += -Wredundant-decls 
211
212 # These ones are hard to avoid:
213 #WARNING_OPTS += -Wconversion
214 #WARNING_OPTS += -Wbad-function-cast
215 #WARNING_OPTS += -Wshadow
216 #WARNING_OPTS += -Wcast-qual
217
218 # This one seems buggy on GCC 4.1.2, which is the only GCC version we 
219 # have that can bootstrap the SPARC build. We end up with lots of supurious
220 # warnings of the form "cast increases required alignment of target type".
221 # Some legitimate warnings can be fixed by adding an intermediate cast to
222 # (void*), but we get others in rts/sm/GCUtils.c concerning the gct var
223 # that look innocuous to me. We could enable this again once we deprecate
224 # support for registerised builds on this arch. -- BL 2010/02/03
225 # WARNING_OPTS += -Wcast-align
226
227 STANDARD_OPTS += -Iincludes -Irts
228 # COMPILING_RTS is only used when building Win32 DLL support.
229 STANDARD_OPTS += -DCOMPILING_RTS
230
231 # HC_OPTS is included in both .c and .cmm compilations, whereas CC_OPTS is
232 # only included in .c compilations.  HC_OPTS included the WAY_* opts, which
233 # must be included in both types of compilations.
234
235 rts_CC_OPTS += $(WARNING_OPTS)
236 rts_CC_OPTS += $(STANDARD_OPTS)
237
238 rts_HC_OPTS += $(STANDARD_OPTS) -package-name rts
239
240 ifneq "$(GhcWithSMP)" "YES"
241 rts_CC_OPTS += -DNOSMP
242 rts_HC_OPTS += -optc-DNOSMP
243 endif
244
245 ifeq "$(UseLibFFIForAdjustors)" "YES"
246 rts_CC_OPTS += -DUSE_LIBFFI_FOR_ADJUSTORS
247 endif
248
249 # Mac OS X: make sure we compile for the right OS version
250 rts_CC_OPTS += $(MACOSX_DEPLOYMENT_CC_OPTS)
251 rts_HC_OPTS += $(addprefix -optc, $(MACOSX_DEPLOYMENT_CC_OPTS))
252 rts_LD_OPTS += $(addprefix -optl, $(MACOSX_DEPLOYMENT_LD_OPTS))
253
254 # We *want* type-checking of hand-written cmm.
255 rts_HC_OPTS += -dcmm-lint 
256
257 # -fno-strict-aliasing is required for the runtime, because we often
258 # use a variety of types to represent closure pointers (StgPtr,
259 # StgClosure, StgMVar, etc.), and without -fno-strict-aliasing gcc is
260 # allowed to assume that these pointers do not alias.  eg. without
261 # this flag we get problems in sm/Evac.c:copy() with gcc 3.4.3, the
262 # upd_evacee() assigments get moved before the object copy.
263 rts_CC_OPTS += -fno-strict-aliasing
264
265 rts_CC_OPTS += -fno-common
266
267 ifeq "$(BeConservative)" "YES"
268 rts_CC_OPTS += -DBE_CONSERVATIVE
269 endif
270
271 #-----------------------------------------------------------------------------
272 # Flags for compiling specific files
273
274 # If RtsMain.c is built with optimisation then the SEH exception stuff on
275 # Windows gets confused.
276 # This has to be in HC rather than CC opts, as otherwise there's a
277 # -optc-O2 that comes after it.
278 rts/RtsMain_HC_OPTS += -optc-O0
279
280 rts/RtsMessages_CC_OPTS += -DProjectVersion=\"$(ProjectVersion)\"
281 rts/RtsUtils_CC_OPTS += -DProjectVersion=\"$(ProjectVersion)\"
282 #
283 rts/RtsUtils_CC_OPTS += -DHostPlatform=\"$(HOSTPLATFORM)\"
284 rts/RtsUtils_CC_OPTS += -DHostArch=\"$(HostArch_CPP)\"
285 rts/RtsUtils_CC_OPTS += -DHostOS=\"$(HostOS_CPP)\"
286 rts/RtsUtils_CC_OPTS += -DHostVendor=\"$(HostVendor_CPP)\"
287 #
288 rts/RtsUtils_CC_OPTS += -DBuildPlatform=\"$(BUILDPLATFORM)\"
289 rts/RtsUtils_CC_OPTS += -DBuildArch=\"$(BuildArch_CPP)\"
290 rts/RtsUtils_CC_OPTS += -DBuildOS=\"$(BuildOS_CPP)\"
291 rts/RtsUtils_CC_OPTS += -DBuildVendor=\"$(BuildVendor_CPP)\"
292 #
293 rts/RtsUtils_CC_OPTS += -DTargetPlatform=\"$(TARGETPLATFORM)\"
294 rts/RtsUtils_CC_OPTS += -DTargetArch=\"$(TargetArch_CPP)\"
295 rts/RtsUtils_CC_OPTS += -DTargetOS=\"$(TargetOS_CPP)\"
296 rts/RtsUtils_CC_OPTS += -DTargetVendor=\"$(TargetVendor_CPP)\"
297 #
298 rts/RtsUtils_CC_OPTS += -DGhcUnregisterised=\"$(GhcUnregisterised)\"
299 rts/RtsUtils_CC_OPTS += -DGhcEnableTablesNextToCode=\"$(GhcEnableTablesNextToCode)\"
300
301 # Compile various performance-critical pieces *without* -fPIC -dynamic
302 # even when building a shared library.  If we don't do this, then the
303 # GC runs about 50% slower on x86 due to the overheads of PIC.  The
304 # cost of doing this is a little runtime linking and less sharing, but
305 # not much.
306 #
307 # On x86_64 this doesn't work, because all objects in a shared library
308 # must be compiled with -fPIC (since the 32-bit relocations generated
309 # by the default small memory can't be resolved at runtime).  So we
310 # only do this on i386.
311 #
312 # This apparently doesn't work on OS X (Darwin) nor on Solaris.
313 # On Darwin we get errors of the form
314 #
315 #  ld: absolute addressing (perhaps -mdynamic-no-pic) used in _stg_ap_0_fast from rts/dist/build/Apply.dyn_o not allowed in slidable image
316 #
317 # and lots of these warnings:
318 #
319 #  ld: warning codegen in _stg_ap_pppv_fast (offset 0x0000005E) prevents image from loading in dyld shared cache
320 #
321 # On Solaris we get errors like:
322 #
323 # Text relocation remains                         referenced
324 #     against symbol                  offset      in file
325 # .rodata (section)                   0x11        rts/dist/build/Apply.dyn_o
326 #   ...
327 # ld: fatal: relocations remain against allocatable but non-writable sections
328 # collect2: ld returned 1 exit status
329
330 ifeq "$(TargetArch_CPP)" "i386"
331 i386_SPEED_HACK := "YES"
332 ifeq "$(TargetOS_CPP)" "darwin"
333 i386_SPEED_HACK := "NO"
334 endif
335 ifeq "$(TargetOS_CPP)" "solaris2"
336 i386_SPEED_HACK := "NO"
337 endif
338 endif
339
340 ifeq "$(TargetArch_CPP)" "i386"
341 ifeq "$(i386_SPEED_HACK)" "YES"
342 rts/sm/Evac_HC_OPTS           += -fno-PIC
343 rts/sm/Evac_thr_HC_OPTS       += -fno-PIC
344 rts/sm/Scav_HC_OPTS           += -fno-PIC
345 rts/sm/Scav_thr_HC_OPTS       += -fno-PIC
346 rts/sm/Compact_HC_OPTS        += -fno-PIC
347 rts/sm/GC_HC_OPTS             += -fno-PIC
348
349 # -static is also necessary for these bits, otherwise the NCG
350 # -generates dynamic references:
351 rts/Updates_HC_OPTS += -fno-PIC -static
352 rts/StgMiscClosures_HC_OPTS += -fno-PIC -static
353 rts/PrimOps_HC_OPTS += -fno-PIC -static
354 rts/Apply_HC_OPTS += -fno-PIC -static
355 rts/dist/build/AutoApply_HC_OPTS += -fno-PIC -static
356 endif
357 endif
358
359 # ffi.h triggers prototype warnings, so disable them here:
360 rts/Interpreter_CC_OPTS += -Wno-strict-prototypes
361 rts/Adjustor_CC_OPTS    += -Wno-strict-prototypes
362 rts/sm/Storage_CC_OPTS  += -Wno-strict-prototypes
363
364 # inlining warnings happen in Compact
365 rts/sm/Compact_CC_OPTS += -Wno-inline
366
367 # emits warnings about call-clobbered registers on x86_64
368 rts/StgCRun_CC_OPTS += -w
369
370 rts/RetainerProfile_CC_OPTS += -w
371 rts/RetainerSet_CC_OPTS += -Wno-format
372 # On Windows:
373 rts/win32/ConsoleHandler_CC_OPTS += -w
374 rts/win32/ThrIOManager_CC_OPTS += -w
375 # The above warning supression flags are a temporary kludge.
376 # While working on this module you are encouraged to remove it and fix
377 # any warnings in the module. See
378 #     http://hackage.haskell.org/trac/ghc/wiki/WorkingConventions#Warnings
379 # for details
380
381 # Without this, thread_obj will not be inlined (at least on x86 with GCC 4.1.0)
382 rts/sm/Compact_CC_OPTS += -finline-limit=2500
383
384 # -O3 helps unroll some loops (especially in copy() with a constant argument).
385 rts/sm/Evac_CC_OPTS += -funroll-loops
386 rts/dist/build/sm/Evac_thr_HC_OPTS += -optc-funroll-loops
387
388 # These files are just copies of sm/Evac.c and sm/Scav.c respectively,
389 # but compiled with -DPARALLEL_GC.
390 rts/dist/build/sm/Evac_thr_CC_OPTS += -DPARALLEL_GC -Irts/sm
391 rts/dist/build/sm/Scav_thr_CC_OPTS += -DPARALLEL_GC -Irts/sm
392
393 #-----------------------------------------------------------------------------
394 # Add PAPI library if needed
395
396 ifeq "$(GhcRtsWithPapi)" "YES"
397
398 rts_CC_OPTS             += -DUSE_PAPI
399
400 rts_PACKAGE_CPP_OPTS    += -DUSE_PAPI
401 rts_PACKAGE_CPP_OPTS    += -DPAPI_INCLUDE_DIR=$(PapiIncludeDir)
402 rts_PACKAGE_CPP_OPTS    += -DPAPI_LIB_DIR=$(PapiLibDir)
403
404 ifneq "$(PapiIncludeDir)" ""
405 rts_HC_OPTS     += -I$(PapiIncludeDir)
406 rts_CC_OPTS     += -I$(PapiIncludeDir)
407 rts_HSC2HS_OPTS += -I$(PapiIncludeDir)
408 endif
409 ifneq "$(PapiLibDirs)" ""
410 rts_LD_OPTS     += -L$(PapiLibDirs)
411 endif
412
413 else # GhcRtsWithPapi==YES
414
415 rts_PACKAGE_CPP_OPTS += -DPAPI_INCLUDE_DIR=""
416 rts_PACKAGE_CPP_OPTS += -DPAPI_LIB_DIR=""
417
418 endif
419
420 # -----------------------------------------------------------------------------
421 # dependencies
422
423 rts_WAYS_DASHED = $(subst $(space),,$(patsubst %,-%,$(strip $(rts_WAYS))))
424 rts_dist_depfile_base = rts/dist/build/.depend$(rts_WAYS_DASHED)
425
426 rts_dist_C_SRCS  = $(rts_C_SRCS) $(rts_thr_EXTRA_C_SRCS)
427 rts_dist_S_SRCS =  $(rts_S_SRCS)
428 rts_dist_C_FILES = $(rts_C_SRCS) $(rts_thr_EXTRA_C_SRCS) $(rts_S_SRCS)
429
430 # Hack: we define every way-related option here, so that we get (hopefully)
431 # a superset of the dependencies.  To do this properly, we should generate
432 # a different set of dependencies for each way.  Further hack: PROFILING an
433
434 # TICKY_TICKY can't be used together, so we omit TICKY_TICKY for now.
435 rts_dist_MKDEPENDC_OPTS += -DPROFILING -DTHREADED_RTS -DDEBUG
436
437 ifeq "$(HaveDtrace)" "YES"
438
439 rts_dist_MKDEPENDC_OPTS += -Irts/dist/build
440
441 endif
442
443 $(eval $(call build-dependencies,rts,dist,1))
444
445 $(rts_dist_depfile_c_asm) : libffi/dist-install/build/ffi.h $(DTRACEPROBES_H)
446
447 #-----------------------------------------------------------------------------
448 # libffi stuff
449
450 rts_CC_OPTS     += -Ilibffi/build/include
451 rts_HC_OPTS     += -Ilibffi/build/include
452 rts_HSC2HS_OPTS += -Ilibffi/build/include
453 rts_LD_OPTS     += -Llibffi/build/include
454
455 # -----------------------------------------------------------------------------
456 # compile dtrace probes if dtrace is supported
457
458 ifeq "$(HaveDtrace)" "YES"
459
460 rts_CC_OPTS             += -DDTRACE
461 rts_HC_OPTS             += -DDTRACE
462
463 DTRACEPROBES_SRC = rts/RtsProbes.d
464 $(DTRACEPROBES_H): $(DTRACEPROBES_SRC) includes/ghcplatform.h | $(dir $@)/.
465         "$(DTRACE)" $(filter -I%,$(rts_CC_OPTS)) -C -h -o $@ -s $<
466
467 endif
468
469 # -----------------------------------------------------------------------------
470 # build the static lib containing the C main symbol
471
472 ifneq "$(BINDIST)" "YES"
473 rts/dist/build/libHSrtsmain.a : rts/dist/build/Main.o
474         "$(RM)" $(RM_OPTS) $@
475         "$(AR)" $(AR_OPTS) $(EXTRA_AR_ARGS) $@ $<
476 endif
477
478 # -----------------------------------------------------------------------------
479 # The RTS package config
480
481 # If -DDEBUG is in effect, adjust package conf accordingly..
482 ifneq "$(strip $(filter -optc-DDEBUG,$(GhcRtsHcOpts)))" ""
483 rts_PACKAGE_CPP_OPTS += -DDEBUG
484 endif
485
486 ifeq "$(HaveLibMingwEx)" "YES"
487 rts_PACKAGE_CPP_OPTS += -DHAVE_LIBMINGWEX
488 endif
489
490 $(eval $(call manual-package-config,rts))
491
492 ifneq "$(BootingFromHc)" "YES"
493 rts/package.conf.inplace : $(includes_H_CONFIG) $(includes_H_PLATFORM)
494 endif
495
496 # -----------------------------------------------------------------------------
497 # installing
498
499 INSTALL_LIBS += $(ALL_RTS_LIBS)
500
501 # -----------------------------------------------------------------------------
502 # cleaning
503
504 $(eval $(call clean-target,rts,dist,rts/dist))
505
506 BINDIST_EXTRAS += rts/package.conf.in
507 BINDIST_EXTRAS += $(ALL_RTS_LIBS)
508