#############################################################################
#       $Id: GNUmakefile,v 1.31 1996/03/19 02:31:37 reids Exp $
# $Revision: 1.31 $
#     $Date: 1996/03/19 02:31:37 $
#   $Author: reids $
#    $State: Exp $
#   $Locker:  $
#
# PROJECT:	TCA
#
# FILE:		GNUmakefile
#		Based on Erebus prototypical Makefile
#		Makefile.proto,v 1.1 1992/06/16 22:50:21 jwest Exp 
#
# DESCRIPTION:
# Makes the tca libraries and central server.
#
# EXPORTS:
#	The following targets are available as part of Makefile.std:
#		all bins libs privs objs
#		clean install
#		lint depend
#
# HISTORY:
#
# $Log: GNUmakefile,v $
# Revision 1.31  1996/03/19  02:31:37  reids
# Added test code for new V8.5 features: tcaQueryNotify, tcaAddEventHandler,
#   tcaRemoveEventHandler, and enumerated formats.
#
# Revision 1.30  1996/02/11  21:35:08  rich
# Updated GNUmakefiles for faster complilation.  Use FAST_COMPILE=1 for
# routine recompiles.
#
# Revision 1.29  1996/02/06  19:25:48  rich
# Adding windows NT examples.
#
# Revision 1.28  1996/02/06  19:06:13  rich
# Changes for VXWORKS pipes.
# Note: the trtest function causes a race condition.  I start the
# sub-processes individually.
#
# Revision 1.27  1996/01/27  21:55:34  rich
# Pre-release of 8.4.
# Added test for recursive named types.
# Iain's windows changes.
#
# Revision 1.26  1996/01/12  00:53:35  rich
# Simplified GNUmakefiles.
#
# Revision 1.25  1996/01/08  18:17:13  rich
# Changes for vxWorks 5.2.
#
# Revision 1.24  1996/01/05  16:32:52  rich
# Added windows NT port.
#
# Revision 1.23  1995/12/17  20:23:09  rich
# Flush stdout to work better with nanny.
#
# Revision 1.22  1995/10/07  19:08:34  rich
# Pre-alpha release of tca-8.2.
# Added PROJECT_DIR. Added tcaWillListen.
#
# Revision 1.21  1995/07/12  04:56:11  rich
# Release of 8.0.
# Added test for new features.
#
# Revision 1.20  1995/07/08  17:51:23  rich
# Linux Changes.  Also added GNUmakefile.defs.
#
# Revision 1.19  1995/07/06  21:18:47  rich
# Solaris and Linux changes.
#
# Revision 1.18  1995/06/14  03:23:36  rich
# Added DBMALLOC_DIR.
#
# Revision 1.17  1995/04/09  20:30:49  rich
# Added /usr/local/include and /usr/local/lib to the paths for compiling
# for sunOS machines. (Support for new vendor OS).
#
# Revision 1.16  1995/04/07  05:04:34  rich
# Fixed GNUmakefiles to find the release directory.
# Moved all system includes into libc.h
# Fixed problems found by sgi cc compiler.  Many type problems.
#
# Revision 1.15  1995/04/04  19:44:30  rich
# Added sgi support.
#
# Revision 1.14  1995/03/30  15:48:45  rich
# DBMALLOC works.  To use "gmake -k -w DBMALLOC=DBMALLOC install"
# Changed Boolean -> BOOLEAN for consistency and to avoid conflicts with x11.
#
# Revision 1.13  1995/03/19  19:43:27  rich
# Modified a1 and b1 to use direct connections.
# Added a benchmark (sender3_1 and receiver3_1) to test direct connections.
#
# Revision 1.12  1995/03/16  18:05:48  rich
# Merged in changes to the 7.9 branch.
# Changed the VERSION_ to TCA_VERSION_
#
# Revision 1.11  1995/02/03  03:58:40  rich
# Added forwarding code and changes needed to GNUmakefile and common.h.
#
# Revision 1.10  1995/01/31  00:59:48  rich
# Fixed CFLAGS so -gstabs comes after -g for i386_mach.
# Fill test messages with sequential numbers.
#
# Revision 1.9  1995/01/18  16:48:43  rich
# Saving changes to the test routines so I can compare 7.8 and 7.9.
#
# Revision 1.8  1994/11/02  21:36:03  rich
# Now works for linux machines (i486).
# Got afs to work on alpha (and hopefully other vendor OS's)
# Added generic Makefile and asynchronous sender/receiver.
# Made libc.h and tcaMatrix.h module includes.
#
# Revision 1.7  1994/05/31  03:24:56  rich
# Removed CFLAGS_sun4.
# Optimized the sender and receiver benchmarks.
#
# Revision 1.6  1994/05/25  17:16:18  reids
# Added test code for limiting the number of pending messages a resource
# can handle
#
# Revision 1.5  1994/05/25  05:00:30  rich
# Changed the test routines to use the new macros for registering simple
# messages and handlers.
# Added Terry Fong's benchmark.
#
# Revision 1.4  1994/05/17  23:20:31  rich
# Added global variable test routines a1_var and b1_var.  Also make some
# changes so it would compile on an sgi machine.
#
# Revision 1.3  1994/05/11  01:58:38  rich
# Moved all version information to the src directory.
#
# Revision 1.2  1994/05/06  05:18:23  rich
# Removed duplicate log entries.
#
# Revision 1.1  1994/05/06  04:47:59  rich
# Added GNUmakefile.
#
#############################################################################

