#############################################################################
#       $Id: GNUmakefile,v 1.5 1996/02/11 21:35:13 rich Exp $
# $Revision: 1.5 $
#     $Date: 1996/02/11 21:35:13 $
#   $Author: rich $
#    $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.5  1996/02/11  21:35:13  rich
# Updated GNUmakefiles for faster complilation.  Use FAST_COMPILE=1 for
# routine recompiles.
#
# Revision 1.4  1996/02/01  04:03:57  rich
# Generalized updateVersion and added recursion.
#
# Revision 1.3  1996/01/31  22:54:28  reids
# Added automatic updating of (micro) version control numbers
#
# Revision 1.2  1996/01/12  00:53:45  rich
# Simplified GNUmakefiles.
#
# Revision 1.1  1995/10/29  18:29:31  rich
# Initial version of the message bridge.  It allows messages to be sent
# from one central server to another.
#
#
#############################################################################

#############################################################################
# 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	= tools/bridge
PROJECT		= tca
MODULE		= bridge
SUBDIRS		=
DEPEND_FILE	= GNUmakefile.$(THIS_MACHINE)
DEPEND_PREFIX	= $(ODIR)/ 
VERSION_FILE	= bridge.h
VERSION_PREFIX	= BRIDGE

#############################################################################
# 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.
##########

LIBRARIES	= -lDevUtils -ltca $(LIBS_$(THIS_OS)) $(LIBS_$(DBMALLOC))

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

# Generated files - installed
PUBLIC_BINS		= bridge
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	= 

_OBJECTS	= bridge.o

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

# Source files - not installed

SRCS            = bridge.c

PRIVATE_INCS	= bridge.h

MISC		= GNUmakefile README

##########
# 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 $@

$(BDIR)/bridge: $(OBJS) $(LIBDEP)
	$(LINK.c) -o $@ $(OBJS) $(LIBRARIES)

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

include $(STD_FILE)
