# "@(#)46        1.6  src/examples/ems/makefile.bor, examples.src, os2dce21.dss, 960602a.1  4/5/96  15:36:54"
#
#/********************************************************************
# COMPONENT_NAME:  examples.src
#
# FUNCTIONS: makefile for EMS sample application [Borland C++] [HPFS]
#
# ORIGINS: 27
#
# (C) COPYRIGHT International Business Machines Corp. 1995
#  All Rights Reserved
#  Licensed Materials - Property of IBM
#
#  US Government Users Restricted Rights - Use, duplication or
#  disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
#
#********************************************************************/

# See README.EXAMPLES in order to configure the Examples command files.
!INCLUDE <DCE_DIRS>

WARNINGS = /w-rch /w-pia
STACK    = /stack:128000

# inference rules
.c.obj:
   $(CC) @$(STEM)\cflags_ems.bor $(INCL_FLAGS) $(PFLAGS) -o$@ $*.c

# targets
all: supplier.exe consumer.exe dcesup.cat

consumer_OBJS = consumer.obj
supplier_OBJS = supplier.obj dcesupsvc.obj dcesupmsg.obj
SVC_H         = dcesupmac.h dcesupmsg.h dcesupsvc.h
SVC_C         = dcesupmsg.c dcesupsvc.c
FROMSAMS      = $(SVC_H) $(SVC_C) dcesup.cat dcesupmsg.idx dcesupmsg.man dcesupmsg.sml

consumer.obj: consumer.c consumer.h
   $(CC) @$(STEM)\cflags_ems.bor $(WARNINGS) $(INCL_FLAGS) $(PFLAGS) -o$@ $*.c
supplier.obj: supplier.c $(SVC_H)

consumer.exe: $(consumer_OBJS)
   $(LD) $(LDFLAGS) $(STACK) $(IBMC_lib)\c02 $(consumer_OBJS), $*.exe, $*.map, $(LDLIBS);

supplier.exe: $(supplier_OBJS)
   $(LD) $(LDFLAGS) $(STACK) $(IBMC_lib)\c02 $(supplier_OBJS), $*.exe, $*.map, $(LDLIBS);

$(FROMSAMS): sup.sams
   $(SAMS) $(SAMS_FLAGS) sup.sams
   -del dcesup.msg
   -del .idl

clean:
   -del $(consumer_OBJS) $(supplier_OBJS) $(FROMSAMS) consumer.map supplier.map

rmtarget:
   -del consumer.exe supplier.exe

clobber: clean rmtarget

