# Makefile for portability testing program for CONGEN

FC = gfortran -g -fdefault-real-8 -fdefault-integer-8 -fno-second-underscore -fno-f2c
CC = gcc -g
OBJS = porttestf.o porttestc.o porttestc2.o
SRCS = porttestf.f porttestc.c porttestc2.c test.ref Makefile

test: porttest test.ref
	./porttest >test.out
	diff test.out test.ref

porttest: $(OBJS)
	$(FC) -o porttest $(OBJS)

porttestf.o: porttestf.f
	$(FC) -c porttestf.f

porttestc.o: porttestc.c
	$(CC) -c porttestc.c

porttestc2.o: porttestc2.c
	$(CC) -c porttestc2.c

porttest.shar: $(SRCS)
	shar >porttest.shar $(SRCS)

clean:
	-rm -f *.o porttest test.out porttest.shar

