###############################################################################
##
##  Makefile:  psLib
##
##  $Revision: 1.4 $  $Name: not supported by cvs2svn $
##  $Date: 2004-04-23 23:40:52 $
##
##  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
##
###############################################################################

# Define variable prefix to the top level project - psLib
# This is necessary for definition in Makefile.Globals

ifndef prefix
    export prefix=$(shell cd ..;pwd)
endif

# Include the make global definitions for the project

include Makefile.Globals

# Detect and save the CVS for this makefile

NAME:= "$Name: not supported by cvs2svn $ "
ifeq ($(NAME), "ame:  $ ")
   VERSION:= ": Project Version: Unknown "
else
   VERSION:= ": Project Version: $(NAME) "
endif

# Define the target to build

ALLTARGETS = sysUtils

# Define the installation targets

INSTALLTARGETS = installSysUtils

# Define the clean up targets

CLEANTARGETS = cleanSysUtils

# Define the distribution clean up targets

DISTCLEANTARGETS = distcleanSysUtils

# Define PHONY target "all" which will make all necessary items

all:	$(ALLTARGETS)  
	@echo ""
	@echo "    ---- All targets built successfully $(VERSION) ----"
	@echo ""

# Define PHONY target "sysUtils" which will make the system utilites
# portion of the psLib

sysUtils:
	$(MAKE) --directory=sysUtils all

## ADD ADDITIONAL PORTIONS OF PSLIB HERE

# Define PHONY target "installSysUtils" which will install all the necessary
# files for system utilities portion of psLib

installSysUtils:
	$(MAKE) --directory=sysUtils install

# Define PHONY target "cleanSysUtils" which will clean up the development
# area for system utilites

cleanSysUtils:
	$(MAKE) --directory=sysUtils clean

# Define PHONY target "distcleanSysUtils which will clean up the distribution
# files related to system utilities

distcleanSysUtils:
	$(MAKE) --directory=sysUtils distclean

# Rule to make include directory if needed

$(includedir):
	mkdir -p $(includedir)

# Rule to make bin directory if needed

$(bindir):
	mkdir -p $(bindir)

# Rule to make lib directory if needed

$(libexecdir):
	mkdir -p $(libexecdir)

# Rule to make man directory if needed
       
$(mandir): 
	mkdir -p $(mandir)
        
$(mandir)/man3: $(mandir)
	mkdir -p $(mandir)/man3

# Rule to make the installation directories if needed

installdirs: $(includedir) $(bindir) $(libexecdir) $(mandir)

# Define PHONY target "install" to make the necessary directories for
# the installation

install: installdirs $(INSTALLTARGETS) docs

# Define PHONY target "clean" to clean up the development areas for
# psLib

clean: $(CLEANTARGETS)

# Define PHONY target "distclean" to clean up the distribution area for
# psLib

distclean: $(DISTCLEANTARGETS)

# Define PHONY target "docs" to generate the Doxygen files for psLib
        
docs:
	$(DOCS)

tags:	
	cd $(IPPROOT) ; etags `find . \( -name \*.[chy] -o -name \*.cpp \) -print`

# List of PHONY targets with make file
.PHONY:  sysUtils
