
# $Id: Makefile,v 1.38 2000/08/17 16:10:27 mason Exp $

# $Log: Makefile,v $
# Revision 1.38  2000/08/17 16:10:27  mason
# Cleanning up the CVS tree and removing un-used features such as VM.
#
# Revision 1.37  2000/07/21 00:09:48  hyu
# fix BUILD to point to the right build directory
#
# Revision 1.36  2000/07/05 22:57:46  hyu
# Merging BRANCH_CURD into HEAD.
#
# Revision 1.35.24.1  2000/06/28 22:40:15  hyu
# Merge BRANCH_MGCP_XFER_0613 into BRANCH_CURD
#
# Revision 1.35.26.1  2000/06/13 20:57:44  hyu
# Merging from BRANCH_MGCP_XFER into a new branch BRANCH_MGCP_XFER_0613.
#
# Revision 1.35.12.1  2000/06/08 21:33:30  mason
# (1)  Changed name to IP address for SDP as well as endpoint id.
# (2)  Changed SDP to look at "c=" line instead of the "o=" line.
# (3)  Fixed a char* problem pointing to something that goes out of scope.
#
# Revision 1.35  2000/01/21 20:06:52  ctam
# Add support for sh3 G729A codec for the SH3Hardware.
# Add debounce delay (attempting to fix the problem with new quicknet driver).
#
#  Modified Files:
#     Endpoint.cxx Endpoint.h Gateway.cxx Makefile SH3Hardware.cxx
#     SH3Hardware.h
#
# Revision 1.34  2000/01/05 02:38:52  mason
# Integrated new SDP with freebx and mgcp.
# Modified the corresponding Makefiles to use the SDP package.
# Renamed old SdpConnection in SDPMedia.hxx to SDPConnection
# to avoid conflicts.
#
# Revision 1.33  1999/12/31 04:21:11  ctam
# checking in a working version of the sh3 gateway.  rtp works but with some
# background noise.  may need to do something with the zero buffer.
#
# NOTES:  Must compile without USE_G729A.
#         Use 20ms packet size.
#
# Modified Files:
#    Gateway.cxx Makefile SH3Hardware.cxx
#    hitachiUser.c hitachiUser.h
#
# Revision 1.32  1999/12/27 23:48:02  ctam
# Fixed tone and dtmf conflict problem.
#
# Things that work:  dtmf detect, tone gen, hook detect, mgcp msg (mostly).
#
# Things that don't work:  rtp
#
#
# Modified Files:
#    Gateway.cxx Makefile SH3Hardware.cxx SH3Hardware.h hitachiUser.c
#
# Revision 1.31  1999/12/23 04:57:33  bogawa
# rearrange some more MGCP files in preparation for finishing the Embedded Requests implementation
#
# Revision 1.30  1999/12/21 23:10:05  ctam
# Great File Renaming changes.
#
# Files:  Makefile SH3Hardware.cxx SH3Hardware.h
#
# Revision 1.29  1999/12/21 22:29:25  bogawa
# fixes for the great renaming
#
# Revision 1.28  1999/12/21 19:52:11  bogawa
# fixes for sh compiling
#
# Revision 1.27  1999/12/16 23:25:13  ctam
# Added in changes for hitachi hardware.  General clean up of files.
#
# Files:
#     Makefile Gateway.cxx IPJackHardware.cxx IPJackHardware.h
#     sh3Hardware.cxx sh3Hardware.h
#
# Revision 1.26  1999/12/15 02:10:11  ctam
# compiler fixes
#
# Revision 1.25  1999/12/15 00:54:48  ctam
# First round of changes for the res gw on the hitachi board.
#
# WARNING:  The res-gw doesn't work for the hitachi boards yet but it
#           does compile.
#
# Modified Files:
#     Makefile Dn.cxx Dn.h Gateway.cxx
#     IPJackHardware.cxx NullHardware.cxx ReqSig.cxx ReqSig.h
#     TrunkHardware.cxx
#
# Revision 1.24  1999/11/19 01:39:10  eckelcu
#
# Removed references to local versions of files relocated to /util
#
# Revision 1.23  1999/11/18 00:28:48  bogawa
# Add changes to use the util directory as well as try to make it possible to take out the calls to cout.
#
# Revision 1.22  1999/11/03 23:56:29  ctam
# Replace Makefile
#
# Revision 1.20  1999/08/25 20:50:57  bogawa
# New makefiles offer more flexibility (e.g. targets that let you select
# what you intend to make) as well as a packaging structure.
#
# Revision 1.19  1999/08/05 18:51:46  eckelcu
# Modified Files:
# 	Makefile Connection.cxx Connection.h Dn.cxx Dn.h
# 	Gateway.cxx Gateway.h gw.cfg Hardware.h
# Added Files:
# 	TrunkHardware.cxx TrunkHardware.h
# Added trunk version of null hardware file.
# Modified gw.cfg to default to 1 endpoint. This value is
# changed to GW_ENDPOINT_MAX iff 'trunk' is specified as
# the runtime parameter for the deviceName.
# Added code to specify and assign the number of connections
# per endpoint and the rtp ports to be used for audio sessions.
# Added code to the endpoints to handle multiple connections.
# Added code for the gateway to allocate rtp ports and
# connection ids.
# Added a global ptr which may be used by all objects to
# access the gateway.
#
# Revision 1.18  1999/07/30 00:26:23  eckelcu
# Updated fifo to same version being used by call agent and
# modified Makefile to compile correctly with new fifo files.
# Added general timer mechanism to endpoint, and used this
# mechanism to provide endpoint detection of flashhook.
# Flashhook is detected as an onhook/offhook combination
# occurring in less than 700 msec.
#
# Revision 1.17  1999/07/29 00:48:28  eckelcu
# Modified Files:
# 	Makefile common.h Connection.cxx Connection.h Dn.cxx
# 	Dn.h Gateway.cxx Gateway.h Hardware.cxx Hardware.h
# 	NullHardware.cxx NullHardware.h ReqEv.cxx ReqEv.h ReqSig.cxx
# 	ReqSig.h
# Added Files:
# 	cpLog.cxx cpLog.h gw.cfg parse3tuple.cxx parse3tuple.h
# Replaced hardcoded configuration file with the file 'gw.cfg'.
# The parameters specifed in this file may be overridden using
# command line arguments.
# Added cpLog and replaced calls to cerr with appropriate cpLog calls.
# Performed some code cleanup to bring code more in line with the
# established coding conventions.
#
# Revision 1.16  1999/07/27 01:36:54  bogawa
#
# fix for makefile
#
# Revision 1.15  1999/07/27 00:07:17  jitterbug
# Change for VM so that re-compile from freebx/gw/test directory works.
#
# Revision 1.14  1999/07/25 23:00:40  ctam
# Add tmp directory to bin.$(ARCH) directory
#
# Revision 1.13  1999/07/25 21:53:02  ctam
#
# Changed for VM.
#
# Revision 1.12  1999/07/25 21:19:30  ctam
#
# Fix problem with mkdir obj.$(ARCH)/vm.
#
# Revision 1.11  1999/07/25 20:47:28  ctam
#
# Add back soft link of vm directory to the test directory.
#
# Revision 1.10  1999/07/24 01:33:43  bogawa
#
# return to copying of Script directory
#
# Revision 1.9  1999/07/23 23:56:31  bogawa
#
# the gw/test Makefile was changed to use the new make file system.
#
# improve the global makefiles.  Now, most targets use these makefiles
# which should simplify the lives of the users, we hope.
#
# Key features include support for nested object directories as well as
# a more coherent install strategy (so that installs are less likely to
# produce error messages)
#
# Revision 1.8  1999/07/23 23:32:18  ctam
#
# Replace getdigit.cxx with DigitMap.cxx
#
# Revision 1.7  1999/07/21 01:58:10  ctam
#
# Add getdigits.cxx to Makefile
#
# Revision 1.6  1999/07/20 18:09:20  eckelcu
# Modified Files:
# 	ReqEv.cxx ReqEv.h IPJackHardware.cxx NullHardware.cxx
# 	Dn.cxx Dn.h Makefile
# Added Files:
# 	ReqSig.cxx ReqSig.h
# Restructured the handling of events and signals. Requested Events
# are encapsulated in the ReqEv class (files ReqEv.h/cxx). Requested
# Signals are encapsulated in the ReqSig class (files ReqSig.h/cxx).
# The ReqSig class and files replace the Signal class and files and
# the Makefile is modified accordingly.
# An additonal endpoint msg type is also added to handle timeouts.
#
# Revision 1.5  1999/07/20 00:58:31  bogawa
#
# fix install target (lame, but it works)
#
# Revision 1.4  1999/07/19 23:41:21  bogawa
#
# upgrade to actually build out everything in the code.
#
# Revision 1.3  1999/07/17 21:01:13  luan
# changes from Sergey for voice mail.
#
# Revision 1.2  1999/07/16 19:43:28  ctam
#
# add VM file to compile
#
# Revision 1.1  1999/07/14 22:02:03  eckelcu
# Initial version of file. Corresponds to version 1.1 of gateway files.
#



all: target

BUILD = ../../build

include $(BUILD)/Makefile.pre

# DEFINES += HIT82 USE_LINEAR16 

PACKAGES += MGCP RTP SDP SIP PTHREAD HITACHI QUICKNET UTIL

INCDIRS += ./ ../../../contrib/quicknet/ixj 
LDLIBS   +=

COPYFILES = gw.cfg
COPYTO = bin.$(TARGET_NAME)

bin.$(TARGET_NAME)/tmp:
	mkdir -p bin.$(TARGET_NAME)/tmp

target: bin.$(TARGET_NAME)/tmp

TESTPROGRAMS = \
	Gateway.cxx 

ifeq ($(ARCH),sh)

HWSRC = \
	Hardware.cxx \
	NullHardware.cxx \
	SH3Hardware.cxx \
 
else
HWSRC = \
	Hardware.cxx \
	TrunkHardware.cxx \
	NullHardware.cxx \
	IPJackHardware.cxx
endif




# name of all files to be compiled (don't include header files)

SRC = \
	ReqEv.cxx \
	ReqSig.cxx \
	DigitMap.cxx \
	Connection.cxx \
	Hardware.cxx \
	Endpoint.cxx

include $(BUILD)/Makefile.post
