# Makefile for Texinfo distribution.	-*- Indented-Text -*-
# Copyright (C) 1993 Free Software Foundation, Inc.

release:
	$(MAKE) all CC="gcc -Zomf -Zmtd -O -s" O=".obj" A=".lib" \
	AR="emxomfar" RANLIB="emxomfar s"
debug:
	$(MAKE) all CC="gcc -g" O=".o" A=".a" AR="ar" RANLIB="ar s"

CFLAGS = -DOS2 -DHAVE_STRING_H -DHAVE_SYS_TIME_H -DHAVE_TERMIO_H \
       -DHAVE_VFPRINTF -DHAVE_VSPRINTF -DHAVE_SETVBUF
LIBS = ../libtxi/libtxi$A ../texinfo.def

DEFAULT_INFOPATH = .;/emacs/info

# Subdirectories that have makefiles
SUBDIRS = libtxi makeinfo info util

MDEFINES = CC="$(CC)" O="$O" A="$A" AR="$(AR)" RANLIB="$(RANLIB)" \
	CFLAGS="$(CFLAGS)" LIBS="$(LIBS)" \
	DEFAULT_INFOPATH="$(DEFAULT_INFOPATH)"

total: all texi.info

all clean:
	cd libtxi && $(MAKE) $(MDEFINES) $@
	cd makeinfo && $(MAKE) $(MDEFINES) $@
	cd info && $(MAKE) $(MDEFINES) $@
	cd util && $(MAKE) $(MDEFINES) $@

texi.info:
	makeinfo/makeinfo -I. texi.texi

