SHELL = /bin/sh NPROCS = 1 # Note: several of the example applications require gmake MAKE = gmake #helpon ################################################################# # Makefile for the KeLP distribution # # # # Allowable external targets: # # # # gmake help print out this top banner message # # gmake all make KeLP and example applications # # gmake libraries make the KeLP libraries # # gmake examples make the KeLP examples # # gmake test run the interactive test script # # gmake clean remove all files generated by the make # # # # Set the shell variable KELP_HOME to the current directory # # # # You MUST run "configure" prior to making KeLP. Try # # configure # # or # # configure XXX # # to generate a list of valid options. # # # # Author: Stephen Fink # # Revised: Richard Frost, 4/99 # ################################################################# #helpoff ################################################################# COMPRESS = compress TAR = tar cfo SHAR = shar -C MISC = bin config configure include Makefile lib LIBDIRS = mp++ array tools kelp dock dgrid EXAMPLEDIR = examples TESTDIR = tests ifdef KELP_HOME include $(KELP_HOME)/arch endif ################################################################# help: @awk '/#helpon/, /#helpoff/' Makefile | \ egrep -v "(helpon|helpoff)" | more all: libraries examples libraries: archexists @$(ECHO) @$(ECHO) "Making the KeLP libraries and links for include files" @$(ECHO) "------------------------------------------------------" @$(ECHO) if [ ! -d $(LIBRARY) ] ; then mkdir -p $(LIBRARY); fi @ for DIR in $(LIBDIRS) ; do \ ( \ cd $$DIR ; \ $(MAKE) library ; \ if [ $$? -ne 0 ] ; then exit 1 ; fi \ ) \ done examples: archexists @$(ECHO) @$(ECHO) "Making the KeLP examples" @$(ECHO) "------------------------" @$(ECHO) @ cd $(EXAMPLEDIR) ; $(MAKE) ARCHITECTURE=$(ARCHITECTURE) all test: archexists @$(ECHO) @$(ECHO) "Testing the KeLP installation" @$(ECHO) "-----------------------------" @$(ECHO) $(TESTDIR)/test.$(ARCHITECTURE).sh clean: archexists @$(ECHO) @$(ECHO) "Cleaning up the KeLP directories" @$(ECHO) "--------------------------------" @$(ECHO) @ for DIR in $(LIBDIRS) ; do \ ( \ cd $$DIR ; \ $(MAKE) clean ; \ if [ $$? -ne 0 ] ; then exit 1 ; fi \ ) \ done @$(ECHO) @$(ECHO) "Cleaning up the Example directories" @$(ECHO) "-----------------------------------" @$(ECHO) @if [ -d $(EXAMPLEDIR) ] ; then \ ( \ cd $(EXAMPLEDIR) ; \ $(MAKE) ARCHITECTURE=$(ARCHITECTURE) clean ; \ ) \ fi @$(ECHO) @$(ECHO) "Removing Library and Configuration" @$(ECHO) "----------------------------------" @$(ECHO) $(RM) -r lib/* @ $(RM) arch ; touch arch ifdef KELPLIBS ARCHDEF = yes else ARCHDEF = endif archexists: homeexists @ if [ -z "$(ARCHDEF)" ] ; then \ echo "WARNING..............." ; \ echo "KeLP has been cleaned." ; \ echo "" ; \ echo "You must run "configure" prior to making KeLP. Try"; \ echo " configure" ; \ exit 1 ; \ fi homeexists: @ if [ -z "$(KELP_HOME)" ] ; then \ echo "ERROR................." ; \ echo "The shell environment variable KELP_HOME must be set" ; \ echo "prior to executing $(MAKE)." ; \ exit 1 ; \ fi