# --------------------------------------------------------------
#
# Works automatically for Sun,hp and Linux systems
#
# Usage:
#	gmake            [to create the executable crystal_ml]
#	gmake install	 [to install  it in the correct directory]
#	gmake clean	 [to clean the source directory]
#
#
# --------------------------------------------------------------
#
# System definition (architecture)
#
ARCH := $(shell ../../xop_uname)

#********** PLATFORM DEPENDENT VARIABLES *********************
#
# libraries for sun5 
#
ifeq ($(ARCH),sun5)
FC = g95
FFLAGS =   -O -Wall
endif
#
# libraries for linux 
#
ifeq ($(ARCH),linux)
#FC = g95
FC = gfortran
FFLAGS =   -O -Wall
endif
#
#-------------------------- libraries for darwin
#
ifeq ($(ARCH),darwin)
FC = g95
FFLAGS =   -O -Wall
endif


all: 
	$(FC) $(FFLAGS) -o inpro *.f

clean: 
	/bin/rm -f *.trace *.o inpro

install:
	cp inpro ./../../bin.$(ARCH)/inpro
