/*
Copyright (c) 1991, 1992, 1993 Xerox Corporation.  All Rights Reserved.  

Unlimited use, reproduction, and distribution of this software is
permitted.  Any copy of this software must include both the above
copyright notice of Xerox Corporation and this paragraph.  Any
distribution of this software must comply with all applicable United
States export control laws.  This software is made available AS IS,
and XEROX CORPORATION DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED,
INCLUDING WITHOUT LIMITATION THE IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS FOR A PARTICULAR PURPOSE, AND NOTWITHSTANDING ANY OTHER
PROVISION CONTAINED HEREIN, ANY LIABILITY FOR DAMAGES RESULTING FROM
THE SOFTWARE OR ITS USE IS EXPRESSLY DISCLAIMED, WHETHER ARISING IN
CONTRACT, TORT (INCLUDING NEGLIGENCE) OR STRICT LIABILITY, EVEN IF
XEROX CORPORATION IS ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.

$Id: Imakefile,v 1.35 1994/05/09 18:12:28 janssen Exp $
*/
/* $Locker:  $ */

#define IHaveSubdirs

SUBDIRS = os

SimpBindDir = $(ILUHOME)/lib/bindings

CourierFlag = 
SunRPCFlag =
DCERPCFlag =
TCPIPFlag =
UDPIPFlag =
InMemoryFlag =
XNSSPPFlag =

CourierObj =
SunRPCObj =
DCERPCObj =
TCPIPObj =
UDPIPObj =
InMemoryObj =
XNSSPPObj =
SimpBindObj = simpbind.o

#ifdef ADD_COURIER_PROTOCOL
CourierFlag = -DCOURIER_PROTOCOL -DREGISTRY_LAST_RESORT=\"$(REGISTRY_LAST_RESORT)\"
CourierObj = courier.o
#endif /* ADD_COURIER_PROTOCOL */
#ifdef ADD_SUNRPC_PROTOCOL
SunRPCFlag = -DSUNRPC_PROTOCOL -DREGISTRY_LAST_RESORT=\"$(REGISTRY_LAST_RESORT)\"
SunRPCObj = sunrpc.o
#endif /* ADD_SUNRPC_PROTOCOL */
#ifdef ADD_DCERPC_PROTOCOL
DCERPCFlag = -DDCERPC_PROTOCOL -DREGISTRY_LAST_RESORT=\"$(REGISTRY_LAST_RESORT)\"
DCERPCObj = dcerpc.o
#endif /* ADD_DCERPC_PROTOCOL */
#ifdef ADD_TCPSOCKET_TRANSPORT
TCPIPFlag = -DTCPIP_TRANSPORT
TCPIPObj = tcp.o
#endif /* ADD_TCPSOCKET_TRANSPORT */
#ifdef ADD_UDPSOCKET_TRANSPORT
UDPIPFlag = -DUDPSOCKET_TRANSPORT
UDPIPObj = udp.o
#endif /* ADD_UDPSOCKET_TRANSPORT */
#ifdef ADD_XNSSPP_TRANSPORT
XNSSPPFlag = -DXNSSPP_TRANSPORT
XNSSPPObj = spp.o /usr/lib/libnsl.a
#endif /* ADD_XNSSPP_TRANSPORT */
#ifdef ADD_INMEMORY_TRANSPORT
InMemoryFlag = -DINMEMORY_TRANSPORT
InMemoryObj = inmem.o
#endif /* ADD_INMEMORY_TRANSPORT */
#ifdef SIMPLE_BIND_DIRECTORY
SimpBindDir = SIMPLE_BIND_DIRECTORY
#else
SimpBindDir = /No_one_bothered_to_define_a_value_for_SIMPLE_BIND_DIRECTORY_at_ILU_installation_time
#endif

SimpBindFlag = -DILU_BINDING_DIRECTORY=\"$(SimpBindDir)\"

CDEBUGFLAGS = -g -DSUNOS $(CourierFlag) $(SunRPCFlag) $(DCERPCFlag) $(TCPIPFlag) $(UDPIPFlag) $(XNSSPPFlag) $(InMemoryFlag) $(SimpBindFlag)

