#
# Root makefile for visualization project
#

TARGETS  = all clean cleanall
LIBDIR   = Lib
PLOTDIR  = Plot
DOCDIR   = Docs
UTILDIR  = Utils
SUBDIRS  = $(LIBDIR) $(PLOTDIR) $(UTILDIR)
INCDIR   = /usr/include
LIBPATH  =

# Your favorite installer
# INSTALL = cp
INSTALL = install -c -s

# The binary is to be installed here
PROGRAM  = plotmtv
BINDIR   = /tcad12/users/ktoh/tmp

# The man pages are to to be installed here
MANDIR   = /tcad12/users/ktoh/tmp

# ename the man page with the .l tag (plotmtv.l)
MANTYPE  = .l

world:
	$(MAKE) $(SUBDIRS) TARGET=all


#
# Branch according to targets
#
$(TARGETS): FORCE
	$(MAKE) $(SUBDIRS) TARGET=$@

$(SUBDIRS): FORCE
	cd $@; $(MAKE) $(TARGET)

install:
	$(INSTALL) $(PLOTDIR)/$(PROGRAM) $(BINDIR)
	cp $(DOCDIR)/$(PROGRAM).man $(MANDIR)/$(PROGRAM)$(MANTYPE)

FORCE:
