/*
 * the Imakefile
 *    by H.Kakugawa (kakugawa@se.hiroshima-u.ac.jp)
 *
 * Copyright (C) 1996  Hirotsugu KAKUGAWA. All rights reserved.
 *
 * VFlib is distributed in the hope that it will be useful, but
 * WITHOUT ANY WARRANTY.  No author or distributor accepts responsibility
 * to anyone for the consequences of using it or for whether it serves any
 * particular purpose or works at all, unless he says so in writing.  Refer
 * to the GNU General Public License for full details.
 *
 * Everyone is granted permission to copy, modify and redistribute
 * VFlib, but only under the conditions described in the GNU
 * General Public License.  A copy of this license is supposed to have been
 * given to you along with VFlib so you can know your rights and
 * responsibilities.  It should be in a file named COPYING.  Among other
 * things, the copyright notice and this notice must be preserved on all
 * copies. 
 */

           LIBTOOL = ../libtool
      VFLIB_INCDIR = ../src
      VFLIB_LIBDIR = ../src


     SYS_LIBRARIES = $(VFLIB_LIBDIR)/libVFlib2.la  -lm
          DEPVFLIB = $(VFLIB_LIBDIR)/libVFlib2.la

          PROGRAMS = disol    kban    ktest    vfperf    vftest    fmtest  
              SRCS = disol.c  kban.c  ktest.c  vfperf.c  vftest.c  fmtest.c
              OBJS = disol.lo kban.lo ktest.lo vfperf.lo vftest.lo fmtest.lo
  INSTALL_PROGRAMS = ktest

default all:: $(PROGRAMS)

include ../make-sub


/* DISOL */
disol: disol.lo $(DEPVFLIB)
	$(LIBTOOL) --mode=link \
		$(CC) -o $@ $(LDOPTIONS) disol.lo  \
		  $(LDLIBS) $(EXT_LIBRARY) $(EXTRA_LOAD_FLAGS)
disol.lo: disol.c
	$(LIBTOOL) --mode=compile \
		 $(CC) $(CFLAGS) -c disol.c

/* KBAN */
kban: kban.lo $(DEPVFLIB)
	$(LIBTOOL) --mode=link \
		$(CC) -o $@ $(LDOPTIONS) kban.lo  \
		  $(LDLIBS) $(EXT_LIBRARY) $(EXTRA_LOAD_FLAGS)
kban.lo: kban.c
	$(LIBTOOL) --mode=compile \
		$(CC) $(CFLAGS) $(ALLINCLUDES) -c kban.c

/* KTEST */
ktest: ktest.lo $(DEPXLIB) $(DEPVFLIB)
	$(LIBTOOL) --mode=link \
		$(CC) -o $@ $(LDOPTIONS) ktest.lo \
		  $(LDLIBS) $(EXT_LIBRARY) $(XLIB) $(EXTRA_LOAD_FLAGS)
ktest.lo: ktest.c
	$(LIBTOOL) --mode=compile \
		$(CC) $(CFLAGS) $(ALLINCLUDES) -c ktest.c

/* VF2BDF */
vf2bdf: vf2bdf.lo $(DEPVFLIB)
	$(LIBTOOL) --mode=link \
		$(CC) -o $@ $(LDOPTIONS) vf2bdf.lo \
		  $(LDLIBS) $(EXT_LIBRARY) $(EXTRA_LOAD_FLAGS)
vf2bdf.lo: vf2bdf.c
	$(LIBTOOL) --mode=compile \
		$(CC) $(CFLAGS) -c vf2bdf.c

/* VFPERF */
vfperf: vfperf.lo $(DEPVFLIB)
	$(LIBTOOL) --mode=link \ 
		$(CC) -o $@ $(LDOPTIONS) vfperf.lo \
		  $(LDLIBS) $(EXT_LIBRARY) $(EXTRA_LOAD_FLAGS)
vfperf.lo: vfperf.c
	$(LIBTOOL) --mode=compile \ 
		$(CC) $(CFLAGS) -c vfperf.c

/* VFTEST */
vftest: vftest.lo $(DEPXLIB) $(DEPVFLIB)
	$(LIBTOOL) --mode=link \ 
		$(CC) -o $@ $(LDOPTIONS) vftest.lo \
		  $(LDLIBS) $(EXT_LIBRARY) $(XLIB) $(EXTRA_LOAD_FLAGS)
vftest.lo: vftest.c
	$(LIBTOOL) --mode=compile \ 
		$(CC) $(CFLAGS) $(ALLINCLUDES) -c vftest.c

/* FMTEST */
fmtest: fmtest.lo $(DEPVFLIB)
	$(LIBTOOL) --mode=link \ 
		$(CC) -o $@ $(LDOPTIONS) fmtest.lo \
		  $(LDLIBS) $(EXT_LIBRARY) $(EXTRA_LOAD_FLAGS)
fmtest.lo: fmtest.c
	$(LIBTOOL) --mode=compile \ 
		$(CC) $(CFLAGS) -c fmtest.c


install:: $(PROGRAMS)
	@if [ ! -d $(bindir) ] ; then \
	    ./recmkdir $(bindir); fi
	@for P in $(INSTALL_PROGRAMS) ; do \
	    $(LIBTOOL) $(CP)  $$P $(bindir)/$$P ;  \
	done; 
uninstall::
	@for P in $(INSTALL_PROGRAMS) ; do \
	    $(LIBTOOL) $(RM)  $(bindir)/$$P ;  \
	done; 

clean veryclean::
	-$(RM) $(PROGRAMS) .depend core *.core

distclean:: veryclean
	-$(RM_RF) .libs *~ 

/*EOF*/

