############################################################################
# $Id: Makefile,v 1.1.1.1 1996/06/30 00:09:05 mtp Exp $
############################################################################
# @Header@
############################################################################
# $Log: Makefile,v $
# Revision 1.1.1.1  1996/06/30 00:09:05  mtp
# Resubmission of PD DCE sources
#
# Revision 1.1.1.1  1995/12/31 05:20:10  mtp
# + Placed under CVS control
#
############################################################################
# 
# (c) Copyright 1994 OPEN SOFTWARE FOUNDATION, INC.
# (c) Copyright 1994 HEWLETT-PACKARD COMPANY
# (c) Copyright 1994 DIGITAL EQUIPMENT CORPORATION
# To anyone who acknowledges that this file is provided "AS IS"
# without any express or implied warranty:
#                 permission to use, copy, modify, and distribute this
# file for any purpose is hereby granted without fee, provided that
# the above copyright notices and this notice appears in all source
# code copies, and that none of the names of Open Software
# Foundation, Inc., Hewlett-Packard Company, or Digital Equipment
# Corporation be used in advertising or publicity pertaining to
# distribution of the software without specific, written prior
# permission.  Neither Open Software Foundation, Inc., Hewlett-
# Packard Company, nor Digital Equipment Corporation makes any
# representations about the suitability of this software for any
# purpose.
# 
#
include ${DCE}/Rules.mk

IDL	      = ../idl/idl_compiler/idl
IDLDIR	      = ../sys_idl
INCDIR	      = ../../inc
DEBUG         = ${GDB} -DDEBUG -DDSM_DEBUG
#DEBUG         = -O2 -DDEBUG -DDSM_DEBUG

CFLAGS	      += $(DEBUG) -I. -I../runtime -I../runtime/$(TARGET) \
                -I$(INCDIR) -DREMOTE_ENDPOINT_ACCESS -D_BSD -DNCK

DEST	      = .

EXTHDRS	      = ../runtime/$(TARGET)/comsoc_sys.h \
		../runtime/$(TARGET)/sysconf.h \
		../runtime/com.h \
		../runtime/comauth.h \
		../runtime/comfwd.h \
		../runtime/cominit.h \
		../runtime/commonp.h \
		../runtime/comnaf.h \
		../runtime/comp.h \
		../runtime/comprot.h \
		../runtime/comsoc.h \
		../runtime/comsoc_bsd.h \
		../runtime/comtwr.h \
		../runtime/comtwrflr.h \
		../runtime/comtwrref.h \
		../runtime/rpcclock.h \
		../runtime/rpcdbg.h \
		../runtime/rpcfork.h \
		../runtime/rpclist.h \
		../runtime/rpclog.h \
		../runtime/rpcmem.h \
		../runtime/rpcmutex.h \
		../runtime/rpcrand.h \
		../runtime/rpcsvc.h \
		../runtime/rpctimer.h

HDRS	      = dsm_p.h \
		rpcddb.h \
		rpcdepdb.h \
		rpcdepdbp.h \
		rpcdp.h \
		rpcdutil.h

INSTALL	      = /usr/bin/install

LD	      = $(CC)

LDFLAGS	      =

LIBS	      = ../runtime/libnck.a \
                ../idl/lib/libidl.a \
                ../runtime/libnck.a \
                ${PTHREAD_LIBS}

MAKEFILE      = Makefile

OBJS	      = dsm.o \
		dsm_unix.o \
		rpcddb.o \
                rpcd.o \
		rpcdep.o \
		rpcdepdb.o \
		rpcdsliv.o \
		rpcdutil.o \
		ep_sstub.o

PRINT	      = pr

PROGRAM       = rpcd

SHELL	      = /bin/sh

SRCS	      = dsm.c \
		dsm_unix.c \
		rpcddb.c \
		rpcdep.c \
		rpcdepdb.c \
		rpcdsliv.c \
		rpcdutil.c

SYSHDRS	      =

all:		$(PROGRAM)

$(PROGRAM): $(OBJS)
	@$(CC) $(CFLAGS) $(OBJS) $(LIBS) -o $(PROGRAM)

clean:;		@rm -f $(OBJS) rpcd core ep_sstub.c ep.h dsm.h *.bak *~

clobber:;	@rm -f $(OBJS) $(PROGRAM) core tags ep_sstub.c ep.h dsm.h

#
# dependencies and rules
#
ep_sstub.o: $(IDLDIR)/ep.idl
	@$(IDL) -keep object -no_cpp -v -no_mepv -cepv -client none \
	-I$(INCDIR) -cc_cmd "gcc -c -b i486-linuxaout -O2 -D_BSD -D_DCE_COMPAT_" \
	$(IDLDIR)/ep.idl
	@rm -f ep.h

