# This is the makefile for running mesa/star

MESA_DIR = ../../..


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

# STEP 1: get the standard makefile info for mesa

include $(MESA_DIR)/utils/makefile_header


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

# STEP 2: info about the dependencies

LOAD_LOCAL = -L$(LOCAL_LIB_DIR) -lstar

LOAD_OTHER = -L$(MESA_LIB_DIR) $(LOAD_MESA_STAR_SUPPORT) \
   $(LOAD_PGPLOT) $(LOAD_SE)


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

# STEP 3: build the executable

STAR = star

STAR_OBJS = $(STAR_WORK_OBJS) run.o
STAR_JOB_DIR = $(MESA_DIR)/star/job

$(STAR) : $(STAR_OBJS)
	$(LOADER) $(FCbasic) $(FCopenmp) $(FCstatic) -o $(TEST_DIR)/$(STAR) \
	$(STAR_OBJS) $(LOAD_LOCAL) $(LOAD_OTHER) $(LOAD_EXTRAS)



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

run_star.o: $(STAR_JOB_DIR)/run_star.f
	$(TEST_COMPILE) $(FCfree) $<


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

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










