
# the following started as a copy of work_standard_makefile
# with changes to rule for $(STAR)

include $(MESA_DIR)/utils/makefile_header

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

ifndef STAR
STAR = star
endif

OBJS = star_adipls_support.o run_star_extras.o \
   extras_support.o run_star_extras_adipls.o \
   run_star.o run.o

WORK_DIR = ..
WORK_SRC_DIR = $(WORK_DIR)/src
STAR_TEST_DIR = $(MESA_DIR)/star/test
STAR_SRC_DIR = $(STAR_TEST_DIR)/src

PULSE_SRC_DIR = $(MESA_DIR)/astero/run_star_adipls

$(STAR) : $(OBJS) star_adipls_support_procs.o 
	$(LOADER) $(FCopenmp) -o $(WORK_DIR)/$(STAR) \
	$(OBJS) $(LOAD_MESA_STAR) \
	-ladipls star_adipls_support_procs.o
	
#################################################################

# change this as necessary.  see utils/makefile_header for definitions.
WORK_COMPILE = $(FC) $(FCbasic) $(FCopenmp) $(FCchecks) $(FCdebug) \
   -I$(MESA_INCLUDE_DIR) $(INCLUDE_SE) -c $(FCfree)

run.o: $(WORK_SRC_DIR)/run.f
	$(WORK_COMPILE) $<

run_star_extras.o: $(WORK_SRC_DIR)/run_star_extras.f
	$(WORK_COMPILE) $<

extras_support.o: $(PULSE_SRC_DIR)/extras_support.f
	$(WORK_COMPILE) $<

run_star_extras_adipls.o: $(PULSE_SRC_DIR)/run_star_extras_adipls.f
	$(WORK_COMPILE) $<

star_adipls_support_procs.o: $(PULSE_SRC_DIR)/star_adipls_support_procs.f
	$(WORK_COMPILE) $<

star_adipls_support.o: $(PULSE_SRC_DIR)/star_adipls_support.f
	$(WORK_COMPILE) $<

%.o: $(STAR_SRC_DIR)/%.f
	$(WORK_COMPILE) $<

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

remk:
	-@rm -f run.o $(WORK_DIR)/$(STAR)
	









