# This is the makefile for the mesa interp_2d library

MESA_DIR = ../..

#################################################################

# STEP 1: set up the standard info

include $(MESA_DIR)/utils/makefile_header

#################################################################

# STEP 2: build the library

LIB = libinterp_2d.a
LIB_OBJS = \
    bicub_sg.o \
    bicub_db.o bicub_db1.o bicub_db2.o bicub_db3.o \
    bipm_db.o bipm_sg.o \
    akima760_sg.o akima760_db.o \
    renka790_sg.o renka790_db.o \
    interp_2d_lib_db.o interp_2d_lib_sg.o

$(LIB) : $(LIB_OBJS)
	$(LIB_TOOL) $(LIB) $(LIB_OBJS)
	
#################################################################

COMPILE = $(COMPILE_TO_DEPLOY) $(FCfixed)

%.o: $(MOD_PUBLIC_DIR)/%.f
	$(COMPILE) $<

renka790_sg.o: $(MOD_PRIVATE_DIR)/renka790_sg.f
	$(COMPILE_NO_CHECKS) $(FCfixed) $<

renka790_db.o: $(MOD_PRIVATE_DIR)/renka790_db.f
	$(COMPILE_NO_CHECKS) $(FCfixed) $<

akima760_sg.o: $(MOD_PRIVATE_DIR)/akima760_sg.f
	$(COMPILE_NO_CHECKS) $(FCfixed) $<

akima760_db.o: $(MOD_PRIVATE_DIR)/akima760_db.f
	$(COMPILE_NO_CHECKS) $(FCfixed) $<

bicub_sg.o: $(MOD_PRIVATE_DIR)/bicub_sg.f
	$(COMPILE_NO_CHECKS) $(FCfixed) $<

bicub_db.o: $(MOD_PRIVATE_DIR)/bicub_db.f
	$(COMPILE_NO_CHECKS) $(FCfixed) $<

bicub_db1.o: $(MOD_PRIVATE_DIR)/bicub_db1.f
	$(COMPILE_NO_CHECKS) $(FCfixed) $<

bicub_db2.o: $(MOD_PRIVATE_DIR)/bicub_db2.f
	$(COMPILE_NO_CHECKS) $(FCfixed) $<

%.o: $(MOD_PRIVATE_DIR)/%.f
	$(COMPILE) $(FCfixed) $<

clean:
	-@rm -f *.o *.mod $(LIB)
