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
9include $(lang_srcdir)/config/Make.rules
10
11#
12# Load these project first in this order. These projects contains generated headers
13# that other projects might depend on so it's important to parse them first for the
14# generated headers variable to be defined when we load other projects.
15#
16load_first = Ice IceSSL IceBox IcePatch2Lib Glacier2Lib IceGridLib IceStormLib
17
18#
19# Create projects for all the Slice translators from src/slice2* and load source projects.
20#
21projects :=
22$(foreach t,$(wildcard $(lang_srcdir)/src/slice2*),$(eval $(call create-translator-project,$(call project,$t))))
23include $(foreach p,$(load_first),src/$p/Makefile.mk)
24include $(filter-out $(foreach p,$(load_first),%/src/$p/Makefile.mk),$(shell find $(lang_srcdir)/src -name Makefile.mk))
25$(call make-projects,$(projects),make-cpp-src-project,,$(filter all cpp,$(ICE_BIN_DIST)))
26
27#
28# Now, create and load test projects.
29#
30projects :=
31tests := $(call tests-without-project-makefile,cpp)
32include $(shell find $(lang_srcdir)/test -name Makefile.mk)
33$(foreach t,$(tests),$(eval $(call create-cpp-test-project,$(t))))
34$(call make-projects,$(projects),make-cpp-test-project)
35
36install:: | $(DESTDIR)$(install_configdir)
37	$(Q)$(call install-data,templates.xml,$(lang_srcdir)/config,$(install_configdir))
38