# Copyright (c) 1986, 2016 by The Trustees of Columbia University in
# the City of New York.  All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
#
#  + Redistributions of source code must retain the above copyright
#    notice, this list of conditions and the following disclaimer.
#
#  + Redistributions in binary form must reproduce the above copyright
#    notice, this list of conditions and the following disclaimer in
#    the documentation and/or other materials provided with the
#    distribution.
#
#  + Neither the name of Columbia University nor the names of its
#    contributors may be used to endorse or promote products derived
#    from this software without specific prior written permission.
#
# This copyright notice supersedes any prior copyright notices in any
# of the ccmd build kit.
#
# Website: http://www.kermitproject.org/mm/
#
# Last update:
# Tue Jan 12 11:11:58 2016
# fdc
#
# Likely targets in 2016:
#
#       make linux
#       make netbsd
#       make macosx
#
# Special targets:
#
#	$(DEST)/$(LIBRARY)
#	$(INCLUDEDIR)
#	$(LIBRARY)
#	ccmd.tar		tar file of ccmd distribution
#	ccmdmd.c
#	ccmdmd.unx
#	checkout
#	clean			remove intermediate files that make produces
#	clobber			remove almost all files that make produces
#	cmfnc.h
#	cmfncs.h
#	debug
#	depends			object-header file dependencies
#	dependencies		temporary file listing dependencies
#	distclean		remove all files that make produces
#	first			default target
#	incversion		utility to increment version edit number
#	install			install ccmd library on system
#	lint			run lint on source files
#	localdepend		remove object-header file dependencies
#	mostlyclean		same as clean
#	msdos			IBM PC MS DOS
#	newversion		increment version number
#	realclean		same as distclean
#	skel			simple parsing test program
#	TAGS			GNU Emacs TAGS file
#	tags			vi tags file
#	test			extended test program
#	update			make install and clean
#
# Some (but not all) of the platform-specific targets below:
#
#	hpux			HP 9000/7xx and 9000/8xx with HP-UX 8.x and 9.x
#	hpux-kr			HP 9000/7xx and 9000/8xx with HP-UX 8.x and 9.x
#				with K&R-level compilation
#	irix			Silicon Graphics IRIX 4.x and 5.x
#	irix-kr			Silicon Graphics IRIX 4.x and 5.x with
#				K&R-level compilation
#       freebsd                 FreeBSD
#       netbsd                  NetBSD
#       openbsd                 OpenBSD
#	next			NeXT Mach 3.x
#	next-gcc		NeXT Mach 3.x with GNU gcc
#	osf1			DEC Alpha OSF/1 2.x
#	solaris			Sun Solaris 2.x
#	solaris-c++		Sun Solaris 2.x with C++
#	solaris-gcc		Sun Solaris 2.x with GNU gcc
#	solaris1.x		Sun Solaris 1.x (same as SunOS 4.x)
#	solaris2.2		Sun Solaris 2.2
#	solaris2.x		Sun Solaris 2.x
#	solaris2.x-c++		Sun Solaris 2.x with C++
#	solaris2.x-gcc		Sun Solaris 2.x with GNU gcc
#	sun			Sun SunOS 4.x
#	sunos			Sun SunOS 4.x
#	sunos4.x		Sun SunOS 4.x
#	sunos5.2		Sun SunOS 5.2 (same as Solaris 2.2)
#	sunos5.x		Sun SunOS 5.x (same as Solaris 2.x)
#	sunos5.x-c++		Sun SunOS 5.x (same as Solaris 2.x)
#				with C++ (not yet operational)
#	sunos5.x-gcc		Sun SunOS 5.x (= Solaris 2.x) with GNU gcc
#	svr2			System V.2
#	svr3			System V.3
#	sysv			System V
#	ultrix4.x		DECstation ULTRIX 4.x

# $Header: /usr/local/src/mm/mm-0.94/ccmd/RCS/Makefile,v 1.8 2005/05/31 15:44:11 beebe Exp beebe $
#
# [30-May-2005]
#=======================================================================

