# MAKEFILE for Pipes32 example 
#
# George Cross, Borland C++ Developer Support, March 1997
#
# Comments:  Makefile for Borland C++ 5.01.
#            \BIN\BCC32.CFG is used for compiler include directory settings.
#            \BIN\TLINK32.CFG is used for linker include directory settings.  
# 
#    MAKE                              Static version of the RTL/BIDS/OWL used
#    MAKE -D_RTLDLL                    Dynamic version of the RTL/BIDS/OWL used 
#    MAKE -DDEBUG                      Debug 
#            
#
# 
#   This file is part of the WinNT Pipes example demonstrating how to 
#   use anonymous pipes to communicate between a parent and child 
#   process through the child's STDIN/STDOUT. 
# 
#   This makefile ensures the child application, CHILD.EXE is built
#   first before building the parent application.
#


PROJ = parent  
OBJS  = $(PROJ).obj decframe.obj
RESES = $(PROJ).res

CDEFINES = -DSTRICT             \                          
           -D_OWLPCH
          
CPCH   = -H=$(PROJ).csm -Hc
CFLAGS = $(CDEFINES) /c $(CPCH)                #Compile options
LFLAGS = /Tpe /aa /c                           #Link options
RFLAGS = /i$(MAKEDIR)\..\include               #Resource compiler options

!if "$(DEBUG)" == "1"                          #Debug info included or not..
  CFLAGS = $(CFLAGS) -v
  LFLAGS = $(LFLAGS) /v
!endif

!if "$(_RTLDLL)" == "1"                        #Static or dynamic RTL
  RTLLIB = cw32i
  BIDSLIB = bidsfi
  OWLLIB = owlwfi
!else
  RTLLIB = cw32
  BIDSLIB = bidsf
  OWLLIB = owlwf
!endif

$(PROJ).exe:  child.exe  $(OBJS) $(RESES)        #Target makes child app first
	TLINK32 $(LFLAGS) @&&|                    
	c0w32 $(OBJS)                            #Startup and objs
	$&                                       #Target
                                                 #Map file 
        $(RTLLIB) $(BIDSLIB) $(OWLLIB) import32  #Static and import libraries
                                                 #Module definition file
        $(RESES)                                 #Resources
|

.cpp.exe: 
  bcc32 -v $&
.cpp.obj:
  bcc32 $(CFLAGS) $&
.rc.res:
  brcc32 $(RFLAGS) $<

clean: 
  @del $(PROJ).exe CHILD.exe *.obj *.map *.res *.csm /s 

