
MESA_DIR = ../..

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

# STEP 1: set up the standard info

include $(MESA_DIR)/utils/makefile_header

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

# STEP 2: build the library

LIB = libxeon_phi_sample.a
LIB_OBJS = xeon_phi_sample_def.o xeon_phi_sample.o xeon_phi_sample_lib.o

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

FC += $(MIC_OFFLOAD)
CC += $(MIC_OFFLOAD)

COMPILE = $(COMPILE_TO_DEPLOY) $(FCfree)
#COMPILE = $(COMPILE_TO_TEST) $(FCfree)

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

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

clean:
	-@rm -f *.o *.mod *.modmic *genmod.f90 *.a