prefix	      = /usr/local

ALL	      = $(LIBRARY) $(PROGS)

CFLAGS        = $(DEBUGOPT) $(OS)

CI	      =	ci

CO	      =	co

CP	      = cp

CPP	      =	/lib/cpp $(DEFINES)

DEBUGOPT      = -g

DEST	      = $(prefix)/lib

HDRS	      = ccmd.h \
		ccmdlib.h \
		ccmdmd.h \
		cmfil.h \
		cmfnc.h \
		cmfncs.h \
		cmgrp.h \
		cmusr.h \
		cmver.h \
		datime.h \
		dtpat.h \
		filelist.h \
		machdep.h \
		site.h \
		tzone.h

INCLUDEDIR	= $(prefix)/include/

INSTALL		= install -c

LIBRARY		= ccmd.a

LIBTERM		= -ltermlib

LINT		= lint

# -p: portability checks
LINTFLAGS	= -p
LINTFLAGS	=

LINTSRCS	= *.c

LOCALINCLUDE  = ccmd.h \
		cmfnc.h \
		cmfncs.h \
		ccmdmd.h \
		datime.h

M4FILES       =	cmcfm.cnf \
		cmchar.cnf \
		cmconf.h4 \
		cmfil.cnf \
		cmfld.cnf \
		cmfnc.h4 \
		cmfnc.top \
		cmfncs.top \
		cmgnrc.cnf \
		cmgrp.cnf \
		cmkey.cnf \
		cmnoi.cnf \
		cmnum.cnf \
		cmpara.cnf \
		cmqst.cnf \
		cmswi.cnf \
		cmtad.cnf \
		cmtok.cnf \
		cmtxt.cnf \
		cmusr.cnf

MAKEFILE      = Makefile

# NB: Do NOT put skel.o and test.o in OBJS: they both contain main()
# which interferes with building the ccmd.a library on some systems
# (e.g. SGI IRIX 4.0)
OBJS	      =	ccmd.o \
		ccmdio.o \
		ccmdmd.o \
		ccmdst.o \
		ccmdut.o \
		cmcfm.o \
		cmchar.o \
		cmfil.o \
		cmfld.o \
		cmgrp.o \
		cmkey.o \
		cmmisc.o \
		cmnoi.o \
		cmnum.o \
		cmpara.o \
		cmqst.o \
		cmswi.o \
		cmtad.o \
		cmtok.o \
		cmtxt.o \
		cmusr.o \
		cmver.o \
		cursor.o \
		datime.o \
		dir.o \
		filelist.o \
		getenv.o \
		incversion.o \
		setenv.o \
		sigblock.o \
		stdact.o \
		wild.o

OS	      =

OSLIBS	      =

PROGS	      = skel \
		test

RANLIB	      =	ranlib

RM	      = /bin/rm -f

SHELL	      = /bin/sh

SRCS	      = ccmd.c \
		ccmdio.c \
		ccmdmd.unx \
		ccmdst.c \
		ccmdut.c \
		cmcfm.c \
		cmchar.c \
		cmfil.c \
		cmfld.c \
		cmgrp.c \
		cmkey.c \
		cmmisc.c \
		cmnoi.c \
		cmnum.c \
		cmpara.c \
		cmqst.c \
		cmswi.c \
		cmtad.c \
		cmtok.c \
		cmtxt.c \
		cmusr.c \
		cmver.c \
		cursor.c \
		datime.c \
		dir.c \
		filelist.c \
		getenv.c \
		incversion.c \
		setenv.c \
		sigblock.c \
		skel.c \
		stdact.c \
		test.c \
		wild.c

#-----------------------------------------------------------------------
.SUFFIXES: .i .c

