#
# Copyright (c) 1997 by Salvador Eduardo Tropea
#
# Make file designed for DOS.
# If you don't have DJP comment the line under the $(sdh) target.
#

sdh=sdh.exe
sdh_ops=-c -n Index cindex.idx cindex.tdx -n "Index of key commands" kindex.idx kindex.tdx -I $(RHIDESRC)/doc
sdh_target=editor

$(sdh): sdh.c
	gcc -o $@ -O2 $<
	djp $@

info: $(sdh_target).inf

$(sdh_target).inf: $(sdh_target).tx $(sdh)
	$(sdh) -oi $(sdh_ops) -i $(sdh_target)

txt: $(sdh_target).txt
text: $(sdh_target).txt

$(sdh_target).txt: $(sdh_target).tx $(sdh)
	$(sdh) -ot $(sdh_ops) -i $(sdh_target)

html: $(sdh_target).html

$(sdh_target).html: $(sdh_target).tx $(sdh)
	$(sdh) -oh $(sdh_ops) -i $(sdh_target)

dvi: $(sdh_target).dvi

$(sdh_target).dvi: $(sdh_target).tx $(sdh)
	$(sdh) -od $(sdh_ops) -i $(sdh_target)

ps: $(sdh_target).ps

$(sdh_target).ps: $(sdh_target).tx $(sdh)
	$(sdh) -op $(sdh_ops) -i $(sdh_target)

all: $(sdh_target).tx $(sdh)
	$(sdh) -oa $(sdh_ops) -i $(sdh_target)

doc: $(sdh_target).tx $(sdh)
	$(sdh) -othi $(sdh_ops) -i $(sdh_target)
