1# 2# %CopyrightBegin% 3# 4# Copyright Ericsson AB 1999-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 22include $(ERL_TOP)/make/$(TARGET)/otp.mk 23 24#ifeq ($(TYPE),debug) 25#ERL_COMPILE_FLAGS += -Ddebug -W 26#endif 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)/cosTransactions_test 40 41# ---------------------------------------------------- 42# Target Specs 43# ---------------------------------------------------- 44TEST_SPEC_FILE = cosTransactions.spec 45COVER_FILE = cosTransactions.cover 46 47 48IDL_FILES = \ 49 etrap_test.idl 50 51IDLOUTDIR = idl_output 52 53MODULES = \ 54 transactions_SUITE \ 55 etrap_test_server_impl \ 56 etrap_test_lib \ 57 generated_SUITE 58 59GEN_MODULES = \ 60 oe_etrap_test \ 61 etrap_test_server 62 63GEN_HRL_FILES = \ 64 oe_etrap_test.hrl \ 65 etrap_test_server.hrl 66 67ERL_FILES = $(MODULES:%=%.erl) 68 69HRL_FILES = \ 70 etrap_test_lib.hrl 71 72GEN_FILES = \ 73 $(GEN_HRL_FILES:%=$(IDLOUTDIR)/%) \ 74 $(GEN_MODULES:%=$(IDLOUTDIR)/%.erl) 75 76GEN_TARGET_FILES = $(GEN_MODULES:%=$(IDLOUTDIR)/%.$(EMULATOR)) 77 78SUITE_TARGET_FILES = $(MODULES:%=%.$(EMULATOR)) 79 80TARGET_FILES = \ 81 $(GEN_TARGET_FILES) \ 82 $(SUITE_TARGET_FILES) 83 84 85# ---------------------------------------------------- 86# PROGRAMS 87# ---------------------------------------------------- 88LOCAL_CLASSPATH = $(CORBA_TOP)/lib/cosTransactions/priv:$(CORBA_TOP)/lib/cosTransactions/test 89# ---------------------------------------------------- 90# FLAGS 91# ---------------------------------------------------- 92ERL_IDL_FLAGS += -pa $(CORBA_TOP)/lib/cosTransactions/ebin\ 93 -pa $(CORBA_TOP)/lib/orber/ebin \ 94 -pa $(CORBA_TOP)/lib/ic/ebin 95 96ERL_COMPILE_FLAGS += \ 97 $(ERL_IDL_FLAGS) \ 98 -pa $(CORBA_TOP)/lib/orber/include \ 99 -pa $(CORBA_TOP)/lib/cosTransactions/ebin \ 100 -pa $(CORBA_TOP)/lib/cosTransactions/test/idl_output \ 101 -I$(CORBA_TOP)/lib/orber/include \ 102 -I$(CORBA_TOP)/lib/cosTransactions \ 103 -I$(CORBA_TOP)/lib/cosTransactions/test/$(IDLOUTDIR) 104 105# ---------------------------------------------------- 106# Targets 107# ---------------------------------------------------- 108 109 110tests debug opt: $(TARGET_FILES) 111 112clean: 113 rm -f idl_output/* 114 rm -f $(TARGET_FILES) 115 rm -f errs core *~ 116 117#debug: 118# @${MAKE} TYPE=debug 119 120docs: 121 122# ---------------------------------------------------- 123# Special Targets 124# ---------------------------------------------------- 125 126IDL-GENERATED: etrap_test.idl 127 erlc $(ERL_IDL_FLAGS) -o$(IDLOUTDIR) \ 128 +'{cfgfile,"etrap_test.cfg"}' etrap_test.idl 129 >IDL-GENERATED 130 131$(GEN_FILES): IDL-GENERATED 132 133$(TARGET_FILES): IDL-GENERATED 134 135# ---------------------------------------------------- 136# Release Targets 137# ---------------------------------------------------- 138# We don't copy generated intermediate erlang and hrl files 139 140include $(ERL_TOP)/make/otp_release_targets.mk 141 142release_spec: 143 144release_docs_spec: 145 146release_tests_spec: tests 147 $(INSTALL_DIR) "$(RELSYSDIR)" 148 $(INSTALL_DATA) $(IDL_FILES) $(TEST_SPEC_FILE) \ 149 $(COVER_FILE) $(ERL_FILES) $(HRL_FILES) "$(RELSYSDIR)" 150 $(INSTALL_DATA) $(SUITE_TARGET_FILES) "$(RELSYSDIR)" 151 $(INSTALL_DIR) "$(RELSYSDIR)/$(IDLOUTDIR)" 152 $(INSTALL_DATA) $(GEN_TARGET_FILES) $(GEN_FILES) \ 153 "$(RELSYSDIR)/$(IDLOUTDIR)" 154 155