# This is the makefile for creating the program that builds the weak reaction tables

PACKAGE_DIR = ../..
MESA_DIR = ../../..

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

# STEP 1: get the standard compiler setup

include $(MESA_DIR)/utils/makefile_header

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

# STEP 2: info about the libraries

OTHER_LIBS_DIR = $(MESA_DIR)/lib
INCLUDES = -I$(MESA_DIR)/include
#LOAD_OTHER_LIBS = -L$(OTHER_LIBS_DIR) -leos -lchem $(LOAD_MESA_NUMERICS)

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

# STEP 3: build it

OBJS = extractLMP.o extractOHMT.o extractFFN.o make_rate_tables.o

CTAB = make_tables

$(CTAB) : $(OBJS)
	$(FC) $(FCopenmp) -o ../$(CTAB) $(OBJS) $(LOAD_OTHER_LIBS)

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

SRC_DIR = ../src

#COMPILE = $(COMPILE_STD)
COMPILE = $(COMPILE_TO_TEST)

%.o: $(SRC_DIR)/%.f
	$(COMPILE) $(FCfree) $<

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






