1#
2# Copyright (c) ZeroC, Inc. All rights reserved.
3#
4
5top_srcdir      := ..
6lang_srcdir     := $(top_srcdir)/$(notdir $(patsubst %/,%,$(dir $(lastword $(abspath $(MAKEFILE_LIST))))))
7
8include $(top_srcdir)/config/Make.rules
9
10#
11# Load C++ dependencies
12#
13$(eval $(call load-dependencies,$(addprefix $(top_srcdir)/cpp/src/,Ice IceSSL IceLocatorDiscovery IceDiscovery)))
14$(eval $(call load-translator-dependencies,$(top_srcdir)/cpp/src/slice2rb))
15
16#
17# Load ruby rules after loading C++ dependencies
18#
19include $(lang_srcdir)/config/Make.rules
20
21ifeq ($(filter all ruby,$(ICE_BIN_DIST)),)
22
23#
24# Load Makefile.mk fragments
25#
26include $(shell find $(lang_srcdir) -name Makefile.mk)
27
28#
29# Make the projects (this expands all the build configuration and defines rules for all
30# the components).
31#
32$(call make-projects,$(projects))
33
34install:: | $(DESTDIR)$(install_rubydir)
35	$(E) "Installing generated code"
36	$(Q)$(INSTALL) -m 644 $(lang_srcdir)/ruby/*.rb $(DESTDIR)$(install_rubydir)
37
38$(eval $(call make-ruby-package,$(slicedir),$(lang_srcdir)/ruby,Ice))
39$(eval $(call make-ruby-package,$(slicedir),$(lang_srcdir)/ruby,Glacier2))
40$(eval $(call make-ruby-package,$(slicedir),$(lang_srcdir)/ruby,IceBox))
41$(eval $(call make-ruby-package,$(slicedir),$(lang_srcdir)/ruby,IceGrid))
42$(eval $(call make-ruby-package,$(slicedir),$(lang_srcdir)/ruby,IcePatch2))
43$(eval $(call make-ruby-package,$(slicedir),$(lang_srcdir)/ruby,IceStorm))
44
45endif
46