1#
2# Copyright (c) ZeroC, Inc. All rights reserved.
3#
4
5top_srcdir := .
6
7include $(top_srcdir)/config/Make.rules
8
9define make-global-rule
10$1::
11	+@for subdir in $2; \
12	do \
13		echo "making all in $$$$subdir"; \
14		( cd $$$$subdir && $(MAKE) $1 ) || exit 1; \
15	done
16endef
17
18$(eval $(call make-global-rule,srcs,$(languages)))
19$(eval $(call make-global-rule,tests,$(languages)))
20$(eval $(call make-global-rule,all,$(languages)))
21$(eval $(call make-global-rule,clean,$(languages)))
22$(eval $(call make-global-rule,distclean,$(languages)))
23$(eval $(call make-global-rule,install,$(languages)))
24
25#
26# Install documentation and slice files (don't install IceDiscovery and IceLocatorDiscovery slice files)
27#
28install:: install-doc install-slice
29
30$(eval $(call install-data-files,$(wildcard $(top_srcdir)/*LICENSE),$(top_srcdir),$(install_docdir),\
31         install-doc,"Installing documentation files"))
32
33$(eval $(call install-data-files,$(filter-out %Discovery.ice,$(wildcard $(slicedir)/*/*.ice)),$(slicedir),$(install_slicedir),\
34         install-slice,"Installing slice files"))
35
36#
37# Remove top-level sdk directory on macOS
38#
39ifneq ($(filter Darwin,$(os)),)
40distclean::
41	$(Q)$(RM) -r $(top_srcdir)/sdk
42endif
43