# Generated manually for OS/2
# This file is part of groff.

# Define `page' to be letter if your PostScript printer uses 8.5x11
# paper (USA) and define it to be A4, if it uses A4 paper (rest of the
# world).
#PAGE=letter
PAGE=A4

# Normally the Postscript driver, grops, produces output that conforms
# to version 3.0 of the Adobe Document Structuring Conventions.
# Unfortunately some spoolers and previewers can't handle such output.
# The BROKEN_SPOOLER_FLAGS variable tells grops what it should do to
# make its output acceptable to such programs.  This variable controls
# only the default behaviour of grops; the behaviour can be changed at
# runtime by the grops -b option (and so by groff -P-b).
# Use a value of 0 if your spoolers and previewers are able to handle
# conforming PostScript correctly.
# Add 1 if no %%{Begin,End}DocumentSetup comments should be generated;
# this is needed for early versions of TranScript that get confused by
# anything between the %%EndProlog line and the first %%Page: comment.
# Add 2 if lines in included files beginning with %! should be
# stripped out; this is needed for the OpenWindows 2.0 pageview previewer.
# Add 4 if %%Page, %%Trailer and %%EndProlog comments should be
# stripped out of included files; this is needed for spoolers that
# don't understand the %%{Begin,End}Document comments. I suspect this
# includes early versions of TranScript.
# Add 8 if the first line of the PostScript output should be %!PS-Adobe-2.0
# rather than %!PS-Adobe-3.0; this is needed when using Sun's Newsprint
# with a printer that requires page reversal.
BROKEN_SPOOLER_FLAGS=0

# DEVICE is the default device.
DEVICE=ascii

# PSPRINT is the command to use for printing a PostScript file,
# for example `lpr'.
PSPRINT=printps

# DVIPRINT is the command to use for printing a TeX dvi file,
# for example `lpr -d'.
DVIPRINT=printdvi

# Prefix for names of programs that have Unix counterparts.
# For example, if `g' is `g' then troff will be installed as
# gtroff.  This doesn't affect programs like grops or groff that have
# no Unix counterparts.  Note that the groff versions of eqn and tbl
# will not work with Unix troff.  This is also use in the definitions
# of tmac_s and tmac_m.
g=

# The groff ms macros will be available as -m$(tmac_s).
# If you use `tmac_s=s', you can use the Unix ms macros by using
# groff -ms -M/usr/lib/tmac.
tmac_s=s

# Similarly, the groff mm macros will be available as -m$(tmac_m).
tmac_m=m

# Common prefix for installation directories.
# Used in definitions of exec_prefix, datasubdir, fontpath, manroot.
# This must already exist when you do make install.
prefix=

exec_prefix=${prefix}

# bindir says where to install executables.
bindir=$(exec_prefix)/bin

# datasubdir says where to install data files
datadir=$(prefix)/lib
datasubdir=$(datadir)/groff

# fontdir says where to install dev*/*.
fontdir=$(datasubdir)/font

# fontpath says where to look for dev*/*.
fontpath=.;$(fontdir);$(prefix)/lib/font

# tmacdir says where to install macros.
tmacdir=$(datasubdir)/tmac

# tmacpath says where to look for macro files.
tmacpath=.;$(tmacdir)

# Extension to be used for refer index files.  Index files are not
# sharable between different architectures, so you might want to use
# different suffixes for different architectures.  Choose an extension
# that doesn't conflict with refer or any other indexing program.
indexext=.i

# Directory containing the default index for refer.
indexdir=$(datasubdir)/dict/papers

# The filename (without suffix) of the default index for refer.
indexname=Ind

# common_words_file is a file containing a list of common words.
# If your system provides /usr/lib/eign it will be copied onto this,
# otherwise the supplied eign file will be used.
common_words_file=$(datasubdir)/eign

# manroot is the root of the man page directory tree.
manroot=$(prefix)/man

# man1ext is the man section for user commands.
man1ext=1
man1dir=$(manroot)/man$(man1ext)

# man5ext is the man section for file formats.
man5ext=5
man5dir=$(manroot)/man$(man5ext)

# man7ext is the man section for macros.
man7ext=7
man7dir=$(manroot)/man$(man7ext)

