ALL:  example1 example3 example4 example5

ITOOLSDIR = ../..

# Remove -DUSEX (and $(X11LIB)) if a dynamic display of the residual is not
# wanted
CFLAGS   = -I$(ITOOLSDIR) $(OPT)  -DUSEX $(VDEFS)
LDIR     = $(ITOOLSDIR)/libs/libs$(BOPT)$(PROFILE)/$(ARCH)
LIBS     = $(LDIR)/tools.a $(LDIR)/Xtools.a $(LDIR)/system.a $(X11LIB) -lm \
		$(VLIBS) $(SLIB)
FLIBS    = $(ITOOLSDIR)/fort/$(ARCH)/fort.a

example1: example1.o elastic.o 
	$(CLINKER) -o example1 $(CFLAGS) $(BASEOPT) example1.o elastic.o $(LIBS)
	$(RM) example1.o
example3: example3.o elastic.o 
	$(CLINKER) -o example3 $(CFLAGS) $(BASEOPT) example3.o elastic.o $(LIBS)
	$(RM) example3.o
example2: example2.o
	$(CLINKER) -o example2 $(CFLAGS) $(BASEOPT) example2.o $(LIBS)
	$(RM) example2.o 
example4: example4.o 
	$(FLINKER) -o example4 $(BASEOPTF) example4.o $(FLIBS) $(LIBS) $(BLAS)
	$(RM) example4.o
example5: example5.o 
	$(FLINKER) -o example5 $(BASEOPTF) example5.o $(FLIBS) $(LIBS) \
	              $(LAPACK) $(BLAS)
	$(RM) example5.o
clean:
	$(RM) -f example1.o example2.o example3.o elastic.o example4.o \
	         example5.o

include $(ITOOLSDIR)/bmake/$(ARCH).$(BOPT)$(PROFILE)
# ARCH.v defines VDEFS and VLIBS
include $(ITOOLSDIR)/bmake/$(ARCH).v
include $(ITOOLSDIR)/bmake/$(ARCH).x11
include $(ITOOLSDIR)/bmake/$(ARCH)
