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 22 23EBIN= ../ebin 24 25include $(ERL_TOP)/make/$(TARGET)/otp.mk 26 27CORBA_TOP=../../.. 28 29# ---------------------------------------------------- 30# Application version 31# ---------------------------------------------------- 32include $(CORBA_TOP)/vsn.mk 33VSN=$(CORBA_VSN) 34 35# ---------------------------------------------------- 36# Release directory specification 37# ---------------------------------------------------- 38RELSYSDIR = $(RELEASE_PATH)/lib/cosTransactions-$(VSN) 39 40# ---------------------------------------------------- 41# Target Specs 42# ---------------------------------------------------- 43 44INETRC_EXAMPLE = \ 45# inetrc 46 47IDL_FILES = \ 48# hotel.idl \ 49# travelAgency.idl 50 51GEN_ERL_MODULES = \ 52# oe_travelAgency \ 53# travelAgency_book \ 54 55MODULES= \ 56# travelAgency_book_impl \ 57 58GEN_HRL_FILES = \ 59# oe_travelAgency.hrl \ 60# travelAgency_book.hrl 61 62HRL_FILES= 63 64ERL_FILES= $(MODULES:%=%.erl) 65 66JAVA_CLASSES = \ 67# HotelResource 68 69JAVA_FILES= $(JAVA_CLASSES:%=%.java) 70CLASS_FILES= $(JAVA_CLASSES:%=%.class) 71 72TARGET_FILES = \ 73 $(GEN_ERL_MODULES:%=$(EBIN)/%.$(EMULATOR)) \ 74 $(MODULES:%=$(EBIN)/%.$(EMULATOR)) 75 76 77ifeq ($(findstring sparc-sun-solaris2, $(TARGET)),sparc-sun-solaris2) 78 JAVA_TARGET=java 79endif 80 81# ---------------------------------------------------- 82# PROGRAMS 83# ---------------------------------------------------- 84JAVA_IDL = idl 85LOCAL_CLASSPATH = $(CORBA_TOP)/lib/cosTransactions/priv:$(CORBA_TOP)/lib/cosTransactions/examples/java_output:$(CORBA_TOP)/lib/cosTransactions/src:$(CORBA_TOP)/lib/cosTransactions/examples:$(CORBA_TOP)/lib/cosTransactions/examples/java_output/hotel 86 87# ---------------------------------------------------- 88# FLAGS 89# ---------------------------------------------------- 90ERL_IDL_FLAGS += -pa /clearcase/otp/libraries/cosTransactions/ebin -pa /clearcase/otp/libraries/ic/ebin 91# includes from other directories than ../include . 92ERL_COMPILE_FLAGS += \ 93 $(ERL_IDL_FLAGS) \ 94 -pa /clearcase/otp/libraries/cosTransactions -I/clearcase/otp/libraries/cosTransactions 95YRL_FLAGS = 96 97JAVA_OPTIONS = -classpath ../priv:/opt/local/pgm/OrbixWeb2.0.1 98 99# ---------------------------------------------------- 100# Targets 101# ---------------------------------------------------- 102tests debug opt: $(TARGET_FILES) $(JAVA_TARGET) 103 104java: java_costransactions_idl java_objects 105# java_hotel_idl 106 107clean: 108 rm -f $(TARGET_FILES) $(GEN_ERL_MODULES:%=%.erl) $(GEN_HRL_FILES) $(CLASS_FILES) 109 rm -rf java_costransactions_idl 110 rm -rf java_output/* 111 rm -f errs core *~ 112# rm -rf java_hotel_idl 113 114docs: 115 116java_costransactions_idl: 117 $(JAVA_IDL) ../src/CosTransactions.idl 118 @if [ -d java_output ]; then \ 119 echo "compiling java classes for CosTransactions ... This will take a while!!"; \ 120 CLASSPATH="${CLASSPATH}:${LOCAL_CLASSPATH}"; \ 121 export CLASSPATH;\ 122 (cd java_output/CosTransactions; $(JAVA) *.java;); \ 123 fi 124 @touch java_costransactions_idl 125 126#java_hotel_idl: 127# $(JAVA_IDL) hotel.idl 128# @if [ -d java_output ]; then \ 129# echo "compiling java classes for hotel ..."; \ 130# CLASSPATH="${CLASSPATH}:${LOCAL_CLASSPATH}"; \ 131# export CLASSPATH;\ 132# (cd java_output/hotel; $(JAVA) *.java;); \ 133# fi 134# @touch java_hotel_idl 135 136#java_objects: 137# @if [ -d java_output ]; then \ 138# echo "compiling java example files ..."; \ 139# CLASSPATH="${CLASSPATH}:${LOCAL_CLASSPATH}"; \ 140# export CLASSPATH;\ 141# $(JAVA) *.java; \ 142# fi 143# @touch java_hotel_resource 144 145#oe_travelAgency.erl: travelAgency.idl 146# erlc $(ERL_IDL_FLAGS) travelAgency.idl 147 148# ---------------------------------------------------- 149# Release Target 150# ---------------------------------------------------- 151include $(ERL_TOP)/make/otp_release_targets.mk 152 153 154release_spec: opt 155 $(INSTALL_DIR) "$(RELSYSDIR)/examples" 156 $(INSTALL_DATA) $(ERL_FILES) $(JAVA_FILES) $(IDL_FILES) "$(RELSYSDIR)/examples" 157 $(INSTALL_DATA) $(INETRC_EXAMPLE) "$(RELSYSDIR)/examples" 158 @tar cf - java_output | (cd $(RELSYSDIR); tar xf -) 159 160release_docs_spec: 161