# DEFINES should include the following:
# -DHAVE_MMAP			if you have mmap() and <sys/mman.h>
# -DCFRONT_ANSI_BUG		if you're using cfront 2.0 (or later?) with
#				an ANSI C compiler
# -DCOOKIE_BUG			if you're using gcc/g++ 2.[012] (you should
#				upgrade to 2.3).
# -DARRAY_DELETE_NEEDS_SIZE	if your C++ doesn't understand `delete []'
# -DHAVE_SYS_SIGLIST		if you have sys_siglist[]
# -DWCOREFLAG=0200		if the 0200 bit of the status returned by
#				wait() indicates whether a core image was
#				produced for a process that was terminated
#				by a signal
# -DHAVE_UNISTD_H		if you have <unistd.h>
# -DHAVE_CC_OSFCN_H		if you have a C++ <osfcn.h>
# -DHAVE_DIRENT_H		if you have <dirent.h>
# -DHAVE_LIMITS_H		if you have <limits.h>
# -DHAVE_CC_LIMITS_H		if you have a C++ <limits.h>
# -DHAVE_SYS_DIR_H		if you have <sys/dir.h>
# -DHAVE_STDLIB_H		if you have <stdlib.h>
# -DHAVE_VFORK_H		if you have <vfork.h>
# -Dvfork=fork			if you don't have a working vfork()
# -DHAVE_RENAME			if you have rename()
# -DHAVE_MKSTEMP		if you have mkstemp()
# -DSTDLIB_H_DECLARES_GETOPT	if your C++ <stdlib.h> declares getopt()
# -DUNISTD_H_DECLARES_GETOPT	if your C++ <unistd.h> declares getopt()
# -DSTDLIB_H_DECLARES_PUTENV	if your C++ <stdlib.h> declares putenv()
# -DSTDIO_H_DECLARES_POPEN	if your C++ <stdio.h> declares popen()
# -DTRADITIONAL_CPP		if your C++ compiler uses a traditional
#				(Reiser) preprocessor.
# -DLONG_FOR_TIME_T		if localtime() takes a long * not a time_t *
# -DHAVE_STRUCT_EXCEPTION	if <math.h> defines struct exception
# -DRETSIGTYPE=int		if signal handlers return int not void	
DEFINES= -DHAVE_UNISTD_H=1 -DHAVE_DIRENT_H=1 -DHAVE_LIMITS_H=1 \
	-DHAVE_SYS_DIR_H=1 -DHAVE_STDLIB_H=1 -DHAVE_CC_LIMITS_H=1 \
	-DHAVE_CC_OSFCN_H=1 -DSTDLIB_H_DECLARES_PUTENV=1 -DRETSIGTYPE=void \
	-DHAVE_RENAME=1 -DSTDIO_H_DECLARES_POPEN=1

X=.exe
O=.o
A=.a

# Include fmod.o, strtol.o, getcwd.o, strerror.o, putenv.o  in LIBOBJS if
# your C library is missing the corresponding function.
LIBOBJS=execpath$O

# CCC is the compiler for C++ (.cc) files.
CC=gcc
CCC=$(CC)
# CCDEFINES are definitions for C++ compilations.
CCDEFINES=$(DEFINES)
# CDEFINES are definitions for C compilations.
CDEFINES=$(DEFINES)

DEBUG=
OPTIMIZE=-O
CCFLAGS=$(DEBUG) $(OPTIMIZE)
CFLAGS=$(DEBUG) $(OPTIMIZE)
LDFLAGS=-s
YACC=bison -y
YACCFLAGS=-v

LIBS=
CCLIBS=
RANLIB=ar s
INSTALL=install -c
INSTALL_PROGRAM=$(INSTALL)
INSTALL_DATA=$(INSTALL) -m 644
AR=ar
ETAGS=etags
ETAGSFLAGS=
# Flag that tells etags to assume C++.
ETAGSCCFLAG=-C
# Full path to perl.
PERLPATH=perl
# Sed command with which to edit sh scripts.
SH_SCRIPT_SED_CMD=sed

srcdir=.