# Trapping preprocessor output in .i files is very useful during ports
# to new systems.  We flush empty lines, and turn preprocessor lines
# into comments so that experimental compilations reflect true line
# numbers.
.c.i:
	$(CC) $(CFLAGS) -E $*.c | grep -v '^[ \t]*$$' | \
		sed -e 's@^\( *#.*\)$$@/* \1 */@' \
			-e 's/[ 	][ 	]*$$//g' \
			-e '/^$$/d' >$*.i

#-----------------------------------------------------------------------
# Force the user to tell what to make, to ensure correct compilation options.
first:
	@echo "You must tell me what to make.  Do"
	@echo "	make <systemname>"
	@echo "where <systemname> is one of these:"
	@echo "	aix all bsd freebsd linux hpux hpux-gcc hpux-kr hpux11 hpux11-gcc"
	@echo "	irix irix-kr irix4 irix5 irix6 macosx netbsd next openbsd osf1 solaris"
	@echo "	solaris-gcc solaris1.x solaris10 solaris2.2 solaris2.x solaris2.x-gcc"
	@echo "	sun sunos sunos4.x sunos5.2 sunos5.x sunos5.x-gcc svr2 svr3 sysv"
	@echo "	ultrix4.x"

all:		$(ALL)

lint:
	$(LINT) $(LINTFLAGS) $(OS) $(LINTSRCS)

$(LIBRARY):	$(OBJS)
		ar cru $(LIBRARY) $?
		@$(RANLIB) $(LIBRARY) || /bin/true

test:		test.o $(LIBRARY)
		$(CC) $(CFLAGS) -o $@ $@.o $(LIBRARY) $(LIBTERM) $(OSLIBS)

skel:		skel.o $(LIBRARY)
		$(CC) $(CFLAGS) -o $@ $@.o $(LIBRARY) $(LIBTERM) $(OSLIBS)

cmfncs.h cmfnc.h: $(M4FILES) split.awk
		m4 cmfnc.h4 | awk -f split.awk

ccmdmd.c:	ccmdmd.unx
		-$(RM) ccmdmd.c
		cp ccmdmd.unx ccmdmd.c
		chmod u+w ccmdmd.c

check:
	@echo There is no validation suite for this program

clean mostlyclean:
	-$(RM) *.i *.o incversion \#* *~ core a.out

clobber distclean realclean:	clean
	-$(RM) $(LIBRARY) cmfncs.h cmfnc.h \
			test skel \
			*.ln \
			dependencies

checkout:
	$(CO) $(HDRS) $(SRCS) $(M4FILES) README Makefile

newversion:	incversion
		PATH=/bin:/usr/bin test -t 0
		$(CO) -l cmver.h
		./incversion < cmver.h > cmver.h.new
		mv cmver.h.new cmver.h
		$(CI) -u cmver.h

incversion:	incversion.c
		$(CC) $(CFLAGS) -o $@ $@.c

depends:	dependencies
		-$(RM) junk
		sed '/^# DO NOT DELETE THIS LINE/,$$d' < $(MAKEFILE) > junk
		(echo '# DO NOT DELETE THIS LINE'; cat dependencies) >> junk
		mv junk $(MAKEFILE)
		rm dependencies

localdepend:
		-$(RM) junk
		sed -e '1,/^# DO NOT DELETE/!{ /:[ 	]*\//d; }' \
			< $(MAKEFILE) > junk
		mv junk $(MAKEFILE)

dependencies:	$(HDRS) site.h
		-$(RM) junk
		for f in $(SRCS); do $(CPP) < $$f | \
		    sed -n '/^#[ 0-9line]*"\(..*\)\".*$$/ '"s||$$f: \1|p" | \
		    sort -u ; \
		done | sed -e 's|\.c: |.o: |' -e 's|: *\./|: |' > junk
		mv junk dependencies

$(INCLUDEDIR):
		-mkdir $(INCLUDEDIR)

install:	$(LIBRARY) $(INCLUDEDIR)
		$(INSTALL) $(LIBRARY) $(DEST)/lib$(LIBRARY)
		$(RANLIB) $(DEST)/lib$(LIBRARY) || /bin/true
		$(CP) $(LOCALINCLUDE) $(INCLUDEDIR)