#############################################################################
# Module Configuration Macros
#############################################################################

PROJECT_DIR	= /afs/cs/project/TCA/release/alpha

INSTALL_DIR	= ..
ifndef BASE_DIR
BASE_DIR	:= $(shell cd $(INSTALL_DIR);/bin/pwd)
endif
MODULE_DIR	= test
PROJECT		= tca
MODULE		= test
SUBDIRS		=
DEPEND_FILE	= GNUmakefile.$(THIS_MACHINE)
DEPEND_PREFIX	= $(ODIR)/ 

#############################################################################
# Where are the standard files?
#############################################################################

ifndef FAST_COMPILE
PWD 	:= $(shell /bin/pwd)
endif

ifndef STD_FILE
STD_FILE := $(shell ls $(BASE_DIR)/etc/GNUmakefile.std | grep -v "not found")
ifeq ($(STD_FILE),)
STD_FILE := $(PROJECT_DIR)/etc/GNUmakefile.std
endif
DEFS_FILE := $(shell ls $(BASE_DIR)/etc/GNUmakefile.defs | grep -v "not found")
ifeq ($(DEFS_FILE),)
DEFS_FILE := $(PROJECT_DIR)/etc/GNUmakefile.defs
endif
endif

##########
# Include standard definitions
##########

include $(DEFS_FILE)

##########
# Override defaults here.
##########

##########
# File Definition Macros.  Deletion of generated files assumed
#    to be o.k.  Source files will never be deleted.
##########

# Generated files - installed
PUBLIC_BINS		= 
PUBLIC_LIBS		= 
PUBLIC_LINTS		= 

MODULE_LIBS		= 
MODULE_LINTS		= 

# Source files - installed
PUBLIC_INCS		= 
PUBLIC_MANS		= 
PUBLIC_DOCS		= 

MODULE_INCS		= 
MODULE_DOCS		= 

INCS			= $(MODULE_INCS) $(PUBLIC_INCS)

# Generated files - not installed
PRIVS	= a1 b1 a1_var b1_var exceptTest m1 mt mt1 t2 sender sender2 \
	sender3 sender4 receiver receiver2 receiver3 receiver4 lt1 lt2 \
	broadcast listener forwarder test79 receiver3_1 sender3_1\
	tca_sample hndReg test85


_OBJS	= a1.o a1_var.o b1.o b1_var.o b1_old.o exoeptTest.o \
	m1.o mt.o mt1.o t2.o lt1.o lt2.o sender.o sender2.o sender3.o \
	sender4.o receiver.o receiver2.o receiver3.o receiver4.o \
	exceptTest.o broadcast.o listener.o forwarder.o \
	receiver3_1.o  sender3_1.o hndReg.o test79.o test85.o

OBJS	= $(patsubst %,$(ODIR)/%,$(_OBJS))

# Source files - not installed

SRCS            = a1.c a1_old.c b1.c b1_old.c exceptTest.c m1.c mt.c \
		mt1.c t2.c a1_var.c b1_var.c sender.c sender2.c sender3.c\
		sender4.c receiver.c receiver2.c receiver3.c receiver4.c\
		lt1.c lt2.c broadcast.c listener.c forwarder.c\
		receiver3_1.c sender3_1.c hndReg.c test79.c tca_sample.cc \
		trtest.c winnt_a.c winnt_b.c test85.c

PRIVATE_INCS	= sample.h sample_old.h common.h lt.h wnntprim.h

MISC		= GNUmakefile README Makefile.generic Makefile.bcc \
		windowNT.mak makefile.vx

##########
# Default Target
##########

all:: srcs libs bins privs

##########
# User Defined Targets
##########

# Define rules for all files listed in BINS, LIBS, and LINTS in this section.
# Example executable, object, library, and combined objects are shown below:
#
#  $(BDIR)/sample: file1.o file2.o $(LIBDEP)
#	$(LINK.c) -o $@ file1.o file2.o $(LIBRARIES)
#
#  $(ODIR)/alternateName.o: file1.c
#	$(COMPILE.c) -o $@ file1.c
#
#  $(LDIR)/libsample.a: file1.o file2.o
#	-$(RM) $@
#	$(AR) $(ARFLAGS) $@ file1.o file2.o
#	$(RANLIB) $@
#
#  $(ODIR)/combined.o: $(ODIR)/part1.o $(ODIR)/part2.o
#	$(LD) -r -o $@ $(ODIR)/part1.o $(ODIR)/part2.o; chmod a-x $@

##########
# Include standard target definitions and RCS rules
##########

include $(STD_FILE)
