/* RTF Tools Imakefile */
XCOMM	RTF Tools Makefile

XCOMM	Try "make World" to build the project.
XCOMM	(you must have the WRPRC2 configuration files installed.)

XCOMM	Look at the files in the config subdirectory to see if you want
XCOMM	to change anything.

XCOMM any special -D's or other flags for compiling
DEFINES =

XCOMM any special -I's for compiling
INCLUDES =

XCOMM any special libraries needed for linking
LIBS =

XCOMM dependency forms of above
DEPLIBS =

XCOMM stuff common to all translators
COMMONSRCS = reader.c
COMMONOBJS = reader.o

XCOMM RTF-to-nothing translator (the minimal translator)
NULLSRCS = rtf2null.c
NULLOBJS = rtf2null.o $(COMMONOBJS)

XCOMM RTF-to-troff translator
TROFFSRCS = rtf2troff.c trf-charmap.c trf-stack.c trf-flush.c \
	trf-table.c trf-nwid.c trf-symbol.c
TROFFOBJS = rtf2troff.o trf-charmap.o trf-stack.o trf-flush.o \
	trf-table.o trf-nwid.o trf-symbol.o $(COMMONOBJS)

XCOMM RTF-to-text translator
TEXTSRCS = rtf2text.c
TEXTOBJS = rtf2text.o $(COMMONOBJS)

XCOMM RTF diagnostic "translator"
DIAGSRCS = rtfdiag.c
DIAGOBJS = rtfdiag.o $(COMMONOBJS)

XCOMM RTF word count "translator"
WCSRCS = rtfwc.c
WCOBJS = rtfwc.o $(COMMONOBJS)

XCOMM skeleton RTF translator
SKELSRCS = rtfskel.c
SKELOBJS = rtfskel.o $(COMMONOBJS)

XCOMM RTF file indenter ("beautifier")
INDSRCS = rtfindent.c
INDOBJS = rtfindent.o

SRCS = $(COMMONSRCS) $(NULLSRCS) $(TROFFSRCS) $(DIAGSRCS) \
	$(TEXTSRCS) $(WCSRCS) $(SKELSRCS) $(INDSRCS)


XCOMM RTF -> nothing

BuildProgram(rtf2null,$(NULLSRCS),$(NULLOBJS),$(LIBS),$(DEPLIBS))
InstallProgram(rtf2null,$(LOCALBINDIR))

XCOMM RTF -> troff

SpecialCObjectCompile(rtf2troff.o,rtf2troff.c,-D'LIBDIR="$(LIBDIR)"',NullArg)

BuildProgram(rtf2troff,$(TROFFSRCS),$(TROFFOBJS),$(LIBS),$(DEPLIBS))
InstallProgram(rtf2troff,$(LOCALBINDIR))

InstallDataFile(symbol-map,$(LIBDIR))

XCOMM RTF -> text

BuildProgram(rtf2text,$(TEXTSRCS),$(TEXTOBJS),$(LIBS),$(DEPLIBS))
InstallProgram(rtf2text,$(LOCALBINDIR))

XCOMM RTF diagnostic

BuildProgram(rtfdiag,$(DIAGSRCS),$(DIAGOBJS),$(LIBS),$(DEPLIBS))
InstallProgram(rtfdiag,$(LOCALBINDIR))

XCOMM RTF word count

BuildProgram(rtfwc,$(WCSRCS),$(WCOBJS),$(LIBS),$(DEPLIBS))
InstallProgram(rtfwc,$(LOCALBINDIR))

XCOMM RTF translator skeleton; this isn't installed anywhere...
BuildProgram(rtfskel,$(SKELSRCS),$(SKELOBJS),$(LIBS),$(DEPLIBS))
FakeInstallFile(rtfskel)

XCOMM RTF indenter

BuildProgram(rtfindent,$(INDSRCS),$(INDOBJS),$(LIBS),$(DEPLIBS))
InstallProgram(rtfindent,$(LOCALBINDIR))

XCOMM Other

DependTarget()

SimpleWorldTarget($(PROJECTNAME),$(PROJECTRELEASE))

XCOMM documents

TroffMsToPostScript(rtf.ps,rtf.ms,NullArg,NullArg)

TroffMsToPostScript(rtf-misc.ps,rtf-misc.ms,NullArg,NullArg)

TroffMsToPostScript(rtf2troff.ps,rtf2troff.ms,NullArg,NullArg)