main-install:

tags:           $(HDRS) $(SRCS)
		ctags $(HDRS) $(SRCS)

TAGS:		$(HDRS) $(SRCS)
		etags $(HDRS) $(SRCS)

ccmd.tar:	$(HDRS) $(SRCS) $(M4FILES) README Makefile
		@echo 'Did you run "make localdepend"?'
		tar cf $@ README Makefile $(HDRS) $(SRCS) $(M4FILES)

update:         $(DEST)/$(LIBRARY)

$(DEST)/$(LIBRARY): $(SRCS) $(HDRS) $(EXTHDRS)
		@-ar xo $(DEST)/$(LIBRARY)
		@make -f $(MAKEFILE) DEST=$(DEST) install clean

# this line to make sure all of the headers get co'ed.
ccmd.o:		$(HDRS)

#=======================================================================
# System-specific convenience targets.
#
# You can redefine TARGETS at make-time to make a particular file or
# files, for example:
#	make osf1 TARGETS='ask.o brk.i dir.o'
#	make osf1 TARGETS=dependencies
#	make osf1 TARGETS=install
#	make osf1 TARGETS=lint

TARGETS = all

GCCFLAGS    = -Wall -Wshadow -Wcast-qual -Wpointer-arith -Wwrite-strings \
		-Wnested-externs

# Options for g++ 2.0
G++FLAGS    = -Wall -Wshadow -Wcast-qual -Wpointer-arith -Wwrite-strings \
		-Wid-clash-6 -Wpointer-arith -Wcast-qual \
		-Wconversion -Waggregate-return -Wstrict-prototypes \
		-Wmissing-prototypes -Wno-parentheses

G++FLAGS    = -Wall -Wcast-qual -Wpointer-arith -Wwrite-strings \
		-Wid-clash-6 -Wpointer-arith -Wcast-qual \
		-Wconversion -Waggregate-return -Wstrict-prototypes \
		-Wmissing-prototypes -Wno-parentheses

#-----------------------------------------------------------------------
debug:
	$(MAKE) $(MFLAGS) DEBUGOPT=-g $(TARGETS)

#-----------------------------------------------------------------------
svr2 svr3 sysv:
	$(MAKE) OS=-D$@ OSLIBS= $(TARGETS)

#-----------------------------------------------------------------------
aix:
	$(MAKE) OS=-DSVR2 OSLIBS= $(TARGETS)

#-----------------------------------------------------------------------

aix-rs6000:
	$(MAKE) CC='c89 -D_ALL_SOURCE' OS='-DBSD -DHAVE_VOIDSIG -Dunix' \
		LIBTERM='-lcurses' OSLIBS= $(TARGETS)
#	$(MAKE) CC='c89 -D_ALL_SOURCE' OS='-DSVR2 -DHAVE_VOIDSIG -Dunix' \
#		OSLIBS= $(TARGETS)

aix-rs6000-c++:
	$(MAKE) CC='xlC -D_ALL_SOURCE' OS='-DBSD -DHAVE_VOIDSIG -Dunix -DHAVE_VPRINTF' \
		LIBTERM='-lcurses' OSLIBS= $(TARGETS)

aix-rs6000-g++:
	$(MAKE) CC='g++ -D_ALL_SOURCE' OS='-DBSD -DHAVE_VOIDSIG -Dunix' \
		LIBTERM='-lcurses' OSLIBS= $(TARGETS)

aix3-rs6000-g++:
	$(MAKE) CC='g++ -D_ALL_SOURCE' OS='-DBSD -DHAVE_VOIDSIG -Dunix -DAIX3' \
		LIBTERM='-lcurses' OSLIBS= $(TARGETS)

#-----------------------------------------------------------------------
bsd:
	$(MAKE) $(MFLAGS) OS=-DBSD $(TARGETS)