CC_LINK =

ilu.h : iluxport.h

OBJS = alarmux.o \
	call.o \
	object.o \
	method.o \
	port.o \
	hash.o \
	connect.o \
	debug.o \
	locks.o \
	transprt.o \
	protocol.o \
	server.o \
	gc.o \
	vector.o \
	mainloop.o \
	type.o \
	$(SimpBindObj) \
	$(CourierObj) $(SunRPCObj) $(DCERPCObj) \
	$(TCPIPObj) $(UDPIPObj) $(InMemoryObj) $(XNSSPPObj)

call.o : call.c ilu.h iluntrnl.h protocol.h object.h call.h connect.h method.h transprt.h os/sunos.h os/unix.h
object.o : object.c ilu.h iluntrnl.h object.h server.h
method.o : method.c ilu.h iluntrnl.h method.h
port.o : port.c ilu.h iluntrnl.h protocol.h object.h mooring.h port.h transprt.h
hash.o : hash.c ilu.h iluntrnl.h hash.h
connect.o : connect.c ilu.h iluntrnl.h protocol.h connect.h transprt.h
sunrpc.o : sunrpc.c ilu.h iluntrnl.h protocol.h object.h call.h connect.h sunrpc.h method.h mooring.h pipe.h port.h transprt.h packet.h bffrlist.h Imakefile
dcerpc.o : dcerpc.c ilu.h iluntrnl.h protocol.h object.h call.h connect.h dcerpc.h method.h mooring.h pipe.h port.h transprt.h packet.h bffrlist.h Imakefile
tcp.o : tcp.c ilu.h iluntrnl.h mooring.h transprt.h bffrlist.h Imakefile os/sunos.h os/unix.h
spp.o : spp.c ilu.h iluntrnl.h mooring.h transprt.h bffrlist.h Imakefile os/sunos.h os/unix.h
debug.o : debug.c ilu.h iluntrnl.h
locks.o : locks.c ilu.h iluntrnl.h
transprt.o : transprt.c ilu.h iluntrnl.h transprt.h Imakefile
protocol.o : protocol.c ilu.h iluntrnl.h protocol.h transprt.h Imakefile
server.o : server.c ilu.h iluntrnl.h object.h server.h
inmem.o : inmem.c ilu.h iluntrnl.h mooring.h transprt.h Imakefile
courier.o : courier.c ilu.h iluntrnl.h protocol.h object.h call.h connect.h courier.h method.h mooring.h packet.h pipe.h port.h transprt.h bffrlist.h Imakefile
gc.o : gc.c ilu.h iluntrnl.h iluxport.h vector.h object.h call.h server.h type.h
text.o : text.c ilu.h iluntrnl.h protocol.h object.h call.h connect.h text.h method.h mooring.h pipe.h port.h transprt.h packet.h bffrlist.h Imakefile
tcpascii.o : tcpascii.c ilu.h iluntrnl.h mooring.h transprt.h bffrlist.h Imakefile os/sunos.h os/unix.h
type.o : type.c type.h object.h ilu.h iluntrnl.h iluxport.h
vector.o : vector.c ilu.h iluntrnl.h vector.h
mainloop.o : ilu.h iluxport.h iluntrnl.h
simpbind.o : ilu.h iluxport.h iluntrnl.h

LibraryTarget(libilu.a, $(OBJS))
InstallLibrary(libilu.a, $(DESTDIR)/lib)
InstallFile(ilu.h, -m 444, $(DESTDIR)/include)
InstallFile(iluxport.h, -m 444, $(DESTDIR)/include)
InstallFile(iludebug.h, -m 444, $(DESTDIR)/include)
InstallFile(oscalls.h, -m 444, $(DESTDIR)/include)

MkdirTarget($(SimpBindDir))

TestProgramTarget(testit, testskeleton.o, libilu.a,)

dist::
	rm -f version.h
	( echo "#define ILU_VERSION $(RELNUM)" ; echo "#define ILU_VERSION_STRING \"$(RELNUM)\"" ) >version.h
	chmod 444 version.h
