# Building one way
define build-rts-way # args: $1 = way
+ifneq "$$(BINDIST)" "YES"
+
# The per-way CC_OPTS
ifneq "$$(findstring debug, $1)" ""
rts_dist_$1_HC_OPTS =
# Making a shared library for the RTS.
ifneq "$$(findstring dyn, $1)" ""
-ifeq "$(HOSTPLATFORM)" "i386-unknown-mingw32"
+ifeq "$$(HOSTPLATFORM)" "i386-unknown-mingw32"
$$(rts_$1_LIB) : $$(rts_$1_OBJS) $$(ALL_RTS_DEF_LIBS) rts/libs.depend
"$$(RM)" $$(RM_OPTS) $$@
"$$(rts_dist_HC)" -shared -dynamic -dynload deploy \
-no-auto-link-packages `cat rts/libs.depend` $$(rts_$1_OBJS) $$(ALL_RTS_DEF_LIBS) -o $$@
-ifeq "$(darwin_TARGET_OS)" "1"
+ifeq "$$(darwin_TARGET_OS)" "1"
# Ensure library's install name is correct before anyone links with it.
install_name_tool -id $(ghclibdir)/$$(rts_$1_LIB_NAME) $$@
endif
echo $$(rts_$1_OBJS) | "$$(XARGS)" $$(XARGS_OPTS) "$$(AR)" $$(AR_OPTS) $$(EXTRA_AR_ARGS) $$@
endif
+endif
+
endef
# And expand the above for each way:
# -----------------------------------------------------------------------------
# build the static lib containing the C main symbol
+ifneq "$(BINDIST)" "YES"
rts/dist/build/libHSrtsmain.a : rts/dist/build/Main.o
"$(AR)" $(AR_OPTS) $(EXTRA_AR_ARGS) $@ $<
+endif
# -----------------------------------------------------------------------------
# The RTS package config
# -----------------------------------------------------------------------------
# installing
-install : install_rts
-
-.PHONY: install_rts
-install_rts:
- $(INSTALL_DIR) "$(DESTDIR)$(ghclibdir)"
- $(INSTALL_DIR) "$(DESTDIR)$(ghclibdir)/include"
- "$(CP)" $(ALL_RTS_LIBS) "$(DESTDIR)$(ghclibdir)"
+INSTALL_LIBS += $(ALL_RTS_LIBS)
# -----------------------------------------------------------------------------
# cleaning