#-----------------------------------------------------------------------
freebsd:
	$(MAKE) $(MFLAGS) \
		OS='-DBSD -DDIRENTLIB -DHAVE_BCOPY -DHAVE_MKSTEMP -DHAVE_NEW_BSD -DHAVE_UNSETENV -DHAVE_VPRINTF' \
		$(TARGETS)

#-----------------------------------------------------------------------
netbsd:
	$(MAKE) $(MFLAGS) \
		OS='-Dunix -DDIRENTLIB -DHAVE_BCOPY -DHAVE_MKSTEMP -DHAVE_NEW_BSD -DHAVE_UNSETENV -DHAVE_VPRINTF' \
		$(TARGETS)

#-----------------------------------------------------------------------
openbsd:
	$(MAKE) $(MFLAGS) \
		OS='-Dunix -DDIRENTLIB -DHAVE_BCOPY -DHAVE_MKSTEMP -DHAVE_NEW_BSD -DHAVE_UNSETENV -DHAVE_VPRINTF' \
		$(TARGETS)

#-----------------------------------------------------------------------
macosx:
	$(MAKE) $(MFLAGS) \
		LIBTERM=-ltermcap \
		OS='-Dunix -DBSD -DDIRENTLIB -DHAVE_BCOPY -DHAVE_MKSTEMP -DHAVE_NEW_BSD -DHAVE_UNSETENV -DHAVE_VPRINTF' \
		$(TARGETS)

#-----------------------------------------------------------------------
linux gnu-linux:
	$(MAKE) $(MFLAGS) \
		LIBTERM=-ltermcap \
		OS='-DDIRENTLIB -DSYSV -D_BSD_SOURCE -DHAVE_BCOPY -DHAVE_GNU_LINUX -DHAVE_MKSTEMP -DHAVE_UNSETENV -DHAVE_VPRINTF' \
		$(TARGETS)

#-----------------------------------------------------------------------
hpux:
	$(MAKE) OS= OSLIBS= CC='c89 -D_HPUX_SOURCE -DSVR3 -Dunix' $(TARGETS)

hpux-gcc:
	$(MAKE) OS= OSLIBS= CC='gcc -D_HPUX_SOURCE -DSVR3 -Dunix' $(TARGETS)

hpux-c++:
	$(MAKE) OS= OSLIBS= CC='CC -D_HPUX_SOURCE -DSVR3 -Dunix' $(TARGETS)

hpux-kr:
	$(MAKE) OS= OSLIBS= $(TARGETS)

hpux11:
	$(MAKE) OS= OSLIBS= CC='c89 -D_HPUX_SOURCE -DSVR3 -Dunix -DDIRENTLIB' LIBTERM=-lcurses $(TARGETS)

hpux11-gcc:
	$(MAKE) OS= OSLIBS= CC='c89 -D_HPUX_SOURCE -DSVR3 -Dunix -DDIRENTLIB' LIBTERM=-lcurses $(TARGETS)

#-----------------------------------------------------------------------
# The __EXTENSIONS__ symbol must be defined so that stdin, stdout, and
# stderr can be used as initializers in csb cmcsb in ccmd.c; by
# default, they expand to extern FILE * variables that are illegal as
# initializers.
irix:
	$(MAKE) OS='-D__EXTENSIONS__ -DSVR3 -Dunix' OSLIBS= \
			CC='cc -ansi' $(TARGETS)

irix-c++:
	$(MAKE) OS='-D__EXTENSIONS__ -DSVR3 -Dunix' OSLIBS= \
			CC='CC' $(TARGETS)

# IRIX-KR is for Kernighan & Ritchie pre-Standard C on SGI IRIX systems.
# It is not the default, because Standard C type checking is preferred.
irix-kr:
	$(MAKE) OS='-DSVR3 -Dunix' OSLIBS= CC='cc' $(TARGETS)

irix4:	irix

irix5:	irix

irix6:	irix

#-----------------------------------------------------------------------
msdos:
	$(MAKE) $(MFLAGS) -f makefile.dos