dsm.h: dsm.idl
	$(IDL) -keep c_source -v -no_mepv -cepv -client none \
	-server none -I. -I$(INCDIR) -cc_cmd "gcc -c -b i486-linuxaout -O2 -D_BSD -D_DCE_COMPAT_" \
        dsm.idl

${OBJS}: dsm.h


# following dependencies are incomplete
dsm.o: dsm_p.h  \
	../runtime/commonp.h ../runtime/$(TARGET)/sysconf.h  \
	../runtime/rpclog.h \
	../runtime/rpcsvc.h   \
	../runtime/rpcfork.h ../runtime/rpcdbg.h \
	../runtime/rpcclock.h ../runtime/rpcmem.h ../runtime/rpcmutex.h \
	../runtime/rpctimer.h ../runtime/rpclist.h ../runtime/rpcrand.h \
	../runtime/com.h ../runtime/cominit.h ../runtime/comsoc.h \
	../runtime/$(TARGET)/comsoc_sys.h ../runtime/comsoc_bsd.h \
	../runtime/comfwd.h rpcdp.h rpcddb.h rpcdepdb.h \
	../runtime/commonp.h ../runtime/$(TARGET)/sysconf.h \
	../runtime/rpclog.h \
	../runtime/rpcsvc.h   \
	../runtime/rpcfork.h ../runtime/rpcdbg.h \
	../runtime/rpcclock.h ../runtime/rpcmem.h ../runtime/rpcmutex.h \
	../runtime/rpctimer.h ../runtime/rpclist.h ../runtime/rpcrand.h \
	../runtime/com.h ../runtime/cominit.h ../runtime/comsoc.h \
	../runtime/$(TARGET)/comsoc_sys.h ../runtime/comsoc_bsd.h rpcdp.h \
	rpcddb.h

rpcdep.o: ../runtime/commonp.h ../runtime/$(TARGET)/sysconf.h \
	../runtime/rpclog.h \
	../runtime/rpcsvc.h   \
	../runtime/rpcfork.h ../runtime/rpcdbg.h \
	../runtime/rpcclock.h ../runtime/rpcmem.h ../runtime/rpcmutex.h \
	../runtime/rpctimer.h ../runtime/rpclist.h ../runtime/rpcrand.h \
	../runtime/com.h ../runtime/cominit.h ../runtime/comsoc.h \
	../runtime/$(TARGET)/comsoc_sys.h ../runtime/comsoc_bsd.h rpcdp.h \
	rpcdepdb.h
rpcdepdb.o: ../runtime/commonp.h ../runtime/$(TARGET)/sysconf.h \
	../runtime/rpclog.h \
	../runtime/rpcsvc.h   \
	../runtime/rpcfork.h ../runtime/rpcdbg.h \
	../runtime/rpcclock.h ../runtime/rpcmem.h ../runtime/rpcmutex.h \
	../runtime/rpctimer.h ../runtime/rpclist.h ../runtime/rpcrand.h \
	../runtime/com.h ../runtime/cominit.h ../runtime/comsoc.h \
	../runtime/$(TARGET)/comsoc_sys.h ../runtime/comsoc_bsd.h \
	../runtime/comp.h ../runtime/comprot.h ../runtime/comnaf.h \
	../runtime/comauth.h rpcdp.h rpcddb.h rpcdepdb.h rpcdepdbp.h \
	rpcdutil.h ../runtime/comtwr.h
rpcdsliv.o: ../runtime/commonp.h ../runtime/$(TARGET)/sysconf.h \
	../runtime/rpclog.h \
	../runtime/rpcsvc.h   \
	../runtime/rpcfork.h ../runtime/rpcdbg.h \
	../runtime/rpcclock.h ../runtime/rpcmem.h ../runtime/rpcmutex.h \
	../runtime/rpctimer.h ../runtime/rpclist.h ../runtime/rpcrand.h \
	../runtime/com.h ../runtime/cominit.h ../runtime/comsoc.h \
	../runtime/$(TARGET)/comsoc_sys.h ../runtime/comsoc_bsd.h rpcdp.h \
	rpcddb.h rpcdepdbp.h rpcdutil.h
rpcdutil.o: ../runtime/commonp.h ../runtime/$(TARGET)/sysconf.h \
	../runtime/rpclog.h \
	../runtime/rpcsvc.h   \
	../runtime/rpcfork.h ../runtime/rpcdbg.h \
	../runtime/rpcclock.h ../runtime/rpcmem.h ../runtime/rpcmutex.h \
	../runtime/rpctimer.h ../runtime/rpclist.h ../runtime/rpcrand.h \
	../runtime/com.h ../runtime/cominit.h ../runtime/comsoc.h \
	../runtime/$(TARGET)/comsoc_sys.h ../runtime/comsoc_bsd.h rpcdp.h \
	rpcddb.h rpcdepdbp.h rpcdutil.h ../runtime/comtwr.h \
	../runtime/comtwrflr.h ../runtime/comtwrref.h
