1#
2# %CopyrightBegin%
3#
4# Copyright Ericsson AB 2001-2016. All Rights Reserved.
5#
6# Licensed under the Apache License, Version 2.0 (the "License");
7# you may not use this file except in compliance with the License.
8# You may obtain a copy of the License at
9#
10#     http://www.apache.org/licenses/LICENSE-2.0
11#
12# Unless required by applicable law or agreed to in writing, software
13# distributed under the License is distributed on an "AS IS" BASIS,
14# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15# See the License for the specific language governing permissions and
16# limitations under the License.
17#
18# %CopyrightEnd%
19#
20#
21include $(ERL_TOP)/make/target.mk
22ifeq ($(TYPE),debug)
23ERL_COMPILE_FLAGS += -Ddebug -W
24endif
25EBIN=../ebin
26include $(ERL_TOP)/make/$(TARGET)/otp.mk
27
28CORBA_TOP=../../..
29
30# ----------------------------------------------------
31# Application version
32# ----------------------------------------------------
33include $(CORBA_TOP)/vsn.mk
34VSN=$(CORBA_VSN)
35
36# ----------------------------------------------------
37# Release directory specification
38# ----------------------------------------------------
39RELSYSDIR = $(RELEASE_PATH)/lib/cosEventDomain-$(VSN)
40# ----------------------------------------------------
41# Target Specs
42# ----------------------------------------------------
43
44MODULES = \
45	CosEventDomainAdmin_EventDomainFactory_impl \
46	CosEventDomainAdmin_EventDomain_impl \
47	cosEventDomainApp
48
49ERL_FILES = $(MODULES:%=%.erl)
50HRL_FILES = cosEventDomainApp.hrl
51
52EXTERNAL_INC_PATH = ../include
53
54GEN_ERL_FILES = \
55	oe_CosEventDomainAdmin.erl \
56	CosEventDomainAdmin.erl \
57	CosEventDomainAdmin_DiamondSeq.erl \
58	CosEventDomainAdmin_AlreadyExists.erl \
59	CosEventDomainAdmin_DomainIDSeq.erl \
60	CosEventDomainAdmin_Connection.erl \
61	CosEventDomainAdmin_ConnectionIDSeq.erl \
62	CosEventDomainAdmin_ConnectionNotFound.erl \
63	CosEventDomainAdmin_CycleCreationForbidden.erl \
64	CosEventDomainAdmin_CycleSeq.erl \
65	CosEventDomainAdmin_DiamondCreationForbidden.erl \
66	CosEventDomainAdmin_DomainNotFound.erl \
67	CosEventDomainAdmin_EventDomain.erl \
68	CosEventDomainAdmin_EventDomainFactory.erl \
69	CosEventDomainAdmin_MemberIDSeq.erl \
70	CosEventDomainAdmin_RouteSeq.erl
71
72
73
74GEN_HRL_FILES = \
75	oe_CosEventDomainAdmin.hrl \
76	CosEventDomainAdmin.hrl \
77	CosEventDomainAdmin_EventDomainFactory.hrl \
78	CosEventDomainAdmin_EventDomain.hrl
79
80EXTERNAL_GEN_HRL_FILES = \
81	$(GEN_HRL_FILES:%=$(EXTERNAL_INC_PATH)/%)
82
83
84TARGET_FILES = \
85	$(GEN_ERL_FILES:%.erl=$(EBIN)/%.$(EMULATOR)) \
86	$(MODULES:%=$(EBIN)/%.$(EMULATOR))
87
88GEN_FILES = $(GEN_HRL_FILES) $(GEN_ERL_FILES)
89
90IDL_FILES = \
91	CosEventDomainAdmin.idl
92
93APPUP_FILE = cosEventDomain.appup
94APPUP_SRC = $(APPUP_FILE).src
95APPUP_TARGET = $(EBIN)/$(APPUP_FILE)
96
97APP_FILE = cosEventDomain.app
98APP_SRC = $(APP_FILE).src
99APP_TARGET = $(EBIN)/$(APP_FILE)
100
101# ----------------------------------------------------
102# FLAGS
103# ----------------------------------------------------
104ERL_IDL_FLAGS += \
105	-pa $(CORBA_TOP)/lib/cosEventDomain/ebin \
106	-pa $(CORBA_TOP)/lib/cosEventDomain/include \
107	-pa $(CORBA_TOP)/lib/cosNotification/include \
108	-pa $(CORBA_TOP)/lib/cosNotification/ebin \
109	-pa $(CORBA_TOP)/lib/orber/ebin \
110	-pa $(CORBA_TOP)/lib/ic/ebin \
111	-I$(CORBA_TOP)/lib/cosNotification/include \
112	-I$(CORBA_TOP)/lib/cosNotification/ebin \
113	-I$(CORBA_TOP)/lib/cosNotification/src \
114	-I$(CORBA_TOP)/lib/cosEvent/src \
115	-I$(CORBA_TOP)/lib/cosEventDomain/include
116ERL_COMPILE_FLAGS += \
117	$(ERL_IDL_FLAGS) \
118	-pa $(CORBA_TOP)/lib/cosEventDomain/include \
119	-pa $(CORBA_TOP)/lib/cosNotification/ebin \
120	-pa $(CORBA_TOP)/lib/cosNotification/include \
121	-pa $(CORBA_TOP)/lib/cosNotification/src \
122	-I$(CORBA_TOP)/lib/cosEventDomain/include \
123	-I$(CORBA_TOP)/lib/cosNotification/ebin \
124	-I$(CORBA_TOP)/lib/cosNotification/include \
125	-I$(CORBA_TOP)/lib/cosNotification/src \
126	-I$(CORBA_TOP)/lib/cosEvent/src \
127	-I$(CORBA_TOP)/lib/cosEvent/include \
128	+'{parse_transform,sys_pre_attributes}' \
129	+'{attribute,insert,app_vsn,"cosEventDomain_$(VSN)"}'
130
131YRL_FLAGS =
132
133# ----------------------------------------------------
134# Targets
135# ----------------------------------------------------
136opt: $(TARGET_FILES) $(APP_TARGET) $(APPUP_TARGET)
137
138debug:
139	@${MAKE} TYPE=debug opt
140
141clean:
142	rm -f $(TARGET_FILES) $(GEN_FILES) $(APP_TARGET) $(APPUP_TARGET) IDL-GENERATED
143	rm -f errs core *~
144
145$(APP_TARGET): $(APP_SRC) $(CORBA_TOP)/vsn.mk
146	$(vsn_verbose)sed -e 's;%VSN%;$(VSN);' $(APP_SRC) > $(APP_TARGET)
147$(APPUP_TARGET): $(APPUP_SRC) $(CORBA_TOP)/vsn.mk
148	$(vsn_verbose)sed -e 's;%VSN%;$(VSN);' $(APPUP_SRC) > $(APPUP_TARGET)
149
150docs:
151
152# ----------------------------------------------------
153# Special Build Targets
154# ----------------------------------------------------
155IDL-GENERATED: CosEventDomainAdmin.idl
156	$(gen_verbose)erlc $(ERL_IDL_FLAGS) +'{cfgfile,"CosEventDomainAdmin.cfg"}' CosEventDomainAdmin.idl
157	$(V_at)mv $(GEN_HRL_FILES) $(EXTERNAL_INC_PATH)
158	$(V_at)>IDL-GENERATED
159
160$(GEN_FILES): IDL-GENERATED
161
162$(TARGET_FILES): IDL-GENERATED
163
164# ----------------------------------------------------
165# Release Target
166# ----------------------------------------------------
167include $(ERL_TOP)/make/otp_release_targets.mk
168
169
170release_spec: opt
171	$(INSTALL_DIR) "$(RELSYSDIR)"
172	$(INSTALL_DATA) ../info "$(RELSYSDIR)"
173	$(INSTALL_DIR) "$(RELSYSDIR)/ebin"
174	$(INSTALL_DATA) $(TARGET_FILES) $(APP_TARGET) $(APPUP_TARGET) "$(RELSYSDIR)/ebin"
175	$(INSTALL_DIR) "$(RELSYSDIR)/src"
176	$(INSTALL_DATA) $(ERL_FILES) $(HRL_FILES) $(GEN_ERL_FILES) $(IDL_FILES) "$(RELSYSDIR)/src"
177	$(INSTALL_DIR) "$(RELSYSDIR)/include"
178	$(INSTALL_DATA) $(EXTERNAL_GEN_HRL_FILES) "$(RELSYSDIR)/include"
179
180
181release_docs_spec:
182
183
184
185
186
187