#-----------------------------------------------------------------------
# NB: The value of BSD here is set to match that in <sys/param.h>, in
# order to suppress compiler warnings about redefining BSD.
next:
	$(MAKE) $(MFLAGS) \
		CC='cc $(GCCFLAGS)' \
		LINTFLAGS='$(LINTFLAGS)' \
		LINTSRCS='$(LINTSRCS)' \
		OS="-DBSD=43 -DHAVE_VOIDSIG -DHAVE_VPRINTF" \
		OSLIBS='$(OSLIBS)' \
		$(TARGETS)

next-gcc:
	$(MAKE) $(MFLAGS) \
		CC='gcc $(GCCFLAGS)' \
		LINTFLAGS='$(LINTFLAGS)' \
		LINTSRCS='$(LINTSRCS)' \
		OS="-DBSD=43 -DHAVE_VOIDSIG -DHAVE_VPRINTF" \
		OSLIBS='$(OSLIBS)' \
		$(TARGETS)

next-g++:
	$(MAKE) $(MFLAGS) \
		CC='g++ $(G++FLAGS)' \
		LINTFLAGS='$(LINTFLAGS)' \
		LINTSRCS='$(LINTSRCS)' \
		OS="-DBSD=43 -DHAVE_VOIDSIG -DHAVE_VPRINTF" \
		OSLIBS='$(OSLIBS)' \
		$(TARGETS)

#-----------------------------------------------------------------------
# NB: The value of BSD here is set to match that in <sys/param.h>, in
# order to suppress compiler warnings about redefining BSD.  The value
# is a year and month, and is the same in OSF/1 version 1.3 and
# version 2.0.
osf1:
	$(MAKE) $(MFLAGS) \
		CC='c89 -std1' \
		LINTFLAGS='$(LINTFLAGS)' \
		LINTSRCS='$(LINTSRCS)' \
	OS="-DBSD=198911 -DHAVE_VOIDSIG -DDIRENTLIB -DHAVE_VPRINTF -Dunix" \
		OSLIBS='$(OSLIBS)' \
		$(TARGETS)

osf1-c++:
	$(MAKE) $(MFLAGS) \
		CC='cxx -x cxx' \
		LINTFLAGS='$(LINTFLAGS)' \
		LINTSRCS='$(LINTSRCS)' \
	OS="-DBSD=198911 -DHAVE_VOIDSIG -DDIRENTLIB -DHAVE_VPRINTF -Dunix" \
		OSLIBS='$(OSLIBS)' \
		$(TARGETS)

#-----------------------------------------------------------------------
solaris1.x sun sunos sunos4.x ultrix4.x:
	$(MAKE) $(MFLAGS) \
		LINTFLAGS='$(LINTFLAGS)' \
		LINTSRCS='$(LINTSRCS)' \
		OS="-DBSD -DHAVE_VOIDSIG" \
		OSLIBS='$(OSLIBS)' \
		$(TARGETS)

solaris1.x-g++ sun-g++ sunos-g++ sunos4.x-g++ ultrix4.x-g++:
	$(MAKE) $(MFLAGS) \
		CC='g++' \
		LINTFLAGS='$(LINTFLAGS)' \
		LINTSRCS='$(LINTSRCS)' \
		OS="-DBSD -DHAVE_VOIDSIG" \
		OSLIBS='$(OSLIBS)' \
		$(TARGETS)

solaris1.x-c++ sun-c++ sunos-c++ sunos4.x-c++ ultrix4.x-c++:
	$(MAKE) $(MFLAGS) \
		CC='CC' \
		LINTFLAGS='$(LINTFLAGS)' \
		LINTSRCS='$(LINTSRCS)' \
		OS="-DBSD -DHAVE_VOIDSIG" \
		OSLIBS='$(OSLIBS)' \
		$(TARGETS)

