From 959026aad575ed1470b7217e83c8d108f0738974 Mon Sep 17 00:00:00 2001 From: Joe Taylor Date: Thu, 1 Feb 2024 16:07:55 -0500 Subject: [PATCH] Makefile for rstest. --- lib/superfox/Makefile | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 lib/superfox/Makefile diff --git a/lib/superfox/Makefile b/lib/superfox/Makefile new file mode 100644 index 000000000..6e3127f51 --- /dev/null +++ b/lib/superfox/Makefile @@ -0,0 +1,34 @@ +CC = gcc +FC = gfortran +FFLAGS = -O2 -Wall -fbounds-check +CFLAGS= -O9 -Wall + +# Default rules +%.o: %.c + ${CC} ${CFLAGS} -c $< +%.o: %.f + ${FC} ${FFLAGS} -c $< +%.o: %.F + ${FC} ${FFLAGS} -c $< +%.o: %.f90 + ${FC} ${FFLAGS} -c $< +%.o: %.F90 + ${FC} ${FFLAGS} -c $< + +all: rstest + +OBJS2 = rstest.o init_rs_sf.o encode_rs_sf.o decode_rs_sf.o \ + rs_sf.o ran1.o +rstest: $(OBJS2) + $(FC) -o rstest $(OBJS2) + +init_rs_sf.o: init_rs.c + gcc -DBIGSYM=1 $(CFLAGS) -c -o $@ $^ +encode_rs_sf.o: encode_rs.c + gcc -DBIGSYM=1 $(CFLAGS) -c -o $@ $^ +decode_rs_sf.o: decode_rs.c + gcc -DBIGSYM=1 $(CFLAGS) -c -o $@ $^ + +.PHONY : clean +clean: + -rm -f *.o rstest.exe