#++++++++++++++++
#.IDENTIFICATION Makefile
#.LANGUAGE       Make (makefile script)
#.AUTHOR         J.-Cl. Mermilliod / +41 22 755 2611
#.ENVIRONMENT    Unix
#.KEYWORDS       
#.VERSION  1.0   14-Mar-1996
#.PURPOSE        (Re)Create dependent files in this Directory
#.COMMENTS       The script check.sys is assumed to exist.
#		It creates in a local file .sys the `uname -m` value
#		followed by the necessary -l options
#----------------

SHELL=/bin/sh

# Defaut rule (e.g. copy from a public directory)
.DEFAULT:

# Programs:
CC      = cc
COPY    = cp -p
STRIP   = strip
RANLIB  = ranlib
AR      = ar ruv

# Directories:
MANDIR  = /usr/$(MACHINE)/man
LIBFILE = lib$(MACHINE).a

# Files:
SYSTEMS = progc progf progs progx graphic
MAN     =

# Options:

# RULES: If the default rules haven't to be applied, remove the #
#.SUFFIXES: 
#.SUFFIXES: .tex .dvi .c .o

# Dependencies:
all:
	-for d in $(SYSTEMS) ; do\
	    cd $$d ; pwd ; for f in `ls *.Z` ;  do \
		uncompress -v $$f ; \
	    done ; \
	    $(MAKE) $(MAKEFLAGS) ; \
	    cd .. ; \
	done

# Installation:
install: install_bin install_shs

install_bin: $(BIN)
	check.sys
	$(COPY) $? $(BINDIR)

install_shs: $(SHS)
	$(COPY) $? $(SHSDIR)

# Clean up everything
clean:
	rm -f core a.out *.o *.log *.lis *.dvi *.ps *.aux *.trace
	rm -f .sys

CLEAN:	clean
	rm *.a $(BIN)


