# This is the makefile for testing the interp_1d library

MESA_DIR = ../../..

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

# STEP 1: get the standard compiler setup

include $(MESA_DIR)/utils/makefile_header

ifeq ($(INTERP_1D_OFFLOAD),YES)
CC += -Doffload
FC += -Doffload
endif

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

# STEP 2: info about the libraries

LOAD_LOCAL = -L$(LOCAL_LIB_DIR) -linterp_1d
LOAD_OTHER = -L$(MESA_LIB_DIR) $(LOAD_MATRIX)

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

# STEP 3: build

TEST = tester
TEST_OBJS = interp_1d_support.o interp_1d_support_sg.o test_interp_1d.o

all : $(TEST)

$(TEST) : $(TEST_OBJS)
	$(LOADER) $(FCopenmp) -o $(TEST_DIR)/$(TEST) $(TEST_OBJS) $(LOAD_LOCAL) $(LOAD_OTHER)
	
#################################################################

%.o: $(TEST_SRC_DIR)/%.f
	$(TEST_COMPILE) $(FCfixed) $<

clean:
	-@rm -f *.o *.mod $(TEST_DIR)/$(TEST)










