RM		= rm

ftypes.h:	ftypes
		./ftypes
		- $(RM) -f *.o ftypes undersc undersc.h

ftypes:		undersc.h fcalls.o cmain.o
		$(CC) -o ftypes fcalls.o cmain.o

undersc.h:	undersc
		./undersc

undersc:	ccalls.o fmain.o
		$(FC) -o undersc ccalls.o fmain.o -lc

fcalls.o:	fcalls.f
		$(FC) $(FFLAGS) -c fcalls.f

fmain.o:	fmain.f
		$(FC) $(FFLAGS) -c fmain.f

ccalls.o:	ccalls.c
		$(CC) $(CFLAGS) -c ccalls.c

cmain.o:	cmain.c undersc.h
		$(CC) $(CFLAGS) -c cmain.c

clean:
		- $(RM) -f ftypes ftypes.h undersc undersc.h core *~ *.o
