#include <XView.tmpl>

#ifndef XCOMM
#define XCOMM #
#endif

XCOMM
XCOMM Imakefile for xvmpeg.
XCOMM Created by Alexandre Naaman <hoser@step.polymtl.ca>
XCOMM I'm no Imakefile expert so if you find any mistakes please tell
XCOMM me about them.
XCOMM See README file for info on making xvmpeg.
XCOMM 

XCOMM If you want to install the files somewhere else than $(OPENWINHOME)
XCOMM For example to install to $(HOME) uncomment the following line.
DESTDIR=$(HOME)
XCOMM DESTDIR=$(OPENWINHOME)

XCOMM Add -DDEBUG to DEFINES for debugging output.
XCOMM You can add any other DEFINES here.
#DEFINES =

XCOMM If you need any extra libs to compile XView apps add them here.
#LOCAL_LIBRARIES =

XCOMM Add any compiler options here.
CCOPTIONS += -Wall

XCOMM ##################################################################
XCOMM 
XCOMM Do not change anything beyond this point.
XCOMM
XCOMM ##################################################################

VERSION=0.1a

DEPLIBS= XViewClientDepLibs
LOCAL_LIBRARIES += XViewClientLibs

XCOMM The next two lines seem to have no effect in Linux
XCOMM So I defined my own rule for installing info pages.
#define HasInfoFiles YES
INFOFILES = xvmpeg.info

#ifndef InstallInfoPage
#define InstallInfoPage(file)						@@\
HELPSUBDIR=lib/help							@@\
install.info:: file.info						@@\
	MakeDir($(DESTDIR)/$(HELPSUBDIR))				@@\
	$(INSTALL) -c $(INSTMANFLAGS) file.info $(DESTDIR)/$(HELPSUBDIR)/file.info
#endif /* InstallInfoPage */

XCOMM 
XCOMM This rule is gust for me! Helps me make backups quickly.
XCOMM
#ifndef BackupSrc
#define BackupSrc(file,version)						@@\
backup:: 								@@\
	cd ..; tar cvf file-version.tar file-version			@@\
	cd ..; gzip -f file-version.tar
#endif

XCOMM 
XCOMM Install binary, man page and info page with one command.
XCOMM
#ifndef InstallAll
#define InstallAll(file,section)					@@\
MANSUBDIR=man/section							@@\
install.all::	file							@@\
	MakeDir($(DESTDIR)/bin)						@@\
	$(INSTALL) -c $(INSTBINFLAGS) file $(DESTDIR)/bin		@@\
	MakeDir($(DESTDIR)/$(MANSUBDIR))				@@\
	$(INSTALL) -c $(INSTMANFLAGS) file.man $(DESTDIR)/$(MANSUBDIR)/file.1x	@@\
	MakeDir($(DESTDIR)/$(HELPSUBDIR))				@@\
	$(INSTALL) -c $(INSTMANFLAGS) file.info $(DESTDIR)/$(HELPSUBDIR)/file.info @@\
	@echo								@@\
	@echo "Don't forget to take a look at the man page and the"	@@\
	@echo "README file for info on how to setup xvmpeg."		@@\
	@echo								@@\
	@echo "Please take the time to send some mail to me at"		@@\
	@echo "(hoser@step.polymtl.ca) if you like this program."	@@\
	@echo
#endif /* InstallAll */

XCOMM 
XCOMM I wanted to insure that ALL support files are successfully installed
XCOMM so I modified the default InstallTarget rule to give a little info.
XCOMM 
#undef InstallTarget
#define InstallTarget(step,file,flags,dest)
install:: xvmpeg							@@\
	@echo								@@\
	@echo "To install all files just type \"make install.all\"" 	@@\
	@echo

SRCS=xvmpeg.c 

OBJS=xvmpeg.o

ComplexProgramTarget(xvmpeg)
InstallInfoPage(xvmpeg)
InstallAll(xvmpeg,man1)
BackupSrc(xvmpeg,$(VERSION))