# --------------------------------------------------------------------
#
#                     Microsoft RPC
#          Copyright(c) Microsoft Corp., 1990-94
#
# --------------------------------------------------------------------
# --------------------------------------------------------------------
#
# File : makefile.
#
# Title : Makefile for the DOS RPC runtime interfaces
#
# Description :
#         This just compiles the .idl files and puts the stubs in
#         ..\..\mtrt\win32c
#
# History :
#
# --------------------------------------------------------------------

!ifndef RPC
!error	- You forgot to set your build environment
!endif

WIN32C=1

!include ..\rules.mk

TARGETDIR=$(RPC)\runtime\mtrt\win32c

MGMT_HDR  =$(TARGETDIR)\mgmt.h
MGMT_CSTUB=$(TARGETDIR)\mgmt_c.c
MGMT_SSTUB=$(TARGETDIR)\mgmt_s.c

#Conv not needed because datagram not currently support on Chicago
#CONV_HDR  =$(TARGETDIR)\conv.h
#CONV_CSTUB=$(TARGETDIR)\conv_c.c

# Currently the epmp_c.c stub is checked in to work around
# a problem with unique pointer (511 era) servers.
EPMP_HDR  =$(TARGETDIR)\epmp.h
EPMP_CSTUB=$(TARGETDIR)\epmp_c.gen
EPMP_SSTUB=$(TARGETDIR)\epmp_s.c

MIDLFLAGS= $(MIDLFLAGS) -prefix cstub _

all : mgmt epmp

clean ::
    -del $(EPMP_CSTUB) $(EPMP_HDR) $(MGMT_CSTUB) $(MGMT_HDR) >nul 2>&1

depend :

tree :

# -------------------------------------------------------------
# Local targets
#

MIDLFLAGS      =$(MIDLFLAGS) -c_ext -ms_ext -oldnames
CPP_CLIENT_OPT = -cpp_opt "-I..\..\mtrt -E -nologo"

epmp: $(EPMP_HDR) $(EPMP_CSTUB) $(EPMP_SSTUB)

$(EPMP_HDR) $(EPMP_CSTUB) $(EPMP_SSTUB): ..\epmp.idl ..\epmp.acf ..\nbase.idl
    $(MIDL) $(MIDLFLAGS) $(CPP_CLIENT_OPT) \
    -header $(EPMP_HDR) -cstub $(EPMP_CSTUB) \
    -sstub $(EPMP_SSTUB) -caux nul -saux nul         \
    ..\epmp.idl

mgmt: $(MGMT_HDR) $(MGMT_CSTUB) $(MGMT_SSTUB)

$(MGMT_HDR) $(MGMT_CSTUB) $(MGMT_SSTUB): ..\mgmt.idl ..\mgmt.acf ..\nbase.idl
    $(MIDL) $(MIDLFLAGS) $(CPP_CLIENT_OPT) \
    -header $(MGMT_HDR) -cstub $(MGMT_CSTUB) \
    -sstub $(MGMT_SSTUB) -caux nul -saux nul         \
    ..\mgmt.idl

