##############################################################################
#                                                                            #
#    Makefile,v
#    Makefile for directory add
#                                                                            #
#    Copyright (C) 1995 A. Bode, S. Lamberts, T. Ludwig, C. R"oder           #
#                                                                            #
#    PFSLib (Parallel I/O on workstations)                                   #
#                                                                            #
#    PFSLib offers parallel access to files for a parallel application       #
#    running on a cluster of workstations.                                   #
#    It is intended but not restricted to be used in message passing         #
#    applications based on PVM, NXLib, MPI, and other.                       #
#                                                                            #
#    PFSLib consists of a LIBRARY, deamon PROGRAMS, and utility PROGRAMS.    #
#                                                                            #
#    PFSLib is free software; you can redistribute the LIBRARY and/or        #
#    modify it under the terms of the GNU Library General Public             #
#    License as published by the Free Software Foundation; either            #
#    version 2 of the License, or (at your option) any later version.        #
#    You can redistribute the daemon PROGRAMS and utility PROGRAMS           #
#    and/or modify them under the terms of the GNU General Public            #
#    License as published by the Free Software Foundation; either            #
#    version 2 of the License, or (at your option) any later version.        #
#                                                                            #
#    PFSLib is distributed in the hope that it will be useful,               #
#    but WITHOUT ANY WARRANTY; without even the implied warranty of          #
#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU       #
#    Library General Public License and GNU General Public License           #
#    for more details.                                                       #
#                                                                            #
#    You should have received a copy of the GNU Library General Public       #
#    License and the GNU General Public License along with this              #
#    library; if not, write to the Free                                      #
#    Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.      #
#                                                                            #
#    Contact to the authors:                                                 #
#                                                                            #
#    electronic mail: pfslib@informatik.tu-muenchen.de                       #
#                                                                            #
#    paper mail:      Prof. Dr. A. Bode                                      #
#                     Lehrstuhl f"ur Rechnertechnik und                      #
#                     Rechnerorganisation                                    #
#                     Institut f"ur Informatik                               #
#                     Technische Universit"at M"unchen                       #
#                     80290 M"unchen                                         #
#                     Germany                                                #
#                                                                            #
#    This project was partially funded by a research grant form Intel        #
#    Corporation.                                                            #
#                                                                            #
##############################################################################


##############################################################################
#                                                                            #
#  RCS Filename : Makefile,v
#  RCS Date     : 1996/04/24 14:24:37
#  RCS Revision : 1.1
#  RCS Author   : lamberts
#  RCS State    : V2_0_B
#                                                                            #
#  Authors: Stefan Lamberts                                                  #
#                                                                            #
##############################################################################


##############################################################################
# Macros                                                                     #
##############################################################################

SHELL		= /bin/sh

PFSDPATH	= ../pfsd
INCLUDEPATH	= ../include

ANSI_C		= -DANSI_C
CC		= gcc
CFLAGS		= -ansi -g
CPPFLAGS	= -I$(INCLUDEPATH) -I$(PFSDPATH) $(ANSI_C) -D$(ARCH) $(CPPDEFINES) $(ARCHCPPFLAGS)

LINT		= lint
LINTFLAGS	= -a -b -c -h 
# lint option to create .ln file
LINT_ln		= -i

RM		= rm -f

##############################################################################
# Suffixes                                                                   #
##############################################################################

.SUFFIXES: .ln $(SUFFIXES)

.c.o:
	$(CC) $(CFLAGS) $(CPPFLAGS) -c $<

.c.ln:
	$(LINT) $(LINTFLAGS) $(CPPFLAGS) $(LINT_ln) $<

##############################################################################
# Additional files                                                           #
##############################################################################

SRC		=\
	add_auth.c\
	add_error.c\
	add_xdr.c

OBJ		= $(SRC:.c=.o)

LNOBJ		= $(SRC:.c=.ln)

##############################################################################
# Main targets                                                               #
##############################################################################

all: $(OBJ)

add_objs: $(OBJ)

##############################################################################
# Installation                                                               #
##############################################################################

inst_files:

unist_files:

##############################################################################
# Dependencies and rules                                                     #
##############################################################################

add_auth.ln \
add_auth.o:

add_error.ln \
add_error.o:\
	$(INCLUDEPATH)/pfslib_errno.h

add_xdr.ln \
add_xdr.o:\
	$(PFSDPATH)/pfsd.h\
	$(INCLUDEPATH)/global.h

##############################################################################
# Additional targets                                                         #
##############################################################################

tags: TAGS

TAGS: $(SRC)
	etags -t $(SRC)

lint: $(LNOBJ) $(RPCLNOBJ)
	$(LINT) $(LINTFLAGS) $(LNOBJ) $(RPCLNOBJ)

cflow: $(SRC)
	cflow $(CPPFLAGS) -i_ $(SRC) > $@

rcflow: $(SRC)
	cflow $(CPPFLAGS) -r -i_ $(SRC) > $@

clean:
	$(RM) *.o *.ln $(LIBPFS)

realclean: clean
	$(RM) cflow rcflow TAGS *~

##############################################################################
# End of Makefile                                                            #
##############################################################################
