#############################################################################
# mined text editor makefile	- UCB or HP-UX


#############################################################################
# Where and how to install
# installation root, usually empty
root	= $(INSTALLROOT)

# directories for target "make install"
prefix	= $(root)/usr
bindir	= $(prefix)/bin
hlpdir	= $(prefix)/share/lib/mined
mandir	= $(prefix)/share/man

# directories for target "make localinstall"
lprefix	= $(root)/usr/local
lbindir	= $(lprefix)/bin
lhlpdir	= $(lprefix)/share/mined
lmandir	= $(lprefix)/man

INSTALL = install
#INSTALL = /bin/cp -p


#############################################################################
# compilation target options

# terminal handling mode 1: termio
SCREEN	= -DTERMIO
# link termcap functions:
SLIB	= -ltermcap	# usual System V termcap library
#SLIB	= -L/usr/lib/termcap -ltermcap	# if deprecated (Linux)
#SLIB	= -lcurses	# may work on System V Unix too (Solaris)
#SLIB	= -lncurses	# includes termcap library (Linux)

# terminal handling mode 2: sgtty (old, BSD)
#SCREEN	= -DSGTTY
#SLIB	= -ltermcap

# terminal handling mode 3: curses
# Choose curses only if other options don't work 
# (see doc/compilation for discussion).
# Use target "make minced" to use UTF-8 enabled ncurses (>= 5.4), 
# or see separate makefile.curses for options with legacy curses.


# select operating system flavour (define sysV if on System V flavour)
SYSTEM	= -Dunix -DsysV
#SYSTEM	= -Dunix -DsysV -DFDSET
#SYSTEM	= -Dunix

# select operating system environment
DEFS	= -Dunix


# collection of system parameters for compilation
HPFLAGS	= +Onolimit -Wp,-H20000
# -H20000 for cpp is needed to compile the keyboard mapping tables
# add -Aa / -Ae for aux. files with ANSI function headers?

SYSFLAGS	= $(SCREEN) $(SYSTEM) $(DEFS) $(HPFLAGS)


#############################################################################
# link options

# HP ld doesn't understand the dynamic binding option -d, so we need 
# a makefile different from makefile.sun
# On SunOS, it also works this way with /usr/ucb/cc, so let's assume 
# this is also a working UCB makefile (thus the makefile names)
LDOPTS=
GLDOPTS=


#############################################################################
# compiler selection and compiler-specific options
# (source warnings, optimisation and debug)

CC=cc
include mkinclud.$(CC)


#############################################################################
# make actions

SCREENOBJ=io.o keyboard.o
MOUSELIB=
KEYMAPSDEP=keymaps/_keymaps.h
include mkinclud.mak


#############################################################################
# end
