# Make

### Rules for Creations
SHELL=/bin/sh
.SUFFIXES: 
.SUFFIXES: .f .Z .c .o

.Z:
	uncompress -v $@

.f: 
	f77 $< -o $@
	strip $@

.c: 
	cc $< -o $@ -lcurses -ltermcap
	strip $@

.c.o:
	cc -c $<

.f.o:
	f77 -c $<


BINDIR = ../`uname -m`

FOBJ   = binaire.o chaine.o curseur.o diag.o dialogue.o geank.o gestion.o \
         intersec.o isochrone.o kernig.o lynga.o membership.o menu_eng.o\
          menu_fr.o position.o reste.o selection.o supongo.o
PROGS  = diag

all: $(PROGS)

install: $(PROGS)
	d=../`uname -m`; \
	if [ ! -d $$d ] ; then mkdir $$d ; else echo exists $$d ; fi ; \
	mv $(PROGS) $$d

clean:
	rm -f $(PROGS)
	rm -f *.o


diag : $(FOBJ)
	f77 -O -o diag $(FOBJ) -lc -lsm -lm -lsuntool -lsunwindow \
	-lpixrect -lX11

diag.o : diag.c diag.h dialogue.h fonction.h

binaire.o : binaire.c diag.h

curseur.o : curseur.c diag.h

geank.o : geank.c diag.h

gestion.o : gestion.c diag.h

intersec.o : intersec.c diag.h

kernig.o : kernig.c diag.h

lynga.o : lynga.c diag.h

membership.o : membership.c diag.h
 
position.o : position.c diag.h

reste.o : reste.c diag.h

selection.o : selection.c diag.h

supongo.o : supongo.c diag.h