#-----------------------------------------------------------------------
solaris10:
	$(MAKE) $(MFLAGS) CC='cc -Xc' \
		LINTFLAGS='$(LINTFLAGS) -Xc' \
		LINTSRCS='$(LINTSRCS)' \
		OS="-DNEED_SIGBLOCK_SIGSETMASK -DSYSV -DHAVE_VOIDSIG -DDIRENTLIB -DHAVE_VPRINTF -Dunix -D__solaris" \
		OSLIBS="-lc -L/usr/ucblib -lucb -R/usr/ucblib" \
		$(TARGETS)


solaris2.2 sunos5.2:
	@echo "************************************************************"
	@echo "* NB: ignore                                               *"
	@echo "*      ld: warning: file /usr/lib/libc.so: attempted       *"
	@echo "*      multiple inclusion of file libc.so                  *"
	@echo "************************************************************"
	$(MAKE) $(MFLAGS) CC='cc -Xc' \
		LINTFLAGS='$(LINTFLAGS) -Xc' \
		LINTSRCS='$(LINTSRCS)' \
		OS="-DSYSV -DHAVE_VOIDSIG -DDIRENTLIB -DHAVE_VPRINTF -Dunix -D__solaris" \
		OSLIBS="-lc /usr/ucblib/libucb.a -R/usr/ucblib" \
		$(TARGETS)

solaris solaris2.x sunos5.x columbia:
	$(MAKE) $(MFLAGS) CC='cc -Xc' \
		LINTFLAGS='$(LINTFLAGS) -Xc' \
		LINTSRCS='$(LINTSRCS)' \
		OS="-DSYSV -DHAVE_VOIDSIG -DDIRENTLIB -DHAVE_VPRINTF -Dunix -D__solaris" \
		OSLIBS="-lc -L/usr/ucblib -lucb -R/usr/ucblib" \
		$(TARGETS)

solaris2.3 sunos5.3:
	$(MAKE) $(MFLAGS) CC='cc' \
		LINTFLAGS='$(LINTFLAGS) -Xc' \
		LINTSRCS='$(LINTSRCS)' \
		OS="-DSYSV -DHAVE_VOIDSIG -DDIRENTLIB -DHAVE_VPRINTF -DUSE_SIGPROCMASK -Dunix -D__solaris" \
		$(TARGETS)

solaris-c++ solaris2.x-c++ sunos5.x-c++:
	$(MAKE) $(MFLAGS) CC='CC' \
		LINTFLAGS='$(LINTFLAGS) -Xc' \
		LINTSRCS='$(LINTSRCS)' \
		OS="-DSYSV -DHAVE_VOIDSIG -DDIRENTLIB -DHAVE_VPRINTF -Dunix -D__solaris" \
		OSLIBS="-lc -L/usr/ucblib -lucb -R/usr/ucblib" \
		$(TARGETS)

solaris-gcc solaris2.x-gcc sunos5.x-gcc:
	$(MAKE) $(MFLAGS) CC='gcc $(GCCFLAGS)' \
		LINTFLAGS='$(LINTFLAGS) -Xc' \
		LINTSRCS='$(LINTSRCS)' \
		OS="-DSYSV -DHAVE_VOIDSIG -DDIRENTLIB -DHAVE_VPRINTF -Dunix -D__solaris" \
		OSLIBS="-lc -L/usr/ucblib -lucb -R/usr/ucblib -lelf" \
		$(TARGETS)

solaris-g++ solaris2.x-g++ sunos5.x-g++:
	$(MAKE) $(MFLAGS) CC='g++ $(G++FLAGS)' \
		LINTFLAGS='$(LINTFLAGS) -Xc' \
		LINTSRCS='$(LINTSRCS)' \
		OS="-DSYSV -DHAVE_VOIDSIG -DDIRENTLIB -DHAVE_VPRINTF -Dunix -D__solaris" \
		OSLIBS="-lc -L/usr/ucblib -lucb -R/usr/ucblib -lelf" \
		$(TARGETS)

#-----------------------------------------------------------------------
# The rest of this file contains dependencies generated with
# "make depend" -- don't add anything below or it will go away.
# DO NOT DELETE THIS LINE