# Passing down MAKEOVERRIDES prevents $(MAKE) from containing a second
# copy of $(MDEFINES) when making individual directories; this could
# cause the argument list to become too long on some systems.
MDEFINES= "MAKEOVERRIDES=$(MAKEOVERRIDES)" "srcdir=$(srcdir)" \
  "PAGE=$(PAGE)" "BROKEN_SPOOLER_FLAGS=$(BROKEN_SPOOLER_FLAGS)" \
  "DEVICE=$(DEVICE)" "PSPRINT=$(PSPRINT)" "DVIPRINT=$(DVIPRINT)" \
  "prefix=$(prefix)" "exec_prefix=$(exec_prefix)" "bindir=$(bindir)" \
  "g=$(g)" "datadir=$(datadir)" "datasubdir=$(datasubdir)" \
  "fontdir=$(fontdir)" "fontpath=$(fontpath)" \
  "tmacdir=$(tmacdir)" "tmacpath=$(tmacpath)" \
  "indexext=$(indexext)" "indexdir=$(indexdir)" \
  "indexname=$(indexname)" "common_words_file=$(common_words_file)" \
  "manroot=$(manroot)" "man1ext=$(man1ext)" "man1dir=$(man1dir)" \
  "man5ext=$(man5ext)" "man5dir=$(man5dir)" \
  "man7ext=$(man7ext)" "man7dir=$(man7dir)" \
  "tmac_s=$(tmac_s)" "tmac_m=$(tmac_m)" \
  "CCC=$(CCC)" "CC=$(CC)" "CCDEFINES=$(CCDEFINES)" "CDEFINES=$(CDEFINES)" \
  "CCFLAGS=$(CCFLAGS)" "CFLAGS=$(CFLAGS)" "X=$(X)" "O=$(O)" "A=$(A)"\
  "LDFLAGS=$(LDFLAGS)" "YACC=$(YACC)" "YACCFLAGS=$(YACCFLAGS)" \
  "LIBS=$(LIBS)" "CCLIBS=$(CCLIBS)" "LIBOBJS=$(LIBOBJS)" \
  "RANLIB=$(RANLIB)" "AR=$(AR)" \
  "INSTALL_PROGRAM=$(INSTALL_PROGRAM)" "INSTALL_DATA=$(INSTALL_DATA)" \
  "ETAGS=$(ETAGS)" "ETAGSFLAGS=$(ETAGSFLAGS)" "ETAGSCCFLAG=$(ETAGSCCFLAG)" \
  "PERLPATH=$(PERLPATH)" "SH_SCRIPT_SED_CMD=$(SH_SCRIPT_SED_CMD)"

#SHELL=sh
INCDIRS=include
LIBDIRS=libgroff libdriver libbib
CCPROGDIRS=groff troff tbl pic eqn grops grotty grodvi tfmtodit \
  refer lookbib indxbib lkbib soelim addftinfo
CPROGDIRS=pfbtops psbb spooler
PROGDIRS=$(CCPROGDIRS) $(CPROGDIRS)
DEVDIRS=devps devdvi devascii devlatin1
OTHERDIRS=man tmac afmtodit grog nroff mm
ALLDIRS=$(INCDIRS) $(LIBDIRS) $(PROGDIRS) $(DEVDIRS) $(OTHERDIRS)
EXTRADIRS=devps/generate devdvi/generate xditview doc
DISTDIRS=$(ALLDIRS) $(EXTRADIRS)
TARGETS=all install install_bin install_data clean distclean mostlyclean \
  realclean extraclean distfiles TAGS depend uninstall_sub

do=all
#dodirs=$(ALLDIRS) dot
dodirs=$(LIBDIRS) $(PROGDIRS) $(OTHERDIRS)

$(TARGETS):
	@$(MAKE) $(MDEFINES) do=$@ $(dodirs)

dot: FORCE
	@$(MAKE) $(MDEFINES) -f Makefile.comm -f Makefile.sub $(do)
	
$(LIBDIRS): FORCE
	@$(MAKE) -C $@ $(MDEFINES) \
		-f ../Makefile.comm -f Makefile.sub \
	        -f ../Makefile.lib -f Makefile.dep $(do)

$(CPROGDIRS): FORCE
	@$(MAKE) -C $@ $(MDEFINES) \
		-f ../Makefile.comm -f Makefile.sub \
	        -f ../Makefile.cpg -f Makefile.dep $(do)

$(CCPROGDIRS): FORCE
	@$(MAKE) -C $@ $(MDEFINES) \
		-f ../Makefile.comm -f Makefile.sub \
	        -f ../Makefile.ccpg -f Makefile.dep $(do)

$(DEVDIRS): FORCE
	@$(MAKE) -C $@ $(MDEFINES) \
		-f ../Makefile.comm -f Makefile.sub -f ../Makefile.dev $(do)

$(INCDIRS) $(OTHERDIRS): FORCE
	@$(MAKE) -C $@ $(MDEFINES) \
		-f ../Makefile.comm -f Makefile.sub -f ../Makefile.man $(do)

# $(PROGDIRS): libgroff
# grops grotty grodvi: libdriver
# refer lookbib indxbib lkbib: libbib
# $(LIBDIRS) $(PROGDIRS): include

.PHONY: $(ALLDIRS) dot $(TARGETS) FORCE

.PHONY: uninstall
uninstall: uninstall_sub uninstall_dirs

.PHONY: uninstall_dirs
uninstall_dirs:
# Use rmdir here so that the directories are only removed if they're empty
	-rmdir $(man1dir) $(man5dir) $(man7dir) $(manroot) \
	  $(tmacdir) $(fontdir) $(bindir) $(datasubdir) $(datadir)


.PHONY: check
check:

FORCE:

.NOEXPORT:
